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: ...@@ -55,8 +55,8 @@ Among other (and possibly optional) dependencies, GetDP relies on PETSc:
https://www.mcs.anl.gov/petsc https://www.mcs.anl.gov/petsc
The shell script dependencies.sh should handle this automatically if you run: The shell script dependencies.sh should handle this automatically if you run:
./dependencies.sh ./dependencies.sh
This script needs git. Don't forget to update your PYTHONPATH and You will need wget, tar, gcc, g++ and gfortran for this script to work.
LD_LIBRARY_PATH as instructed. 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 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 options you will need. The PETSc library should be compiled with the following
...@@ -79,5 +79,6 @@ following options: ...@@ -79,5 +79,6 @@ following options:
ENABLE_WRAP_PYTHON: ON ENABLE_WRAP_PYTHON: ON
If everything went fine, you should end up with the GetDP Python module: If everything went fine, you should end up with the GetDP Python module:
getdp.py getdp.py
Finally, Don't forget to update your PATH, PYTHONPATH and LD_LIBRARY_PATH.
Enjoy! Enjoy!
#!/bin/sh #!/bin/sh
## Dependencies folder ##
#########################
echo "Creating dependencies folder: dep/" echo "Creating dependencies folder: dep/"
mkdir dep mkdir dep
cd dep
echo "Cloning PETSc" ## BLAS ##
git clone -b maint https://bitbucket.org/petsc/petsc dep/petsc ##########
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" echo "Entering PETSc"
PETSC_DIR=$(pwd)/dep/petsc cd petsc-3.7.5
PETSC_DIR=$(pwd)
PETSC_ARCH=linux-gnu-cxx-seq PETSC_ARCH=linux-gnu-cxx-seq
PETSC=$PETSC_DIR"/"$PETSC_ARCH PETSC=$PETSC_DIR"/"$PETSC_ARCH
cd dep/petsc
echo "Configuring PETSc" echo "Configuring PETSc"
./configure --with-clanguage=cxx --with-shared-libraries=1 --with-x=0 \ ./configure --with-clanguage=cxx --with-shared-libraries=1 --with-x=0 \
--with-scalar-type=complex --with-mumps-serial=yes --with-mpi=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" echo "Compiling PETSc"
make all make all
...@@ -25,11 +52,16 @@ make test ...@@ -25,11 +52,16 @@ make test
echo "Leaving PETSc" echo "Leaving PETSc"
cd .. cd ..
echo "Cloning GetDP" ## GetDP ##
git clone http://gitlab.onelab.info/getdp/getdp.git 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" echo "Entering GetDP"
cd getdp cd getdp-2.11.0-source
echo "Configuring GetDP" echo "Configuring GetDP"
mkdir build mkdir build
...@@ -45,12 +77,18 @@ make ...@@ -45,12 +77,18 @@ make
echo "Leaving GetDP" echo "Leaving GetDP"
cd ../../.. cd ../../..
## PATH ##
##########
echo " " echo " "
echo "+++" echo "+++"
echo "PETSc and GetDP should be now compiled with the required features." 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 "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 "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 "Please add the following in your ~/.bashrc file (or equivalent):"
echo "export PYTHONPATH="$GETDP":\$PYTHONPATH" echo "export PATH=\$PATH:"$(pwd)"/bin"
echo "export LD_LIBRARY_PATH="$PETSC"/lib:"$GETDP":\$LD_LIBRARY_PATH" echo "export PYTHONPATH=\$PYTHONPATH:"$GETDP
echo "export LD_LIBRARY_PATH=\$LD_LIBRARY_PATH:"$PETSC"/lib:"$GETDP":"$BLAS
echo "+++" echo "+++"
## Enjoy ! ##
#############
SRC=.. BIN=../bin
test: test:
@echo "make cim: run the countour integral solver" @echo "make cim: run the countour integral solver"
...@@ -8,7 +8,7 @@ ref: init ...@@ -8,7 +8,7 @@ ref: init
getdp ref.pro -solve Eig -pos Eig -msh square.msh getdp ref.pro -solve Eig -pos Eig -msh square.msh
cim: init 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: init:
gmsh square.geo -2 gmsh square.geo -2
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment