15 |
echo " (-mpi) use MPI to compile and run on 2 processors" |
echo " (-mpi) use MPI to compile and run on 2 processors" |
16 |
echo " (-MPI) NUMBER use MPI to compile and run on max NUMBER procs" |
echo " (-MPI) NUMBER use MPI to compile and run on max NUMBER procs" |
17 |
echo " (-mfile|-mf) STRING MPI: file with list of possible machines to run on" |
echo " (-mfile|-mf) STRING MPI: file with list of possible machines to run on" |
18 |
echo " (-ieee/-noieee) if possible, use IEEE compiler flags" |
echo " (-fast) use optfile default for compiler flags (no '-ieee')" |
19 |
echo " (DEF=\"-ieee\")" |
echo " DEF=off => use IEEE numerics option (if available)" |
20 |
|
echo " (-devel) use optfile developement flags (if available)" |
21 |
echo " (-gsl) compile with \"-gsl\" flag" |
echo " (-gsl) compile with \"-gsl\" flag" |
22 |
echo " (-use_r4|-ur4) if allowed, use real*4 type for '_RS' variable" |
echo " (-use_r4|-ur4) if allowed, use real*4 type for '_RS' variable" |
23 |
echo " (-optfile|-of) STRING list of optfiles to use" |
echo " (-optfile|-of) STRING list of optfiles to use" |
48 |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
echo " (-match) NUMBER Matching Criteria (number of digits)" |
49 |
echo " (DEF=\"$MATCH_CRIT\")" |
echo " (DEF=\"$MATCH_CRIT\")" |
50 |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
echo " (-j) JOBS use \"make -j JOBS\" for parallel builds" |
51 |
|
echo " (-ef) STRING used as genmake2 \"-extra_flag\" argument" |
52 |
echo " (-clean) *ONLY* run \"make CLEAN\" & clean run-dir" |
echo " (-clean) *ONLY* run \"make CLEAN\" & clean run-dir" |
53 |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
echo " (-norun|-nr) skip the \"runmodel\" stage (stop after make)" |
54 |
|
echo " (-obj) only produces objects (=norun & no executable)" |
55 |
echo " (-runonly|-ro) *ONLY* run stage (=\"-quick\" without make)" |
echo " (-runonly|-ro) *ONLY* run stage (=\"-quick\" without make)" |
56 |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
echo " (-quick|-q) same as \"-nogenmake -noclean -nodepend\"" |
57 |
echo " (-nogenmake|-ng) skip the genmake stage" |
echo " (-nogenmake|-ng) skip the genmake stage" |
251 |
then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi |
then echo testoutput_run: testoutput_var $1 cg2d_init_res 1>&2 ; fi |
252 |
testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$? |
testoutput_var $1 "cg2d_init_res" "Press. Solver (cg2d)" $2 $3; yy=$? |
253 |
if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;; |
if [ $debug -gt 0 ] ; then echo testoutput_run: cg2dres=$yy 1>&2 ; fi ;; |
254 |
'Cost') testoutput_var $1 "ADM precision_derivative_cost" "ADM Cost" $2 $3; yy=$? ;; |
'Cost') testoutput_var $1 "ADM ref_cost_function" "ADM CostFct" $2 $3; yy=$? ;; |
255 |
'Grad') testoutput_var $1 "ADM precision_derivative_grad" "ADM Grad" $2 $3; yy=$? ;; |
'AdGrd') testoutput_var $1 "ADM adjoint_gradient" "ADM Ad Grad" $2 $3; yy=$? ;; |
256 |
|
'FDGrd') testoutput_var $1 "ADM finite-diff_grad" "ADM FD Grad" $2 $3; yy=$? ;; |
257 |
'Tmn') testoutput_var $1 "dynstat_theta_min" "Theta minimum" $2 $3; yy=$? ;; |
'Tmn') testoutput_var $1 "dynstat_theta_min" "Theta minimum" $2 $3; yy=$? ;; |
258 |
'Tmx') testoutput_var $1 "dynstat_theta_max" "Theta maximum" $2 $3; yy=$? ;; |
'Tmx') testoutput_var $1 "dynstat_theta_max" "Theta maximum" $2 $3; yy=$? ;; |
259 |
'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean" $2 $3; yy=$? ;; |
'Tav') testoutput_var $1 "dynstat_theta_mean" "Theta mean" $2 $3; yy=$? ;; |
290 |
'hSImx') testoutput_var $1 "seaice_heff_max" "SIce Heff max" $2 $3; yy=$? ;; |
'hSImx') testoutput_var $1 "seaice_heff_max" "SIce Heff max" $2 $3; yy=$? ;; |
291 |
'hSIav') testoutput_var $1 "seaice_heff_mean" "SIce Heff mean" $2 $3; yy=$? ;; |
'hSIav') testoutput_var $1 "seaice_heff_mean" "SIce Heff mean" $2 $3; yy=$? ;; |
292 |
'hSIsd') testoutput_var $1 "seaice_heff_sd" "SIce Heff StDv" $2 $3; yy=$? ;; |
'hSIsd') testoutput_var $1 "seaice_heff_sd" "SIce Heff StDv" $2 $3; yy=$? ;; |
293 |
|
'uSImn') testoutput_var $1 "seaice_uice_min" "SIce Uice min" $2 $3; yy=$? ;; |
294 |
|
'uSImx') testoutput_var $1 "seaice_uice_max" "SIce Uice max" $2 $3; yy=$? ;; |
295 |
|
'uSIav') testoutput_var $1 "seaice_uice_mean" "SIce Uice mean" $2 $3; yy=$? ;; |
296 |
|
'uSIsd') testoutput_var $1 "seaice_uice_sd" "SIce Uice StDv" $2 $3; yy=$? ;; |
297 |
|
'vSImn') testoutput_var $1 "seaice_vice_min" "SIce Vice min" $2 $3; yy=$? ;; |
298 |
|
'vSImx') testoutput_var $1 "seaice_vice_max" "SIce Vice max" $2 $3; yy=$? ;; |
299 |
|
'vSIav') testoutput_var $1 "seaice_vice_mean" "SIce Vice mean" $2 $3; yy=$? ;; |
300 |
|
'vSIsd') testoutput_var $1 "seaice_vice_sd" "SIce Vice StDv" $2 $3; yy=$? ;; |
301 |
'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $3; yy=$? ;; |
'AthSiG') testoutput_var $1 "thSI_Ice_Area_G" "thSIc Area Global" $2 $3; yy=$? ;; |
302 |
'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South" $2 $3; yy=$? ;; |
'AthSiS') testoutput_var $1 "thSI_Ice_Area_S" "thSIc Area South" $2 $3; yy=$? ;; |
303 |
'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North" $2 $3; yy=$? ;; |
'AthSiN') testoutput_var $1 "thSI_Ice_Area_N" "thSIc Area North" $2 $3; yy=$? ;; |
350 |
if test "x$OPTFILE" != xNONE ; then |
if test "x$OPTFILE" != xNONE ; then |
351 |
command="$command -optfile=$OPTFILE" |
command="$command -optfile=$OPTFILE" |
352 |
fi |
fi |
353 |
if test "x$IEEE" != x ; then |
if test $OptLev = 1 ; then |
354 |
command="$command -ieee" |
command="$command -ieee" |
355 |
|
fi |
356 |
|
if test $OptLev = 0 ; then |
357 |
|
command="$command -devel" |
358 |
fi |
fi |
359 |
if test "x$GSL" = xt ; then |
if test "x$GSL" = xt ; then |
360 |
command="$command -gsl" |
command="$command -gsl" |
369 |
if test "x$USE_R4" = xt ; then |
if test "x$USE_R4" = xt ; then |
370 |
command="$command -use_r4" |
command="$command -use_r4" |
371 |
fi |
fi |
372 |
|
if test "x$EXTRFLG" != x ; then |
373 |
|
command="$command -extra_flag $EXTRFLG" |
374 |
|
fi |
375 |
if test "x$TS" = xt ; then |
if test "x$TS" = xt ; then |
376 |
command="$command -ts" |
command="$command -ts" |
377 |
fi |
fi |
443 |
find . -name "fort.*" -exec rm {} \; |
find . -name "fort.*" -exec rm {} \; |
444 |
find . -type l -exec rm {} \; |
find . -type l -exec rm {} \; |
445 |
#- should remove executable only if sym-link (alredy done above) |
#- should remove executable only if sym-link (alredy done above) |
446 |
rm -f $RUNLOG *.txt STD* *diagnostics.log datetime |
rm -f $RUNLOG *.txt STD* w2_tile_topology.????.log *diagnostics.log datetime |
447 |
rm -rf mnc_test_* |
rm -rf mnc_test_* |
448 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
rm -f *_MIT_CE_000.opt0000 costfunction*0000 |
449 |
echo successful |
echo successful |
492 |
cd $1; |
cd $1; |
493 |
if test -r Makefile ; then |
if test -r Makefile ; then |
494 |
printf 'make ... ' |
printf 'make ... ' |
495 |
if test "x$ADM" = xt ; then |
if test "x$REPLMAKE" = x ; then |
496 |
$MAKE adall >> make.tr_log 2>&1 |
$MAKE $TARG >> make.tr_log 2>&1 |
497 |
elif test "x$OADM" = xt ; then |
else |
498 |
$MAKE adAll >> make.tr_log 2>&1 |
$REPLMAKE $TARG >> make.tr_log 2>&1 |
|
else |
|
|
if test "x$JOBS" = x ; then |
|
|
$MAKE >> make.tr_log 2>&1 |
|
|
else |
|
|
$MAKE -j $JOBS >> make.tr_log 2>&1 |
|
|
fi |
|
499 |
fi |
fi |
500 |
RETVAL=$? |
RETVAL=$? |
501 |
if test "x$RETVAL" != x0 ; then |
if test "x$RETVAL" != x0 ; then |
502 |
tail make.tr_log |
tail make.tr_log |
503 |
echo failed |
echo failed |
504 |
cp make.tr_log genmake.log genmake.tr_log $CDIR |
cp genmake.log genmake.tr_log $CDIR |
505 |
|
tail -$NBLINES_MKLOG make.tr_log > $CDIR"/make.tr_log_tail" |
506 |
rm -f $EXECUTABLE |
rm -f $EXECUTABLE |
507 |
mk_fail=1 |
mk_fail=1 |
508 |
else |
else |
526 |
|
|
527 |
mk_mpi_size() |
mk_mpi_size() |
528 |
{ |
{ |
529 |
# mk_mpi_size input_file output_file proc_Nb prefer_to_split_X |
# mk_mpi_size input_file output_file proc_Nb threads_Nb_X threads_Nb_Y |
530 |
# |
# |
531 |
# make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file) |
# make new SIZE.h (=output_file) from SIZE.h_mpi (=input_file) |
532 |
# for an MPI build with no more than proc_Nb processors ; |
# for an MPI build with no more than proc_Nb processors ; |
533 |
# return the effective number of processors. |
# ensure that enough tiles per proc (nSx,nSy) remain for the given |
534 |
|
# number of threads (nTx,nTy) ; |
535 |
|
# return the effective number of processors. |
536 |
|
|
537 |
inp=$1 |
inp=$1 |
538 |
out=$2 |
out=$2 |
539 |
np=$3 |
np=$3 |
540 |
dirX=$4 |
tx=$4 |
541 |
|
ty=$5 |
542 |
tmp=TTT.$$ |
tmp=TTT.$$ |
543 |
|
|
544 |
|
# dirX : select with direction to favor in MPI process repartition |
545 |
|
# dirX=1 : prefer to put more proc in X direction |
546 |
|
# dirX=0 : prefer to put more proc in Y direction |
547 |
|
dirX=0 |
548 |
|
|
549 |
px=`grep "^ & *nPx *=" $inp | sed "s/^ & *nPx *= *//" | sed 's/, *$//'` |
px=`grep "^ & *nPx *=" $inp | sed "s/^ & *nPx *= *//" | sed 's/, *$//'` |
550 |
py=`grep "^ & *nPy *=" $inp | sed "s/^ & *nPy *= *//" | sed 's/, *$//'` |
py=`grep "^ & *nPy *=" $inp | sed "s/^ & *nPy *= *//" | sed 's/, *$//'` |
551 |
sx=`grep "^ & *nSx *=" $inp | sed "s/^ & *nSx *= *//" | sed 's/, *$//'` |
sx=`grep "^ & *nSx *=" $inp | sed "s/^ & *nSx *= *//" | sed 's/, *$//'` |
552 |
sy=`grep "^ & *nSy *=" $inp | sed "s/^ & *nSy *= *//" | sed 's/, *$//'` |
sy=`grep "^ & *nSy *=" $inp | sed "s/^ & *nSy *= *//" | sed 's/, *$//'` |
553 |
|
|
554 |
|
#- for each direction, assume # of threads is a multiple of total number of tiles |
555 |
|
nx=$px |
556 |
|
if [ `expr $sx % $tx` -ne 0 -a `expr $sx \* $px % $tx` -eq 0 ] ; then |
557 |
|
nx=`expr $sx \* $px / $tx` |
558 |
|
if [ $verbose -gt 1 ]; then |
559 |
|
echo " change px from $px to $nx to accommodate $tx threads" |
560 |
|
fi |
561 |
|
fi |
562 |
|
ny=$py |
563 |
|
if [ `expr $sy % $ty` -ne 0 -a `expr $sy \* $py % $ty` -eq 0 ] ; then |
564 |
|
ny=`expr $sy \* $py / $ty` |
565 |
|
if [ $verbose -gt 1 ]; then |
566 |
|
echo " change py from $py to $ny to accommodate $ty threads" |
567 |
|
fi |
568 |
|
fi |
569 |
#- find the largest divisor of input_file proc Nb, but not larger than $np |
#- find the largest divisor of input_file proc Nb, but not larger than $np |
570 |
pp=0 |
pp=0 |
571 |
i=1 |
i=1 |
572 |
while [ $i -le $px ] ; do |
while [ $i -le $nx ] ; do |
573 |
if [ `expr $px % $i` -eq 0 ] ; then |
if [ `expr $nx % $i` -eq 0 ] ; then |
574 |
j=1 |
j=1 |
575 |
while [ $j -le $py ] ; do |
while [ $j -le $ny ] ; do |
576 |
if [ `expr $py % $j` -eq 0 ] ; then |
if [ `expr $ny % $j` -eq 0 ] ; then |
577 |
ij=`expr $i \* $j` |
ij=`expr $i \* $j` |
578 |
if [ $ij -gt $pp ] ; then |
if [ $ij -gt $pp ] ; then |
579 |
flag=1 |
flag=1 |
951 |
# Default properties |
# Default properties |
952 |
debug=0 |
debug=0 |
953 |
verbose=1 |
verbose=1 |
954 |
|
NBLINES_MKLOG=16000 |
955 |
|
|
956 |
IEEE=true |
OptLev=1 |
|
if test "x$MITGCM_IEEE" != x ; then |
|
|
IEEE=$MITGCM_IEEE |
|
|
fi |
|
957 |
GSL=f |
GSL=f |
958 |
|
|
959 |
CLEANUP=f |
CLEANUP=f |
978 |
if test "x$MAKE" = x ; then |
if test "x$MAKE" = x ; then |
979 |
MAKE=make |
MAKE=make |
980 |
fi |
fi |
981 |
|
REPLMAKE= |
982 |
if test "x$CC" = x ; then |
if test "x$CC" = x ; then |
983 |
CC=cc |
CC=cc |
984 |
fi |
fi |
985 |
JOBS= |
JOBS= |
986 |
|
TARG= |
987 |
MPI=0 |
MPI=0 |
988 |
MPI_MFILE= |
MPI_MFILE= |
989 |
MULTI_THREAD=f |
MULTI_THREAD=f |
990 |
OUTDIR= |
OUTDIR= |
991 |
DELDIR= |
DELDIR= |
992 |
USE_R4= |
USE_R4= |
993 |
|
EXTRFLG= |
994 |
|
|
995 |
ADM= |
ADM= |
996 |
OADM= |
OADM= |
1043 |
-make | --make | -m | --m) ac_prev=MAKE ;; |
-make | --make | -m | --m) ac_prev=MAKE ;; |
1044 |
-make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;; |
-make=* | --make=* | -m=* | --m=*) MAKE=$ac_optarg ;; |
1045 |
|
|
1046 |
|
-repl_mk | --repl_mk ) ac_prev=REPLMAKE ;; |
1047 |
|
-repl_mk=* | --repl_mk=*) REPLMAKE=$ac_optarg ;; |
1048 |
|
|
1049 |
-odir | --odir) ac_prev=OUTDIR ;; |
-odir | --odir) ac_prev=OUTDIR ;; |
1050 |
-odir=* | --odir=*) OUTDIR=$ac_optarg ;; |
-odir=* | --odir=*) OUTDIR=$ac_optarg ;; |
1051 |
|
|
1058 |
-j | --j) ac_prev=JOBS ;; |
-j | --j) ac_prev=JOBS ;; |
1059 |
-j=* | --j=*) JOBS=$ac_optarg ;; |
-j=* | --j=*) JOBS=$ac_optarg ;; |
1060 |
|
|
1061 |
|
-ef | --ef) ac_prev=EXTRFLG ;; |
1062 |
|
-ef=* | --ef=*) EXTRFLG=$ac_optarg ;; |
1063 |
|
|
1064 |
-clean | --clean) CLEANUP=t ; DELDIR=t ;; |
-clean | --clean) CLEANUP=t ; DELDIR=t ;; |
1065 |
|
|
1066 |
-norun | --norun | -nr | --nr) NORUN=t ;; |
-norun | --norun | -nr | --nr) NORUN=t ;; |
1067 |
|
-obj | --obj ) TARG='obj' ; NORUN=t ;; |
1068 |
-runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;; |
-runonly | --runonly | -ro | --ro) QUICK=t ; NOMAKE=t ;; |
1069 |
-quick | --quick | -q | --q) QUICK=t ;; |
-quick | --quick | -q | --q) QUICK=t ;; |
1070 |
-nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;; |
-nogenmake | --nogenmake | -ng | --ng) NOGENMAKE=t ;; |
1086 |
-adm | -ad) ADM=t ;; |
-adm | -ad) ADM=t ;; |
1087 |
-oad) OADM=t; NODEPEND=t ;; |
-oad) OADM=t; NODEPEND=t ;; |
1088 |
|
|
1089 |
-ieee) IEEE=true ;; |
-ieee) echo "Warning: ignore option '-ieee' (already the default)" |
1090 |
-noieee) IEEE= ;; |
printf " ... " ;; |
1091 |
|
-noieee) echo "Warning: will use option '-fast' instead of '-noieee' (obsolete)" |
1092 |
|
printf " ... " ; OptLev=`expr $OptLev \* 2` ;; |
1093 |
|
-fast) OptLev=`expr $OptLev \* 2` ;; |
1094 |
|
-devel) OptLev=0 ;; |
1095 |
-gsl) GSL=t ;; |
-gsl) GSL=t ;; |
1096 |
|
|
1097 |
-verbose) verbose=2 ;; |
-verbose) verbose=2 ;; |
1140 |
|
|
1141 |
#- setting for forward or ADM testing |
#- setting for forward or ADM testing |
1142 |
if test "x$ADM" = xt ; then |
if test "x$ADM" = xt ; then |
1143 |
|
if test "x$TARG" = xobj ; then TARG=adobj ; else TARG=adall ; fi |
1144 |
code_dir=code_ad |
code_dir=code_ad |
1145 |
inputdir=input_ad |
inputdir=input_ad |
1146 |
ref_outp="output_adm.txt" |
ref_outp="output_adm.txt" |
1147 |
EXECUTABLE="mitgcmuv_ad" |
EXECUTABLE="mitgcmuv_ad" |
1148 |
elif test "x$OADM" = xt ; then |
elif test "x$OADM" = xt ; then |
1149 |
|
TARG=adAll |
1150 |
code_dir=code_oad |
code_dir=code_oad |
1151 |
inputdir=input_oad |
inputdir=input_oad |
1152 |
ref_outp="output_oadm.txt" |
ref_outp="output_oadm.txt" |
1153 |
EXECUTABLE="mitgcmuv_ad" |
EXECUTABLE="mitgcmuv_ad" |
1154 |
else |
else |
1155 |
|
if test "x$JOBS" != x ; then TARG="-j $JOBS $TARG" ; fi |
1156 |
code_dir=code |
code_dir=code |
1157 |
inputdir=input |
inputdir=input |
1158 |
ref_outp="output.txt" |
ref_outp="output.txt" |
1231 |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
ii=`echo $EMPTY_RESULTS | awk '{print NF}'` |
1232 |
EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf " ."}}'` |
EMPTY_RESULTS=$EMPTY_RESULTS`expr $LEN_CHECK_LIST - $ii | awk 'BEGIN{FS=":"}{for(i=1;i<=$1;i++){printf " ."}}'` |
1233 |
else |
else |
1234 |
DEF_CHECK_LIST='Grad Cost Grad' |
DEF_CHECK_LIST='AdGrd Cost AdGrd FDGrd' |
1235 |
EMPTY_RESULTS='.. ..' |
EMPTY_RESULTS='.. .. ..' |
1236 |
LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'` |
LEN_CHECK_LIST=`echo $DEF_CHECK_LIST | sed 's/ [a-zA-Z0-9]*+/&mn &mx &av &sd/g' | awk '{print NF-1}'` |
1237 |
fi |
fi |
1238 |
|
|
1318 |
else line_0="default "$MATCH_CRIT ; fi |
else line_0="default "$MATCH_CRIT ; fi |
1319 |
line_0="$line_0 ----T----- ----S----- ----U----- ----V-----" |
line_0="$line_0 ----T----- ----S----- ----U----- ----V-----" |
1320 |
line_1="G D M c m s m s m s m s" |
line_1="G D M c m s m s m s m s" |
1321 |
line_2="E p a R g m m e . m m e . m m e . m m e ." |
line_2="e p a R g m m e . m m e . m m e . m m e ." |
1322 |
line_3="N n k u 2 i a a d i a a d i a a d i a a d" |
line_3="n n k u 2 i a a d i a a d i a a d i a a d" |
1323 |
line_4="2 d e n d n x n . n x n . n x n . n x n ." |
line_4="2 d e n d n x n . n x n . n x n . n x n ." |
1324 |
for ii in $PTRACERS_NUM ; do |
for ii in $PTRACERS_NUM ; do |
1325 |
line_0="$line_0 --PTR 0"$ii"--" |
line_0="$line_0 --PTR 0"$ii"--" |
1342 |
else line_0="default "$MATCH_CRIT ; fi |
else line_0="default "$MATCH_CRIT ; fi |
1343 |
echo "$line_0" | tee -a $SUMMARY |
echo "$line_0" | tee -a $SUMMARY |
1344 |
cat << EOF | tee -a $SUMMARY |
cat << EOF | tee -a $SUMMARY |
1345 |
G D M C G |
G D M C A F |
1346 |
E p a R o r |
e p a R o d D |
1347 |
N n k u s a |
n n k u s G G |
1348 |
2 d e n t d |
2 d e n t r r |
1349 |
|
|
1350 |
EOF |
EOF |
1351 |
fi |
fi |
1407 |
fi |
fi |
1408 |
|
|
1409 |
if test "x$MPI" != "x0" ; then |
if test "x$MPI" != "x0" ; then |
1410 |
prefer_X=0 |
ntx=1 ; nty=1 |
1411 |
if test "x$MULTI_THREAD" = "xt" ; then |
if test "x$MULTI_THREAD" = "xt" ; then |
1412 |
retv=`check_eedata $dir"/input/eedata.mth"` |
ff=$dir"/input/eedata.mth" |
1413 |
if test $retv = 1 ; then prefer_X=1 ; fi |
ntx=`grep "^ *nTx *=" $ff | tail -1 | sed 's/^ *nTx *= *//' | sed "s/, *$//"` |
1414 |
|
nty=`grep "^ *nTy *=" $ff | tail -1 | sed 's/^ *nTy *= *//' | sed "s/, *$//"` |
1415 |
fi |
fi |
1416 |
#- create new SIZE.h with no more than '$MPI' Procs |
#- create new SIZE.h with no more than '$MPI' Procs |
1417 |
mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI $prefer_X |
mk_mpi_size $CODE_DIR"/SIZE.h_mpi" $BUILD_DIR"/tr_size.mpi" $MPI $ntx $nty |
1418 |
LOC_NPROC=$? |
LOC_NPROC=$? |
1419 |
( cd $BUILD_DIR |
( cd $BUILD_DIR |
1420 |
if test -r SIZE.h.mpi ; then |
if test -r SIZE.h.mpi ; then |
1576 |
if test "x$RETVAL" = x0 ; then |
if test "x$RETVAL" = x0 ; then |
1577 |
echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state |
echo "from '$gmkLog', extract compiler version:" >> $DRESULTS/genmake_state |
1578 |
sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \ |
sed -n '/Get compiler version/,/<-- compiler version/p' $gmkLog \ |
1579 |
| grep -v '^... compiler version ' > tr_1.tmp_log |
| grep -v '^... compiler version ' > tr_1.tmp_log |
1580 |
sed -n '1,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \ |
sed -n '1p' tr_1.tmp_log >> $DRESULTS/genmake_state |
1581 |
|
sed -n '2,/^$/p' tr_1.tmp_log | sed '/^$/d' | sed 's/^./ &/' \ |
1582 |
>> $DRESULTS/genmake_state |
>> $DRESULTS/genmake_state |
1583 |
rm -f tr_1.tmp_log |
rm -f tr_1.tmp_log |
1584 |
fi |
fi |