20 |
# MPI test (for now, only with gfortran) |
# MPI test (for now, only with gfortran) |
21 |
source $HOME/bin/openmpi.sh |
source $HOME/bin/openmpi.sh |
22 |
|
|
23 |
#- method to acces CVS: |
#- method to access CVS: |
24 |
# cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack' |
# cmdCVS='cvs -d :pserver:cvsanon@mitgcm.org:/u/gcmpack' |
25 |
# cmdCVS='cvs -d /u/gcmpack' |
# cmdCVS='cvs -d /u/gcmpack' |
26 |
export CVS_RSH=ssh |
export CVS_RSH=ssh |
27 |
cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack' |
cmdCVS='cvs -q -d :ext:jmc@mitgcm.org:/u/gcmpack' |
28 |
|
|
29 |
#- and which GitHub repository to use: |
#- which GitHub repository to use and how to access it: |
30 |
git_repo='MITgcm'; git_code='MITgcm' |
git_repo='MITgcm'; git_code='MITgcm' ; git_other='verification_other' |
31 |
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
#git_repo='altMITgcm'; #git_code='MITgcm66h' |
32 |
|
#-- |
33 |
|
git_repo="https://github.com/$git_repo" |
34 |
|
#git_repo="git://github.com/$git_repo" |
35 |
|
#git_repo="git@github.com:$git_repo" |
36 |
|
|
37 |
|
|
38 |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
# checkOut=3 : clone from GitHub and make a new copy (if sepDir) |
39 |
# =2 : update (git pull) repo and make a new copy code (switch to 2 if no repo) |
# =2 : update (git pull) repo and make a new copy code (switch to 2 if no repo) |
96 |
cd $tdir |
cd $tdir |
97 |
|
|
98 |
#---- Making a new clone or updating existing one: |
#---- Making a new clone or updating existing one: |
99 |
if test -e MITgcm/.git/config ; then |
if [ $checkOut -eq 2 ] ; then |
100 |
echo MITgcm/.git/config 'exist' |
if test -e $git_code/.git/config ; then |
101 |
else |
echo $git_code/.git/config 'exist' |
102 |
echo -n MITgcm/.git/config 'missing ; ' |
else |
103 |
checkOut=3 |
echo -n $git_code/.git/config 'missing ; ' |
104 |
echo "will get new clone ( checkOut=$checkOut )" |
checkOut=3 |
105 |
|
echo "will get new clone ( checkOut=$checkOut )" |
106 |
|
fi |
107 |
|
if test -e $git_other/.git/config ; then |
108 |
|
echo $git_other/.git/config 'exist' |
109 |
|
else |
110 |
|
echo -n $git_other/.git/config 'missing ; ' |
111 |
|
checkOut=3 |
112 |
|
echo "will get new clone ( checkOut=$checkOut )" |
113 |
|
fi |
114 |
fi |
fi |
115 |
if [ $checkOut -eq 3 ] ; then |
if [ $checkOut -eq 3 ] ; then |
116 |
echo -n "Make a clone of $git_code from repo: $git_repo ..." |
test -e $git_code && rm -rf $git_code |
117 |
git clone https://github.com/$git_repo/${git_code}.git 2> $tmpFil |
echo "Make a clone of $git_code from repo: $git_repo ..." |
118 |
|
git clone $git_repo/${git_code}.git 2> $tmpFil |
119 |
|
retVal=$? |
120 |
|
if test $retVal = 0 ; then |
121 |
|
echo ' --> done!' |
122 |
|
rm -f $tmpFil |
123 |
|
else |
124 |
|
echo " Error: 'git clone' returned: $retVal" |
125 |
|
cat $tmpFil |
126 |
|
rm -f $tmpFil |
127 |
|
exit 2 |
128 |
|
fi |
129 |
|
test -e $git_other && rm -rf $git_other |
130 |
|
echo "Make a clone of $git_other from repo: $git_repo ..." |
131 |
|
git clone $git_repo/${git_other}.git 2> $tmpFil |
132 |
retVal=$? |
retVal=$? |
133 |
if test $retVal = 0 ; then |
if test $retVal = 0 ; then |
134 |
echo ' --> done!' |
echo ' --> done!' |
142 |
else |
else |
143 |
echo "Updating current clone ( $git_code ) ..." |
echo "Updating current clone ( $git_code ) ..." |
144 |
( cd $git_code ; git pull ) |
( cd $git_code ; git pull ) |
145 |
echo ' --> done!' |
retVal=$? |
146 |
|
if test $retVal = 0 ; then |
147 |
|
echo ' --> done!' |
148 |
|
else |
149 |
|
echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit" |
150 |
|
exit 3 |
151 |
|
fi |
152 |
|
echo "Updating current clone ( $git_other ) ..." |
153 |
|
( cd $git_other ; git pull ) |
154 |
|
retVal=$? |
155 |
|
if test $retVal = 0 ; then |
156 |
|
echo ' --> done!' |
157 |
|
else |
158 |
|
echo "git pull on '"`hostname`"' fail (return val=$retVal) => exit" |
159 |
|
exit 3 |
160 |
|
fi |
161 |
|
( cd $git_other ; git checkout master ) |
162 |
fi |
fi |
|
|
|
163 |
#---- making a new working copy: MITgcm_today |
#---- making a new working copy: MITgcm_today |
164 |
( cd $git_code ; git checkout master ) |
( cd $git_code ; git checkout master ) |
|
# mkdir MITgcm_today |
|
|
# cp -p -ra $git_code/* MITgcm_today |
|
165 |
rsync -a $git_code/ MITgcm_today --exclude '.git' |
rsync -a $git_code/ MITgcm_today --exclude '.git' |
166 |
|
if test $sepDir = 0 ; then |
167 |
|
echo -n " make a local copy of $git_other in MITgcm_today ..." | tee -a $tdir/output_$tt |
168 |
|
( cd MITgcm_today |
169 |
|
rsync -a ../$git_other/ $git_other --exclude '.git' ) |
170 |
|
echo " done" | tee -a $tdir/output_$tt |
171 |
|
fi |
172 |
#---- updating "other_input" dir |
#---- updating "other_input" dir |
173 |
if test -d other_input ; then |
if test -d other_input ; then |
174 |
list_dirs=`(cd other_input ; ls 2> /dev/null )` |
list_dirs=`(cd other_input ; ls 2> /dev/null )` |
294 |
echo " missing dir verification --> end test $tt" | tee -a $tdir/output_$tt |
echo " missing dir verification --> end test $tt" | tee -a $tdir/output_$tt |
295 |
continue |
continue |
296 |
fi |
fi |
297 |
#-- download additional experience from Contrib: |
if test "x$addExp" != x ; then |
298 |
|
echo -n " make a local copy of $git_other ..." | tee -a $tdir/output_$tt |
299 |
|
rsync -a $tdir/$git_other/ $git_other --exclude '.git' |
300 |
|
echo " done" | tee -a $tdir/output_$tt |
301 |
|
fi |
302 |
|
#-- add additional experience from $git_other |
303 |
for exp2add in $addExp ; do |
for exp2add in $addExp ; do |
304 |
echo " add dir: $exp2add (from Contrib:verification_other)" | tee -a $tdir/output_$tt |
echo " add link: $exp2add (from $git_other )" | tee -a $tdir/output_$tt |
305 |
( cd verification ; $cmdCVS co -P -d $exp2add \ |
( cd verification ; ln -s ../$git_other/$exp2add . ) |
|
MITgcm_contrib/verification_other/$exp2add > /dev/null ) |
|
306 |
if test $exp2add = 'global_oce_cs32' ; then |
if test $exp2add = 'global_oce_cs32' ; then |
307 |
echo " link dir 'other_input/core2_cnyf' in here" | tee -a $tdir/output_$tt |
echo " link dir 'other_input/core2_cnyf' in here" | tee -a $tdir/output_$tt |
308 |
( cd verification/${exp2add} |
( cd verification/${exp2add} |
309 |
ln -s ../../../other_input/core2_cnyf . ) |
ln -s ../../../other_input/core2_cnyf . ) |
310 |
fi |
fi |
311 |
if test $exp2add = 'shelfice_remeshing' ; then |
#if test $exp2add = 'shelfice_remeshing' ; then |
312 |
echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt |
# echo " link dir 'other_input/remeshing_code' to 'extra_code'" | tee -a $tdir/output_$tt |
313 |
( cd verification/${exp2add} |
# ( cd verification/${exp2add} |
314 |
ln -s ../../../other_input/remeshing_code extra_code ) |
# ln -s ../../../other_input/remeshing_code extra_code ) |
315 |
fi |
#fi |
316 |
done |
done |
317 |
fi |
fi |
318 |
else |
else |