Commit 84a960ab authored by Lucas Campos's avatar Lucas Campos

Added files

parents
candi (compile&install) for deal.II
Uwe Koecher <uwe.koecher@hsu-hamburg.de>
Bruno Turcksin <bruno.turcksin@gmail.com>
Timo Heister <timo.heister@gmail.com>
===================================================================
The origin is Dorsal, licensed under the
GNU Lesser General Public License Version 3,
from
https://bitbucket.org/fenics-project/dorsal/src
master c667be2 2013-11-27
Please find the list of the authors of Dorsal below:
Dorsal is written and maintained by:
Harish Narayanan <hnarayanan@gmail.com>
http://home.simula.no/~harish/
Major contributors ordered by number of commits include:
Garth N. Wells <gnw20@cam.ac.uk>
Anders Logg <logg@simula.no>
Johannes Ring <johannr@simula.no>
Joachim B. Haga <jobh@simula.no>
Roman Putanowicz <putanowr@l5.pk.edu.pl>
Ilmar Wilbers <ilmarw@simula.no>
Minor contributors in chronological order include:
Luk ShunTim <shuntim.luk@polyu.edu.hk>
Kristoffer Selim <selim@simula.no>
Peter-Jan Randewijk <pjrandew@sun.ac.za>
Aron Wahlberg <aron.wahlberg@gmail.com>
Douglas N. Arnold <arnold@umn.edu>
Andre Massing <massing@simula.no>
Dimitris Tsarouchas <dt335@cam.ac.uk>
Krishna S. Rudraraju <rudraa@umich.edu>
Alexander Jarosch <alex@alexj.at>
Marie E. Rognes <meg@simula.no>
Patrick Riesen <priesen@student.ethz.ch>
Gerd Wachsmuth <gerd.wachsmuth@mathematik.tu-chemnitz.de>
Johan Hake <hake@simula.no>
Benjamin Kehlet <benjamik@simula.no>
Richard Katz <richard.katz@earth.ox.ac.uk>
Fredrik Valdmanis <fredva@ifi.uio.no>
Michele Marcionelli <michele.marcionelli@math.ethz.ch>
GNU LESSER GENERAL PUBLIC LICENSE
Version 3, 29 June 2007
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
Everyone is permitted to copy and distribute verbatim copies
of this license document, but changing it is not allowed.
This version of the GNU Lesser General Public License incorporates
the terms and conditions of version 3 of the GNU General Public
License, supplemented by the additional permissions listed below.
0. Additional Definitions.
As used herein, "this License" refers to version 3 of the GNU Lesser
General Public License, and the "GNU GPL" refers to version 3 of the GNU
General Public License.
"The Library" refers to a covered work governed by this License,
other than an Application or a Combined Work as defined below.
An "Application" is any work that makes use of an interface provided
by the Library, but which is not otherwise based on the Library.
Defining a subclass of a class defined by the Library is deemed a mode
of using an interface provided by the Library.
A "Combined Work" is a work produced by combining or linking an
Application with the Library. The particular version of the Library
with which the Combined Work was made is also called the "Linked
Version".
The "Minimal Corresponding Source" for a Combined Work means the
Corresponding Source for the Combined Work, excluding any source code
for portions of the Combined Work that, considered in isolation, are
based on the Application, and not on the Linked Version.
The "Corresponding Application Code" for a Combined Work means the
object code and/or source code for the Application, including any data
and utility programs needed for reproducing the Combined Work from the
Application, but excluding the System Libraries of the Combined Work.
1. Exception to Section 3 of the GNU GPL.
You may convey a covered work under sections 3 and 4 of this License
without being bound by section 3 of the GNU GPL.
2. Conveying Modified Versions.
If you modify a copy of the Library, and, in your modifications, a
facility refers to a function or data to be supplied by an Application
that uses the facility (other than as an argument passed when the
facility is invoked), then you may convey a copy of the modified
version:
a) under this License, provided that you make a good faith effort to
ensure that, in the event an Application does not supply the
function or data, the facility still operates, and performs
whatever part of its purpose remains meaningful, or
b) under the GNU GPL, with none of the additional permissions of
this License applicable to that copy.
3. Object Code Incorporating Material from Library Header Files.
The object code form of an Application may incorporate material from
a header file that is part of the Library. You may convey such object
code under terms of your choice, provided that, if the incorporated
material is not limited to numerical parameters, data structure
layouts and accessors, or small macros, inline functions and templates
(ten or fewer lines in length), you do both of the following:
a) Give prominent notice with each copy of the object code that the
Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the object code with a copy of the GNU GPL and this license
document.
4. Combined Works.
You may convey a Combined Work under terms of your choice that,
taken together, effectively do not restrict modification of the
portions of the Library contained in the Combined Work and reverse
engineering for debugging such modifications, if you also do each of
the following:
a) Give prominent notice with each copy of the Combined Work that
the Library is used in it and that the Library and its use are
covered by this License.
b) Accompany the Combined Work with a copy of the GNU GPL and this license
document.
c) For a Combined Work that displays copyright notices during
execution, include the copyright notice for the Library among
these notices, as well as a reference directing the user to the
copies of the GNU GPL and this license document.
d) Do one of the following:
0) Convey the Minimal Corresponding Source under the terms of this
License, and the Corresponding Application Code in a form
suitable for, and under terms that permit, the user to
recombine or relink the Application with a modified version of
the Linked Version to produce a modified Combined Work, in the
manner specified by section 6 of the GNU GPL for conveying
Corresponding Source.
1) Use a suitable shared library mechanism for linking with the
Library. A suitable mechanism is one that (a) uses at run time
a copy of the Library already present on the user's computer
system, and (b) will operate properly with a modified version
of the Library that is interface-compatible with the Linked
Version.
e) Provide Installation Information, but only if you would otherwise
be required to provide such information under section 6 of the
GNU GPL, and only to the extent that such information is
necessary to install and execute a modified version of the
Combined Work produced by recombining or relinking the
Application with a modified version of the Linked Version. (If
you use option 4d0, the Installation Information must accompany
the Minimal Corresponding Source and Corresponding Application
Code. If you use option 4d1, you must provide the Installation
Information in the manner specified by section 6 of the GNU GPL
for conveying Corresponding Source.)
5. Combined Libraries.
You may place library facilities that are a work based on the
Library side by side in a single library together with other library
facilities that are not Applications and are not covered by this
License, and convey such a combined library under terms of your
choice, if you do both of the following:
a) Accompany the combined library with a copy of the same work based
on the Library, uncombined with any other library facilities,
conveyed under the terms of this License.
b) Give prominent notice with the combined library that part of it
is a work based on the Library, and explaining where to find the
accompanying uncombined form of the same work.
6. Revised Versions of the GNU Lesser General Public License.
The Free Software Foundation may publish revised and/or new versions
of the GNU Lesser General Public License from time to time. Such new
versions will be similar in spirit to the present version, but may
differ in detail to address new problems or concerns.
Each version is given a distinguishing version number. If the
Library as you received it specifies that a certain numbered version
of the GNU Lesser General Public License "or any later version"
applies to it, you have the option of following the terms and
conditions either of that published version or of any later version
published by the Free Software Foundation. If the Library as you
received it does not specify a version number of the GNU Lesser
General Public License, you may choose any version of the GNU Lesser
General Public License ever published by the Free Software Foundation.
If the Library as you received it specifies that a proxy can decide
whether future versions of the GNU Lesser General Public License shall
apply, that proxy's public statement of acceptance of any version is
permanent authorization for you to choose that version for the
Library.
\ No newline at end of file
candi (Compile &amp; Install)
=====
The ``candi.sh`` shell script downloads, configures, builds, and installs
[deal.II](https://github.com/dealii/dealii) with common dependencies on
linux-based systems.
Quickstart
----
The following commands download the current version of the installer and
then install the latest deal.II release and common dependencies:
```bash
git clone https://github.com/dealii/candi
cd candi
./candi.sh
```
Follow the instructions on the screen
(you can abort the process by pressing < CTRL > + C)
### Examples
#### Install deal.II on RHEL 7, CentOS 7 or Fedora 24,25,26:
```bash
module load mpi/openmpi-`uname -i`
./candi.sh
```
#### Install deal.II on ubuntu 12.04, 14.xx, 15.xx, 16.xx, 17.xx:
```bash
./candi.sh
```
#### Install deal.II on macOS (10.11), 10.12, 10.13:
```bash
./candi.sh
```
#### Install deal.II on Windows 10 (1709):
Since the Creators Update in fall 2017 (Windows 10 (1709)) the
Windows Subsystem for Linux (WSL) is an official part.
Install ubuntu from the Store.
Then enable the WSL feature,
e.g. by opening a PowerShell as Administrator and run:
```bash
Enable-WindowsOptionalFeature -Online -FeatureName Microsoft-Windows-Subsystem-Linux
```
You need to reboot your system afterwards.
Within the ubuntu terminal application clone this repository and run candi
```bash
sudo apt-get update
sudo apt-get upgrade
git clone https://github.com/dealii/candi
cd candi
./candi.sh
```
#### Install deal.II on a generic Linux system or cluster:
```bash
./candi.sh --platform=./deal.II-toolchain/platforms/supported/linux_cluster.platform
```
Note that you probably also want to change the prefix path, or
the path to ``BLAS`` and ``LAPACK`` in the configuration file
(see documentation below).
#### Install deal.II on a system without pre-installed git:
```bash
wget https://github.com/dealii/candi/archive/master.tar.gz
tar -xzf master.tar.gz
cd candi-master
./candi.sh
```
Note that in this case you will need to activate the installation of git by
uncommenting the line `#PACKAGES="${PACKAGES} once:git"` in
[candi.cfg](candi.cfg).
Advanced Configuration
----
### Command line options
#### Help: `[-h]`
You can get a list of all command line options by running
```bash
./candi.sh -h
```
You can combine the command line options given below.
#### Prefix path: ``[-p=<PATH>]``, ``[--prefix=<PATH>]``
```bash
./candi.sh --prefix=Your/Prefix/Path
```
#### Multiple build processes: ``[-j <N>]``, ``[--PROCS=<N>]``
```bash
./candi.sh -j <N>
```
* Example: to use 2 build processes type ``./candi.sh -j 2``.
* Be careful with this option! You need to have enough system memory (e.g. at least 8GB for 2 or more processes).
### Configuration file options
If you want to change the set of packages to be installed,
you can enable or disable a package in the configuration file
[candi.cfg](candi.cfg).
This file is a simple text file and can be changed with any text editor.
Currently, we provide the packages
* trilinos
* petsc, slepc
* superlu_dist (to be used with trilinos)
* p4est
* hdf5
* opencascade
and others. For a complete list see [deal.II-toolchain/packages](deal.II-toolchain/packages).
There are several other options within the configuration file, e.g.
* the ``DOWNLOAD_PATH`` folder (can be safely removed after installation),
* the ``UNPACK_PATH`` folder of the downloaded packages (can be safely removed after installation),
* the ``BUILD_PATH`` folder (can be safely removed after installation),
* the ``INSTALL_PATH`` destination folder,
and more.
### Single package installation mode
If you prefer to install only a single package, you can do so by
```bash
./candi.sh --packages="dealii"
```
for instance, or a set of packages by
```bash
./candi.sh --packages="opencascade petsc"
```
### Developer mode
Our installer provides a software developer mode by setting
``DEVELOPER_MODE=ON``
within [candi.cfg](candi.cfg).
More precisely, the developer mode skips the package ``fetch`` and ``unpack``,
everything else (package configuration, building and installation) is done
as before.
Note that you need to have a previous run of candi and
you must not remove the ``UNPACK_PATH`` directory.
Then you can modify source files in ``UNPACK_PATH`` of a package and
run candi again.
# Global configuration.
# Meta-project to build
PROJECT=deal.II-toolchain
CLEAN_BUILD=false
#########################################################################
# Where do you want the downloaded source files to go?
#DOWNLOAD_PATH=${PREFIX_PATH}/tmp/src
# Where do you want to unpack source files to go?
#UNPACK_PATH=${PREFIX_PATH}/tmp/unpack
# Where do you want the build files to go?
#BUILD_PATH=${PREFIX_PATH}/tmp/build
# Where do you want the compiled software installed?
INSTALL_PATH=${PREFIX_PATH}
#########################################################################
# Set up mirror server url(s), to speed up downloads, e.g.
# MIRROR="${MIRROR} http://server1.org/package_mirror_dir/"
# MIRROR="${MIRROR} ftp://server2.org/package_mirror_dir/"
MIRROR="https://www.ces.clemson.edu/dealii/mirror/"
#########################################################################
#Choose configuration and components of deal.II
DEAL_CONFOPTS=""
PACKAGES="load:dealii-prepare"
# These are system dependencies that are often pre-installed:
#PACKAGES="${PACKAGES} once:zlib"
#PACKAGES="${PACKAGES} once:bzip2"
#PACKAGES="${PACKAGES} once:git"
#PACKAGES="${PACKAGES} once:cmake"
#PACKAGES="${PACKAGES} once:boost"
#PACKAGES="${PACKAGES} once:numdiff"
# These packages are not dependencies but are tools used for deal.II development:
#PACKAGES="${PACKAGES} once:astyle"
#PACKAGES="${PACKAGES} once:numdiff"
# These packages determine the active components of deal.II:
#PACKAGES="${PACKAGES} once:arpack-ng"
#PACKAGES="${PACKAGES} once:assimp"
#PACKAGES="${PACKAGES} once:nanoflann"
PACKAGES="${PACKAGES} once:opencascade"
# PACKAGES="${PACKAGES} once:parmetis"
#PACKAGES="${PACKAGES} once:sundials"
#PACKAGES="${PACKAGES} once:superlu_dist"
PACKAGES="${PACKAGES} once:hdf5"
PACKAGES="${PACKAGES} once:p4est"
PACKAGES="${PACKAGES} once:trilinos"
# PACKAGES="${PACKAGES} once:petsc"
# PACKAGES="${PACKAGES} once:slepc"
PACKAGES="${PACKAGES} dealii"
#########################################################################
# Install the following deal.II version:
DEAL_II_VERSION=v8.5.1
# Would you like to build stable version of deal.II?
# If STABLE_BUILD=false, then the development version of deal.II will be
# installed.
STABLE_BUILD=true
#STABLE_BUILD=false
if [ ${STABLE_BUILD} = "false" ]; then
DEAL_II_VERSION=master
fi
#########################################################################
# If you want to use Trilinos, decide if you want v12.x.x (AUTO) or v11.x.x
TRILINOS_MAJOR_VERSION=AUTO
#TRILINOS_MAJOR_VERSION=12
#TRILINOS_MAJOR_VERSION=11
#########################################################################
# Do you want to use MKL?
MKL=ON
MKL_DIR=/usr/local/software/jureca/Stages/2017b/software/imkl/2018.0.128-ipsmpi-2017b/mkl
BLAS_DIR=/usr/local/software/jureca/Stages/2017b/software/imkl/2018.0.128-ipsmpi-2017b/mkl/lib/intel64
LAPACK_DIR=/usr/local/software/jureca/Stages/2017b/software/imkl/2018.0.128-ipsmpi-2017b/mkl/lib/intel64
# BLAS_DIR=/usr/local/software/jureca/Stages/2017a/software/OpenBLAS/0.2.19-GCC-5.4.0-LAPACK-3.7.0/lib
# LAPACK_DIR=/usr/local/software/jureca/Stages/2017a/software/ScaLAPACK/2.0.2-gpsmpi-2017a-OpenBLAS-0.2.19-LAPACK-3.7.0/lib
# TRILINOS_DIR=/usr/local/software/jureca/Stages/2017b/software/Trilinos/12.10.1-intel-para-2017b-Python-2.7.14
#########################################################################
# If you want to change the source code of one or multiple packages
# switch on the developer mode to avoid a package fetch and unpack.
# Note: a previous run of candi with the same settings must be done without
# this mode!
DEVELOPER_MODE=OFF
This diff is collapsed.
VERSION=master
NAME=arpack-ng.git
EXTRACTSTO=arpack-ng-${VERSION}
SOURCE=https://github.com/opencollab/
PACKING=git
BUILDCHAIN=cmake
BUILDDIR=${BUILD_PATH}/arpack-ng-${VERSION}
INSTALL_PATH=${INSTALL_PATH}/arpack-ng-${VERSION}
CONFOPTS="-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
-D EXAMPLES=OFF \
-D MPI=ON \
-D BUILD_SHARED_LIBS=ON"
package_specific_register () {
export ARPACK_DIR=${INSTALL_PATH}
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
rm -f $CONFIG_FILE
echo "
export ARPACK_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
}
VERSION=3.3.1
NAME=v${VERSION}
EXTRACTSTO=assimp-${VERSION}
SOURCE=https://github.com/assimp/assimp/archive/
CHECKSUM=fc57b024e80ebb13301bd0983826cad3
PACKING=.tar.gz
BUILDCHAIN=cmake
BUILDDIR=${BUILD_PATH}/assimp-${VERSION}
INSTALL_PATH=${INSTALL_PATH}/assimp-${VERSION}
CONFOPTS="-D CMAKE_INSTALL_PREFIX=${INSTALL_PATH} \
-D BUILD_SHARED_LIBS=ON"
package_specific_register () {
export ASSIMP_DIR=${INSTALL_PATH}
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/assimp-${NAME}
rm -f $CONFIG_FILE
echo "
export ASSIMP_DIR=${INSTALL_PATH}
" >> $CONFIG_FILE
}
VERSION=2.04
NAME=astyle_${VERSION}_linux
SOURCE=https://downloads.sourceforge.net/project/astyle/astyle/astyle%202.04/
PACKING=.tar.gz
EXTRACTSTO=astyle
CHECKSUM=30b1193a758b0909d06e7ee8dd9627f6
BUILDCHAIN=custom
INSTALL_PATH=${INSTALL_PATH}/astyle-${VERSION}
package_specific_setup () {
cd ${BUILDDIR}
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
cd build/gcc
mkdir -p ${INSTALL_PATH}
make -j${PROCS} >> make.output || bdie "Error in make"
cp bin/astyle ${INSTALL_PATH}/
}
package_specific_register () {
export PATH=${INSTALL_PATH}:$PATH
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
rm -f $CONFIG_FILE
echo "
export PATH=${INSTALL_PATH}:\${PATH}
" >> $CONFIG_FILE
}
VERSION=1_63_0;CHECKSUM=7b493c08bc9557bbde7e29091f28b605
#VERSION=1_60_0;CHECKSUM=28f58b9a33469388302110562bdf6188
#VERSION=1_59_0;CHECKSUM=51528a0e3b33d9e10aaa311d9eb451e3
#VERSION=1_58_0;CHECKSUM=5a5d5614d9a07672e1ab2a250b5defc5
NAME=boost_${VERSION}
SOURCE=http://downloads.sourceforge.net/boost/
PACKING=.tar.gz
BUILDCHAIN=custom
INSTALL_PATH=${INSTALL_PATH}/${NAME}
package_specific_build () {
cp -rf ${UNPACK_PATH}/${NAME}/* .
./bootstrap.sh --prefix=${INSTALL_PATH} --without-libraries=python
quit_if_fail "boost build ./bootstrap.sh failed"
echo "using mpi ;" > user-config.jam
./b2 -j ${PROCS} --user-config=user-config.jam --build-dir=candi_build_dir link=shared install ${CONFOPTS}
quit_if_fail "boost build ./b2 failed"
}
package_specific_register () {
export BOOST_ROOT=${INSTALL_PATH}
export BOOST_INCLUDEDIR=${INSTALL_PATH}/include
export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib
export BOOST_USE_MULTITHREADED=OFF
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
rm -f $CONFIG_FILE
echo "
export BOOST_ROOT=${INSTALL_PATH}
export BOOST_INCLUDEDIR=${INSTALL_PATH}/include
export BOOST_LIBRARYDIR=${INSTALL_PATH}/lib
export BOOST_USE_MULTITHREADED=OFF
" >> $CONFIG_FILE
}
VERSION=1.0.6
NAME=bzip2-${VERSION}
SOURCE=http://www.bzip.org/${VERSION}/
PACKING=.tar.gz
CHECKSUM=00b516f4704d4a7cb50a1d97e6e8e15b
BUILDCHAIN=custom
INSTALL_PATH=${INSTALL_PATH}/${NAME}
package_specific_build () {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO}/* .
# patch the Makefile
patch -p1 --forward < ${ORIG_DIR}/${PROJECT}/patches/bzip2-${VERSION}.patch || true
# compile bzip2
make install
}
package_specific_register () {
export BZIP2_INCLUDE=${INSTALL_PATH}/include
export BZIP2_LIBPATH=${INSTALL_PATH}/lib
}
package_specific_conf () {
# Generate configuration file
CONFIG_FILE=${CONFIGURATION_PATH}/${NAME}
rm -f $CONFIG_FILE
echo "
export BZIP2_INCLUDE=${INSTALL_PATH}/include
export BZIP2_LIBPATH=${INSTALL_PATH}/lib
" >> $CONFIG_FILE
}
VERSION=3.4.0-rc2-Linux-x86_64
NAME=cmake-${VERSION}
SOURCE=https://cmake.org/files/v3.4/
PACKING=.tar.gz
CHECKSUM=511db6fe363aa323905e1c06f7b22425
BUILDCHAIN=ignore
package_specific_install () {
cp -rf ${UNPACK_PATH}/${EXTRACTSTO} ${INSTALL_PATH}
}
package_specific_register () {
export PATH=${INSTALL_PATH}/${EXTRACTSTO}/bin:${PATH}
}