Skip to content
Snippets Groups Projects
Commit c75010ae authored by Nicolas Marsic's avatar Nicolas Marsic
Browse files

oops

parent 6aa3c2bc
No related branches found
No related tags found
No related merge requests found
......@@ -55,8 +55,8 @@ Among other (and possibly optional) dependencies, GetDP relies on PETSc:
https://www.mcs.anl.gov/petsc
The shell script dependencies.sh should handle this automatically if you run:
./dependencies.sh
This script needs git. Don't forget to update your PYTHONPATH and
LD_LIBRARY_PATH as instructed.
You will need wget, tar, gcc, g++ and gfortran for this script to work.
Don't forget to update your PATH, PYTHONPATH and LD_LIBRARY_PATH as instructed.
If you want to handle the PETSc and GetDP libraries yourself, here are the
options you will need. The PETSc library should be compiled with the following
......@@ -79,5 +79,6 @@ following options:
ENABLE_WRAP_PYTHON: ON
If everything went fine, you should end up with the GetDP Python module:
getdp.py
Finally, Don't forget to update your PATH, PYTHONPATH and LD_LIBRARY_PATH.
Enjoy!
#!/bin/sh
## Dependencies folder ##
#########################
echo "Creating dependencies folder: dep/"
mkdir dep
cd dep
echo "Cloning PETSc"
git clone -b maint https://bitbucket.org/petsc/petsc dep/petsc
## BLAS ##
##########
echo "Downloading OpenBLAS"
wget http://github.com/xianyi/OpenBLAS/archive/v0.2.19.tar.gz
echo "Extracting OpenBLAS"
tar xf v0.2.19.tar.gz
echo "Entering OpenBLAS"
cd OpenBLAS-0.2.19
BLAS=$(pwd)
echo "Compiling OpenBLAS"
make
echo "Leaving OpenBLAS"
cd ..
## PETSc ##
###########
echo "Downloading PETSc"
wget http://ftp.mcs.anl.gov/pub/petsc/release-snapshots/petsc-3.7.5.tar.gz
echo "Extracting PETSc"
tar xf petsc-3.7.5.tar.gz
echo "Entering PETSc"
PETSC_DIR=$(pwd)/dep/petsc
cd petsc-3.7.5
PETSC_DIR=$(pwd)
PETSC_ARCH=linux-gnu-cxx-seq
PETSC=$PETSC_DIR"/"$PETSC_ARCH
cd dep/petsc
echo "Configuring PETSc"
./configure --with-clanguage=cxx --with-shared-libraries=1 --with-x=0 \
--with-scalar-type=complex --with-mumps-serial=yes --with-mpi=0 \
--with-mpiuni-fortran-binding=0 --download-mumps=yes
--with-mpiuni-fortran-binding=0 --download-mumps=yes \
--with-blas-lapack-lib=$BLAS/libopenblas.so
echo "Compiling PETSc"
make all
......@@ -25,11 +52,16 @@ make test
echo "Leaving PETSc"
cd ..
echo "Cloning GetDP"
git clone http://gitlab.onelab.info/getdp/getdp.git getdp
## GetDP ##
###########
echo "Downloading GetDP"
wget http://getdp.info/src/getdp-2.11.0-source.tgz
echo "Extracting GetDP"
tar xf getdp-2.11.0-source.tgz
echo "Entering GetDP"
cd getdp
cd getdp-2.11.0-source
echo "Configuring GetDP"
mkdir build
......@@ -45,12 +77,18 @@ make
echo "Leaving GetDP"
cd ../../..
## PATH ##
##########
echo " "
echo "+++"
echo "PETSc and GetDP should be now compiled with the required features."
echo "In order to use cim.py, a few additional steps are required."
echo "We still need to add the libraries and the Python module in your path."
echo "Please add the following in your .bashrc file (or equivalent):"
echo "export PYTHONPATH="$GETDP":\$PYTHONPATH"
echo "export LD_LIBRARY_PATH="$PETSC"/lib:"$GETDP":\$LD_LIBRARY_PATH"
echo "Please add the following in your ~/.bashrc file (or equivalent):"
echo "export PATH=\$PATH:"$(pwd)"/bin"
echo "export PYTHONPATH=\$PYTHONPATH:"$GETDP
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:"$PETSC"/lib:"$GETDP":"$BLAS
echo "+++"
## Enjoy ! ##
#############
SRC=..
BIN=../bin
test:
@echo "make cim: run the countour integral solver"
......@@ -8,7 +8,7 @@ ref: init
getdp ref.pro -solve Eig -pos Eig -msh square.msh
cim: init
python ${SRC}/cim.py maxwell.pro square.msh Maxwell Maxwell 9e8 1e8
python ${BIN}/cim.py maxwell.pro square.msh Maxwell Maxwell 9e8 1e8
init:
gmsh square.geo -2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment