Skip to content
GitLab
Menu
Projects
Groups
Snippets
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
UEABS
ueabs
Commits
e09269d1
Commit
e09269d1
authored
Dec 14, 2018
by
Cedric Jourdain
Browse files
Update compile script for GPU
parent
d90353d7
Changes
1
Show whitespace changes
Inline
Side-by-side
specfem3d/compile.sh
View file @
e09269d1
...
@@ -4,6 +4,8 @@ echo "==> Choose supercomputer :"
...
@@ -4,6 +4,8 @@ echo "==> Choose supercomputer :"
echo
" - occigen"
echo
" - occigen"
echo
" - marenostrum "
echo
" - marenostrum "
echo
" - marconi-knl "
echo
" - marconi-knl "
echo
" - daint-gpu "
echo
" - daint-cpu "
read
machine
read
machine
source
./env/env_
${
machine
}
source
./env/env_
${
machine
}
...
@@ -37,17 +39,37 @@ Install(){
...
@@ -37,17 +39,37 @@ Install(){
done
done
if
[
$answer
=
"1"
]
;
then
if
[
$answer
=
"1"
]
;
then
echo
"===> Copy test case A"
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/.
cp
SPECFEM3D_TestCaseA/
*
$install_dir
/specfem3d_globe/DATA/.
rm
-rf
SPECFEM3D_TestCaseA
rm
-rf
SPECFEM3D_TestCaseA
else
else
echo
"===> Copy test case B"
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/.
cp
SPECFEM3D_TestCaseB/
*
$install_dir
/specfem3d_globe/DATA/.
rm
-rf
SPECFEM3D_TestCaseB
rm
-rf
SPECFEM3D_TestCaseB
fi
fi
cd
$install_dir
/specfem3d_globe
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
./configure
--enable-openmp
fi
echo
$machine
echo
$machine
#if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
#if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
# echo "===> Edit Par_file (MemPerCor=50... )"
# echo "===> Edit Par_file (MemPerCor=50... )"
...
@@ -59,7 +81,7 @@ Install(){
...
@@ -59,7 +81,7 @@ Install(){
Deploy
(){
Deploy
(){
echo
"install_dir ="
$install_dir
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
:"
echo
"==> Install on
$machine
:"
if
[
!
-z
"
$install_dir
"
]
&&
[
-d
$install_dir
]
;
then
if
[
!
-z
"
$install_dir
"
]
&&
[
-d
$install_dir
]
;
then
echo
"==> Clean installation directory"
echo
"==> Clean installation directory"
...
...
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment