... | ... | @@ -14,13 +14,14 @@ cd gmsh |
|
|
mkdir lib
|
|
|
cd lib
|
|
|
cmake -DDEFAULT=0 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_BUILD_LIB=1 ..
|
|
|
# Notes:
|
|
|
# * replace -DENABLE_BUILD_LIB=1 with -DENABLE_BUILD_SHARED=1 to build a shared library
|
|
|
# * if you don't have root access, add -DCMAKE_INSTALL_PREFIX=path-to-install
|
|
|
make lib
|
|
|
sudo make install/fast
|
|
|
cd ../..
|
|
|
```
|
|
|
|
|
|
If you prefer to build a dynamic Gmsh library instead, replace `-DENABLE_BUILD_LIB=1` with `-DENABLE_BUILD_SHARED=1`. If you don't have root access, add `-DCMAKE_INSTALL_PREFIX=/path/to/install`.
|
|
|
|
|
|
## Sequential (non-MPI) GetDP version in real arithmetic
|
|
|
|
|
|
PETSc is the standard linear algebra toolkit used by GetDP (GetDP can also use linear solvers from Sparskit -- see the configuration options for more information).
|
... | ... | @@ -32,12 +33,13 @@ cd petsc-3.7.4 |
|
|
export PETSC_DIR=$PWD
|
|
|
export PETSC_ARCH=real_mumps_seq
|
|
|
./configure --with-clanguage=cxx --with-debugging=0 --with-mpi=0 --with-mpiuni-fortran-binding=0 --download-mumps=yes --with-mumps-serial --with-shared-libraries=0 --with-x=0 --with-ssl=0 --with-scalar-type=real
|
|
|
# Notes:
|
|
|
# * if the BLAS/LAPACK libraries are not installed in standard locations, you will have to specify their location by hand with options --with-blas-lib=/path/to/libblas and --with-lapack-lib=/path/to/liblapack
|
|
|
# * as a last recourse (but this will severely degrade performance), you can use generic non-optimized BLAS/LAPACK libraries by using the option --download-fblaslapack=1
|
|
|
make
|
|
|
cd ..
|
|
|
```
|
|
|
|
|
|
If your BLAS/LAPACK libraries are not installed in standard locations, you will have to specify their location by hand, e.g. by adding ```--with-blas-lib=/path/to/libblas --with-lapack-lib=/path/to/liblapack```. As a last recourse (but this will severely degrade performance), you can use generic, non-optimized BLAS/LAPACK libraries by using the option `--download-fblaslapack=1`.
|
|
|
|
|
|
If you also wish to solve eigenvalue problems, you will want to also install SLEPc, an eigensolver based on PETSc. Download and uncompress the SLEPc [source code](http://slepc.upv.es/download/), then (here for SLEPc 3.7.1):
|
|
|
|
|
|
```bash
|
... | ... | @@ -56,12 +58,14 @@ cd getdp |
|
|
mkdir bin
|
|
|
cd bin
|
|
|
cmake -DENABLE_BLAS_LAPACK=0 ..
|
|
|
# Notes:
|
|
|
# * -DENABLE_BLAS_LAPACK=0 forces GetDP to use the same BLAS/LAPACK libraries as the ones used by PETSc
|
|
|
# * use option -DCMAKE_PREFIX_PATH=non-standard-install-path;other-non-standard-install-path if you have libraries installed in non-standard locations
|
|
|
# * use options -DPETSC_DIR=... -DPETSC_ARCH=... if the corresponding environment variables are not set properly
|
|
|
make
|
|
|
cd ../..
|
|
|
```
|
|
|
|
|
|
Setting `-DENABLE_BLAS_LAPACK=0` will force GetDP to use the same BLAS/LAPACK libraries as the ones used by PETSc. If you installed some of the dependencies (e.g. the Gmsh library) in non-standard locations, just add the option `-DCMAKE_PREFIX_PATH=/path/to/some_code;/path/to/some_other_code`.
|
|
|
|
|
|
## Sequential (non-MPI) GetDP version in complex arithmetic
|
|
|
|
|
|
Follow the same steps as in the previous section, but change `--with-scalar-type=real` with `--with-scalar-type=complex` when configuring PETSc.
|
... | ... | @@ -74,7 +78,8 @@ For MPI (distributed memory capable) GetDP versions you need to compile the MPI |
|
|
cd petsc-3.7.4
|
|
|
export PETSC_DIR=$PWD
|
|
|
export PETSC_ARCH=mpi_mumps_real
|
|
|
# Note: remove option --with-scalar-type=complex to build in real arithmetic
|
|
|
# Notes:
|
|
|
# * remove option --with-scalar-type=complex to build in real arithmetic
|
|
|
./configure --with-debugging=0 --with-clanguage=cxx --with-shared-libraries=0 --with-x=0 --download-mumps=1 --download-metis=1 --download-parmetis=1 --download-scalapack=1 --download-blacs=1 --with-scalar-type=complex
|
|
|
make
|
|
|
cd ..
|
... | ... | @@ -103,4 +108,4 @@ cmake -DENABLE_MPI=1 -DENABLE_BLAS_LAPACK=0 .. |
|
|
# * use options -DPETSC_DIR=... -DPETSC_ARCH=... if the corresponding environment variables are not set properly
|
|
|
make
|
|
|
cd ../..
|
|
|
``` |
|
|
``` |
|
|
\ No newline at end of file |