450 |
if test "x$ADM" = x ; then |
if test "x$ADM" = x ; then |
451 |
files=`( cd ../input ; ls -1 | grep -v CVS )` |
files=`( cd ../input ; ls -1 | grep -v CVS )` |
452 |
for i in $files ; do |
for i in $files ; do |
453 |
if test ! -d "../input/"$i ; then |
if test ! -d "../input/"$i -a ! -f $i ; then |
454 |
ln -sf "../input/"$i $i |
ln -sf "../input/"$i $i |
455 |
fi |
fi |
456 |
done |
done |
520 |
int main( int argc, char** argv ) { |
int main( int argc, char** argv ) { |
521 |
int linnum,best,lncnt; |
int linnum,best,lncnt; |
522 |
double a,b,abave,relerr; |
double a,b,abave,relerr; |
523 |
best = -16; |
best = -22; |
524 |
lncnt = 0; |
lncnt = 0; |
525 |
while( 1 & (lncnt+=1) < 999 ) { |
while( 1 & (lncnt+=1) < 999 ) { |
526 |
scanf("%d", &linnum); |
scanf("%d", &linnum); |
529 |
abave = 0.5*(fabs(a)+fabs(b)); |
abave = 0.5*(fabs(a)+fabs(b)); |
530 |
if (abave > 0.0) { |
if (abave > 0.0) { |
531 |
relerr=fabs(a-b)/abave; |
relerr=fabs(a-b)/abave; |
532 |
if (relerr > 0.0) { |
if (relerr > 0.0) { linnum = (int)log10(relerr); } |
533 |
linnum = (int)log10(relerr); |
else { linnum = -16 ; } |
534 |
best = (best > linnum) ? best : linnum; |
best = (best > linnum) ? best : linnum; |
|
} |
|
|
} |
|
|
else { |
|
|
if (best == -16) best = -22; |
|
535 |
} |
} |
536 |
} |
} |
537 |
if (lncnt == 999) best=-29; |
if (lncnt == 999) best=-29; |
539 |
return 0; |
return 0; |
540 |
} |
} |
541 |
EOF |
EOF |
542 |
cc -o tmp_cmpnum tmp_cmpnum.c -lm |
$CC -o tmp_cmpnum tmp_cmpnum.c -lm |
543 |
|
|
544 |
if [ -x ./tmp_cmpnum ]; then |
if [ -x ./tmp_cmpnum ]; then |
545 |
echo "OK" |
echo "OK" |
546 |
return 0 |
return 0 |
547 |
else |
else |
548 |
echo |
echo |
549 |
echo "ERROR: failed to compile comparison code" |
echo "ERROR: failed to compile comparison code -- please specify" |
550 |
|
echo " a C compiler using the CC environment variable." |
551 |
exit 1 |
exit 1 |
552 |
fi |
fi |
553 |
} |
} |
636 |
HAVE_MPACK= |
HAVE_MPACK= |
637 |
MPACK="$MPACKDIR/mpack" |
MPACK="$MPACKDIR/mpack" |
638 |
COMMAND= |
COMMAND= |
639 |
MAKE=make |
if test "x$MAKE" = x ; then |
640 |
|
MAKE=make |
641 |
|
fi |
642 |
|
if test "x$CC" = x ; then |
643 |
|
CC=cc |
644 |
|
fi |
645 |
JOBS= |
JOBS= |
646 |
MPI=f |
MPI=f |
647 |
DELDIR= |
DELDIR= |
970 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
971 |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
972 |
|
|
|
OLD_COMMAND=$COMMAND |
|
|
COMMAND="./mitgcmuv > output.txt" |
|
973 |
for ex in $extra_runs ; do |
for ex in $extra_runs ; do |
974 |
test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex" |
test -e "$dir/tr_run.$ex" && rm -rf "$dir/tr_run.$ex" |
975 |
mkdir "$dir/tr_run.$ex" |
mkdir "$dir/tr_run.$ex" |
1002 |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
echo "DATE='$DATE'" >> $CDIR"/summary.txt" |
1003 |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
echo "tdir='$dir'" >> $CDIR"/summary.txt" |
1004 |
done |
done |
|
COMMAND=$OLD_COMMAND |
|
1005 |
else |
else |
1006 |
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
fres=`printf '%s %s %s %s' ${genmake:-N} ${makedepend:-N} ${make:-N} ${run:-N}` |
1007 |
fres=$fres"$results $dir" |
fres=$fres"$results $dir" |