Commit e09269d1 authored by Cedric Jourdain's avatar Cedric Jourdain
Browse files

Update compile script for GPU

parent d90353d7
......@@ -4,6 +4,8 @@ echo "==> Choose supercomputer :"
echo " - occigen"
echo " - marenostrum "
echo " - marconi-knl "
echo " - daint-gpu "
echo " - daint-cpu "
read machine
source ./env/env_${machine}
......@@ -37,17 +39,37 @@ Install(){
done
if [ $answer = "1" ]; then
echo "===> Copy test case A"
tar zxvf SPECFEM3D_TestCaseA.tar.gz
tar zxvf $HOME/tarballs/SPECFEM3D_TestCaseA.tar.gz
export install_dir=$install_dir/TestCaseA
mkdir -p $install_dir
mv $install_dir/../specfem3d_globe $install_dir/.
cp SPECFEM3D_TestCaseA/* $install_dir/specfem3d_globe/DATA/.
rm -rf SPECFEM3D_TestCaseA
else
echo "===> Copy test case B"
tar zxvf SPECFEM3D_TestCaseB.tar.gz
export install_dir=$install_dir/TestCaseB
mkdir -p $install_dir
mv $install_dir/../specfem3d_globe $install_dir/.
tar zxvf $HOME/tarballs/SPECFEM3D_TestCaseB.tar.gz
cp SPECFEM3D_TestCaseB/* $install_dir/specfem3d_globe/DATA/.
rm -rf SPECFEM3D_TestCaseB
fi
cd $install_dir/specfem3d_globe
if [ $machine = "daint-gpu" ]; then
echo "Configure for CPU+GPU system"
### replace `use mpi` if needed ###
#cd utils
#perl replace_use_mpi_with_include_mpif_dot_h.pl
#cd ..
sed -i s/"GPU_MODE = .false."/"GPU_MODE = .true."/g $install_dir/specfem3d_globe/DATA/Par_file
export MPI_INC=$MPICH_DIR/include
export CUDA_LIB="$CUDATOOLKIT_HOME/lib64"
export CUDA_INC="$CUDATOOLKIT_HOME/include"
./configure --build=ppc64 --with-cuda=cuda5
else
echo "Configure for CPU only system"
./configure --enable-openmp
fi
echo $machine
#if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
# echo "===> Edit Par_file (MemPerCor=50... )"
......@@ -59,7 +81,7 @@ Install(){
Deploy(){
echo "install_dir ="$install_dir
if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ] || [ $machine = "daint-cpu" ] || [ $machine = "daint-gpu" ];then
echo "==> Install on $machine :"
if [ ! -z "$install_dir" ] && [ -d $install_dir ];then
echo "==> Clean installation directory"
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment