forked from ddrake/coeus-ngsolve
-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_ngsolve_parallel
executable file
·47 lines (40 loc) · 1.56 KB
/
install_ngsolve_parallel
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
#!/bin/bash
# This script installs Netgen/Ngsolve for parallel processing using openmpi
# assuming that Python3 and Cmake3 are already installed
# TODO: update this so it works correctly on Gaia
module load openmpi-2.0/gcc-9.2.0
module load intel
export BASEDIR=$HOME/NGparallel
mkdir -p $BASEDIR
cd $BASEDIR && git clone https://github.com/NGSolve/ngsolve.git ngsolve
cd $BASEDIR/ngsolve
git submodule update --init --recursive
git submodule sync --recursive
git submodule update --init --recursive
cd $BASEDIR
mkdir $BASEDIR/build
cd $BASEDIR/build
cmake \
-DCMAKE_INSTALL_PREFIX:PATH=$BASEDIR \
-DCMAKE_BUILD_TYPE:STRING=Release \
-DUSE_MPI:BOOL=ON \
-DUSE_GUI:BOOL=OFF \
-DUSE_MUMPS:BOOL=ON \
-DUSE_HYPRE:BOOL=ON \
-DUSE_MKL:BOOL=ON \
-DMKL_ROOT:PATH=/opt/intel/mkl \
-DMKL_SDL:BOOL=OFF \
$BASEDIR/ngsolve
make -j20
make install
# The first time installing, it's necessary to edit the file ngspy,
# appending :/usr/lib64/libgomp.so.1 to the PRELOAD PATH
# cd $BASEDIR/bin
# After editing, the file ngspy should look like this, but with your
# username in the place of <username>
# cat ngspy
# #! /usr/bin/bash
# LD_PRELOAD=$LD_PRELOAD:/act/openmpi-2.0/gcc-8.2.0/lib/libmpi.so:/opt/intel/mkl/lib/intel64/libmkl_core.so:/opt/intel/mkl/lib/intel64/libmkl_gnu_thread.so:/opt/intel/mkl/lib/intel64/libmkl_intel_lp64.so:/opt/intel/mkl/lib/intel64/libmkl_blacs_openmpi_lp64.so:/usr/lib64/libgomp.so.1 /home/<username>/common/install/bin/python3 $*
# Test that everything works
# $ cd $BASEDIR/ngsolve/py_tutorials/mpi/poisson_output
# $ mpirun -np 5 ngspy mpi_poisson.py