... | ... | @@ -2,33 +2,26 @@ General build instructions are available in the top-level [README](http://gitlab |
|
|
|
|
|
This page contains more detailed instructions to compile a full-featured version of GetDP, including the compilation of common dependencies: the Gmsh (http://gmsh.info) library as well as PETSc (http://www.mcs.anl.gov/petsc/petsc-as/download/). In addition to CMake, a C++ and a Fortran compiler, you should have (preferably optimized) versions of the BLAS and LAPACK libraries on your system (e.g. OpenBLAS, ATLAS or the MKL).
|
|
|
|
|
|
The following instructions assume that
|
|
|
* the GetDP source code is located in the `getdp` directory
|
|
|
* the Gmsh source code is located in the `gmsh` directory
|
|
|
* the PETSc source code is located in the `petsc-3.7.4` directory
|
|
|
|
|
|
A source code bundle for GetDP and Gmsh is available [here](http://onelab.info/files/gmsh-getdp-source.zip). You can of course also download the codes separately.
|
|
|
|
|
|
## Compile a minimal Gmsh library
|
|
|
|
|
|
The Gmsh library is used in GetDP to perform efficient field interpolation on general meshes (mesh to mesh interpolation), through the `ScalarField`, `VectorField` and `TensorField` family of functions, in conjunction with the `GmshRead` operation.
|
|
|
|
|
|
* Configure, compile and install a minimal (static) Gmsh library:
|
|
|
|
|
|
```bash
|
|
|
git clone http://gitlab.onelab.info/gmsh/gmsh
|
|
|
cd gmsh
|
|
|
mkdir lib
|
|
|
cd lib
|
|
|
cmake -DDEFAULT=0 -DENABLE_PARSER=1 -DENABLE_POST=1 -DENABLE_BUILD_LIB=1 ..
|
|
|
make lib
|
|
|
sudo make install/fast
|
|
|
cd ../..
|
|
|
```
|
|
|
|
|
|
If you prefer to build a dynamic Gmsh library, replace ```-DENABLE_BUILD_LIB=1``` with ```-DENABLE_BUILD_SHARED=1```.
|
|
|
|
|
|
## Compile a sequential (non-MPI) GetDP version in real arithmetic
|
|
|
|
|
|
* Configure and build PETSc without MPI:
|
|
|
Download the sources from [the official site](http://www.mcs.anl.gov/petsc/petsc-as/download/), then (here for PETSc 3.7.4):
|
|
|
|
|
|
```bash
|
|
|
cd petsc-3.7.4
|
... | ... | @@ -36,18 +29,19 @@ 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
|
|
|
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```.
|
|
|
|
|
|
* Configure and compile GetDP:
|
|
|
|
|
|
```bash
|
|
|
git clone http://gitlab.onelab.info/getdp/getdp
|
|
|
cd getdp
|
|
|
mkdir bin
|
|
|
cd bin
|
|
|
cmake -DENABLE_BLAS_LAPACK=0 ..
|
|
|
make
|
|
|
cd ../..
|
|
|
```
|
|
|
|
|
|
Setting `-DENABLE_BLAS_LAPACK=0` will force GetDP to use the same BLAS/LAPACK libraries as the ones used by PETSc.
|
... | ... | |