... | @@ -12,8 +12,8 @@ These steps can take some time. |
... | @@ -12,8 +12,8 @@ These steps can take some time. |
|
```
|
|
```
|
|
cd "$INMOST_ROOT"
|
|
cd "$INMOST_ROOT"
|
|
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz
|
|
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-lite-3.5.2.tar.gz
|
|
tar zxf petsc-3.5.2.tar.gz
|
|
tar zxf petsc-lite-3.5.2.tar.gz
|
|
rm -f petsc-3.5.2.tar.gz
|
|
rm -f petsc-lite-3.5.2.tar.gz
|
|
cd petsc-3.5.2
|
|
cd petsc-3.5.2
|
|
export PETSC_DIR="`pwd`"
|
|
export PETSC_DIR="`pwd`"
|
|
export PETSC_ARCH=linux-gnu-debug
|
|
export PETSC_ARCH=linux-gnu-debug
|
... | @@ -43,5 +43,52 @@ cd INMOST-build |
... | @@ -43,5 +43,52 @@ cd INMOST-build |
|
cmake -DUSE_SOLVER_PETSC=ON ../INMOST-master
|
|
cmake -DUSE_SOLVER_PETSC=ON ../INMOST-master
|
|
```
|
|
```
|
|
|
|
|
|
|
|
## Changing default compilers
|
|
|
|
The simplest way to use different compilers is to provide specific MPI wrappers to this compilers. This highly depends on you MPI installation. Below you will find several examples of using Intel Compilers with different MPI libraries.
|
|
|
|
|
|
|
|
If you use MPICH, you can set environment variables `MPICH_CC`, `MPICH_CXX` and `MPICH_F77` to override default compilers.
|
|
|
|
```
|
|
|
|
cd "$PETSC_DIR"
|
|
|
|
export PETSC_ARCH=linux-intel-debug
|
|
|
|
export MPICH_CC=icc
|
|
|
|
export MPICH_CXX=icpc
|
|
|
|
export MPICH_F77=ifort
|
|
|
|
./configure --download-f2cblaslapack --with-mpi=1
|
|
|
|
make all
|
|
|
|
|
|
|
|
cd "$INMOST_ROOT"
|
|
|
|
mkdir -p INMOST-build-intel
|
|
|
|
cd INMOST-build-intel
|
|
|
|
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DUSE_SOLVER_PETSC=ON ../INMOST-master
|
|
|
|
make all
|
|
|
|
```
|
|
|
|
|
|
|
|
If you use Intel MPI, then usually you will have separate `mpiicc`, `mpiicpc` and `mpiifort` wrappers.
|
|
|
|
```
|
|
|
|
cd "$PETSC_DIR"
|
|
|
|
export PETSC_ARCH=linux-intel-debug
|
|
|
|
./configure --with-cc=mpiicc --with-cxx=mpiicpc --with-fc=mpiifort --download-f2cblaslapack --with-mpi=1
|
|
|
|
make all
|
|
|
|
|
|
|
|
cd "$INMOST_ROOT"
|
|
|
|
mkdir -p INMOST-build-intel
|
|
|
|
cd INMOST-build-intel
|
|
|
|
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DMPI_C_COMPILER=mpiicc -DMPI_CXX_COMPILER=mpiicpc -DUSE_SOLVER_PETSC=ON ../INMOST-master
|
|
|
|
make all
|
|
|
|
```
|
|
|
|
|
|
|
|
Note, that you can also use PETSc installer to download and compile Open MPI using your desired compilers.
|
|
|
|
```
|
|
|
|
cd "$PETSC_DIR"
|
|
|
|
export PETSC_ARCH=linux-intel-debug
|
|
|
|
./configure --with-cc=icc --with-cxx=icpc --with-fc=ifort --download-f2cblaslapack --download-openmpi=1
|
|
|
|
make all
|
|
|
|
|
|
|
|
cd "$INMOST_ROOT"
|
|
|
|
mkdir -p INMOST-build-intel
|
|
|
|
cd INMOST-build-intel
|
|
|
|
cmake -DCMAKE_C_COMPILER=icc -DCMAKE_CXX_COMPILER=icpc -DMPI_C_COMPILER="$PETSC_DIR/$PETSC_ARCH/bin/mpicc" -DMPI_CXX_COMPILER="$PETSC_DIR/$PETSC_ARCH/bin/mpic++" -DMPIEXEC="$PETSC_DIR/$PETSC_ARCH/bin/mpiexec" -DUSE_SOLVER_PETSC=ON ../INMOST-master
|
|
|
|
make all
|
|
|
|
```
|
|
|
|
|
|
|
|
Refer to your MPI manual and compiler documentation for further information. |
|
|
|
\ No newline at end of file |