Skip to content
GitLab
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
dbc76fe4
Commit
dbc76fe4
authored
Dec 07, 2018
by
Cedric Jourdain
🐵
Browse files
Add compile script template
parent
967e5cd9
Changes
1
Show whitespace changes
Inline
Side-by-side
specfem3d/compile.sh
0 → 100755
View file @
dbc76fe4
#!/bin/bash
echo
"==> Choose supercomputer :"
echo
" - occigen"
echo
" - marenostrum "
echo
" - marconi-knl "
read
machine
source
./env/env_
${
machine
}
Untar
(){
echo
"==> Untar "
#Clone the repository
cd
$install_dir
git
-c
http.sslVerify
=
false
clone https://github.com/geodynamics/specfem3d_globe.git
# Checkout of 31 ocotbre 2017 version
cd
specfem3d_globe/
git checkout b1d6ba966496f269611eff8c2cf1f22bcdac2bd9
#Copy sources
#source_dir=$HOME/git/specfem3d_globe
#echo "Copy source"
#cp -r $source_dir $install_dir
cd
$ueabs_dir
}
Install
(){
echo
"===> Configure "
answer
=
0
echo
"1. Test Case A is designed to run on Tier-1 sized systems (up to around 1,000 x86 cores, or equivalent)"
echo
"2. Test Case B is designed to run on Tier-0 sized systems (up to around 10,000 x86 cores, or equivalent)"
while
true
do
echo
"===> Choose Test Case : (1 or 2)"
read
answer
if
[[
$answer
-eq
1
||
$answer
-eq
2
]]
;
then
break
;
fi
done
if
[
$answer
=
"1"
]
;
then
echo
"===> Copy test case A"
tar
zxvf SPECFEM3D_TestCaseA.tar.gz
cp
SPECFEM3D_TestCaseA/
*
$install_dir
/specfem3d_globe/DATA/.
rm
-rf
SPECFEM3D_TestCaseA
else
echo
"===> Copy test case B"
tar
zxvf SPECFEM3D_TestCaseB.tar.gz
cp
SPECFEM3D_TestCaseB/
*
$install_dir
/specfem3d_globe/DATA/.
rm
-rf
SPECFEM3D_TestCaseB
fi
cd
$install_dir
/specfem3d_globe
./configure
--enable-openmp
echo
$machine
#if [ $machine = "occigen" ] || [ $machine = "marenostrum" ] || [ $machine = "marconi-knl" ];then
# echo "===> Edit Par_file (MemPerCor=50... )"
# sed -i s/"MEMORY_INSTALLED_PER_CORE_IN_GB = 2.5d0"/"MEMORY_INSTALLED_PER_CORE_IN_GB = 50d0"/g DATA/Par_file
#fi
echo
"===> Build"
time
-p
make
-j
12 all
>
& make.log &
}
Deploy
(){
echo
"install_dir ="
$install_dir
if
[
$machine
=
"occigen"
]
||
[
$machine
=
"marenostrum"
]
||
[
$machine
=
"marconi-knl"
]
;
then
echo
"==> Install on
$machine
:"
if
[
!
-z
"
$install_dir
"
]
&&
[
-d
$install_dir
]
;
then
echo
"==> Clean installation directory"
rm
-rf
$install_dir
fi
mkdir
-p
$install_dir
export
ueabs_dir
=
`
pwd
`
Untar
Install
else
echo
"Wrong machine !"
exit
fi
}
Deploy
Write
Preview
Supports
Markdown
0%
Try again
or
attach a new 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