9 |
# modified by aja 01/00 |
# modified by aja 01/00 |
10 |
|
|
11 |
# Default lists |
# Default lists |
12 |
set DISABLE = ( aim autodiff cal cost ctrl ecco exf grdchk ) |
set DISABLE = ( aim autodiff cal cost ctrl ecco exf grdchk flt ) |
13 |
set DEFINES = ( ) |
set DEFINES = ( ) |
14 |
set ENABLE = ( ) |
set ENABLE = ( ) |
15 |
set MODS = ( ) |
set MODS = ( ) |
133 |
# If platform wasn't specified then determine platform type of the host |
# If platform wasn't specified then determine platform type of the host |
134 |
if (! $?platform) then |
if (! $?platform) then |
135 |
set platform = (`uname`) |
set platform = (`uname`) |
136 |
|
# This let's us distinguish between different Linux platforms |
137 |
|
if ($platform == Linux) then |
138 |
|
set machine = (`uname -m`) |
139 |
|
set platform = ($platform'-'$machine) |
140 |
|
endif |
141 |
endif |
endif |
142 |
# If name of makefile wasn't specified then use default "Makefile" |
# If name of makefile wasn't specified then use default "Makefile" |
143 |
if (! $?mfile) set mfile = ( Makefile ) |
if (! $?mfile) set mfile = ( Makefile ) |
264 |
set DEFINES = ($DEFINES '-DDISABLE_MOM_FLUXFORM'); breaksw |
set DEFINES = ($DEFINES '-DDISABLE_MOM_FLUXFORM'); breaksw |
265 |
case mom_vecinv: |
case mom_vecinv: |
266 |
set DEFINES = ($DEFINES '-DDISABLE_MOM_VECINV'); breaksw |
set DEFINES = ($DEFINES '-DDISABLE_MOM_VECINV'); breaksw |
267 |
|
case generic_advdiff: |
268 |
|
set DEFINES = ($DEFINES '-DDISABLE_GENERIC_ADVDIFF'); breaksw |
269 |
default: |
default: |
270 |
breaksw |
breaksw |
271 |
endsw |
endsw |
287 |
# Platform specific options are chosen below |
# Platform specific options are chosen below |
288 |
set LN = ( 'ln -s' ) |
set LN = ( 'ln -s' ) |
289 |
set CPP = ( '/lib/cpp -P' ) |
set CPP = ( '/lib/cpp -P' ) |
290 |
set S64 = ( '\$(TOOLSDIR)/set64bitConst.sh' ) |
set S64 = ( '$(TOOLSDIR)/set64bitConst.sh' ) |
291 |
set KPP = ( ) |
set KPP = ( ) |
292 |
set FC = ( 'f77' ) |
set FC = ( 'f77' ) |
293 |
set LINK = ( 'f77' ) |
set LINK = ( 'f77' ) |
393 |
case SunOS: |
case SunOS: |
394 |
set LN = ( '/usr/bin/ln -s' ) |
set LN = ( '/usr/bin/ln -s' ) |
395 |
set CPP = ( '/usr/ccs/lib/cpp -P' ) |
set CPP = ( '/usr/ccs/lib/cpp -P' ) |
|
set S64 = ( cat ) |
|
396 |
set DEFINES = ( ${DEFINES} '-DTARGET_SUN -DWORDLENGTH=4 -D_d=E' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_SUN -DWORDLENGTH=4 -D_d=E' ) |
397 |
set FFLAGS = ( '-stackvar -explicitpar -vpara -e -u -noautopar -r8 -i4 -fsimple=0' ) |
set FFLAGS = ( '-stackvar -explicitpar -vpara -e -u -noautopar -r8 -i4 -fsimple=0' ) |
398 |
set FOPTIM = ( '-dalign -O3 -xarch=v9' ) |
set FOPTIM = ( '-dalign -O3 -xarch=v9' ) |
403 |
case SunOS+mpi: |
case SunOS+mpi: |
404 |
set LN = ( '/usr/bin/ln -s' ) |
set LN = ( '/usr/bin/ln -s' ) |
405 |
set CPP = ( '/usr/ccs/lib/cpp -P' ) |
set CPP = ( '/usr/ccs/lib/cpp -P' ) |
|
set S64 = ( cat ) |
|
406 |
set DEFINES = ( ${DEFINES} '-DTARGET_SUN -DWORDLENGTH=4 -D_d=E' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_SUN -DWORDLENGTH=4 -D_d=E' ) |
407 |
set INCLUDES = ( '-I/usr/local/mpi/include' ) |
set INCLUDES = ( '-I/usr/local/mpi/include' ) |
408 |
set LIBS = ( '-L/usr/local/mpi/lib/solaris/ch_shmem -lmpi -lthread' \ |
set LIBS = ( '-L/usr/local/mpi/lib/solaris/ch_shmem -lmpi -lthread' \ |
438 |
set NOOPTFILES = ( 'barrier.F different_multiple.F' \ |
set NOOPTFILES = ( 'barrier.F different_multiple.F' \ |
439 |
'external_fields_load.F' ) |
'external_fields_load.F' ) |
440 |
breaksw |
breaksw |
441 |
case Linux+mpi: |
case Linux-alpha+mpi: |
442 |
|
echo "Configuring with MPI" |
443 |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
444 |
set INCLUDES = ( '-I/usr/local/include' ) |
set INCLUDES = ( '-I/usr/local/include' ) |
445 |
case Linux: |
case Linux-alpha: |
446 |
|
echo "Configuring for " $platform |
447 |
set LN = ( '/bin/ln -s' ) |
set LN = ( '/bin/ln -s' ) |
448 |
set CPP = ( '/lib/cpp -traditional -P' ) |
set CPP = ( '/lib/cpp -traditional -P' ) |
449 |
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
450 |
set FC = ( 'g77' ) |
set FC = ( 'g77' ) |
451 |
set FFLAGS = ( '-Wimplicit -Wunused -Wuninitialized' ) |
set FFLAGS = ( ' ' ) |
452 |
if ($?IEEE) set FFLAGS = ( $FFLAGS '-ffloat-store' ) |
if ($?IEEE) set FFLAGS = ( $FFLAGS '-ffloat-store' ) |
453 |
set FOPTIM = ( '-O3 -malign-double -funroll-loops' ) |
set FOPTIM = ( '-ffast-math -fexpensive-optimizations -fomit-frame-pointer -O3' ) |
454 |
set LINK = ( 'g77' ) |
set LINK = ( 'g77' ) |
455 |
breaksw |
breaksw |
456 |
case Linux+pgi+mpi: |
case Linux*+pgi+mpi: |
457 |
if ($?include_jam_libs) then |
if ($?include_jam_libs) then |
458 |
set INCLUDES = ( '-I/usr/local/mpich-1.2.1/pgi_fortran_binding/include' ) |
set INCLUDES = ( '-I/usr/local/mpich-1.2.1/pgi_fortran_binding/include' ) |
459 |
set LIBS = ( '-L/usr/local/mpich-1.2.1/pgi_fortran_binding/lib/ -lfmpich -lmpich' ) |
set LIBS = ( '-L/usr/local/mpich-1.2.1/pgi_fortran_binding/lib/ -lfmpich -lmpich' ) |
461 |
set INCLUDES = ( '-I/usr/local/include' ) |
set INCLUDES = ( '-I/usr/local/include' ) |
462 |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
463 |
endif |
endif |
464 |
case Linux+pgi: |
case Linux*+pgi: |
465 |
|
echo "Configuring for " $platform |
466 |
set LN = ( '/bin/ln -s' ) |
set LN = ( '/bin/ln -s' ) |
467 |
set CPP = ( '/lib/cpp -traditional -P' ) |
set CPP = ( '/lib/cpp -traditional -P' ) |
468 |
set DEFINES = ( ${DEFINES} '-DWORDLENGTH=4' ) |
set DEFINES = ( ${DEFINES} '-DWORDLENGTH=4' ) |
471 |
set FOPTIM = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' ) |
set FOPTIM = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' ) |
472 |
set LINK = ( 'pgf77' ) |
set LINK = ( 'pgf77' ) |
473 |
breaksw |
breaksw |
474 |
|
case Linux*+mpi: |
475 |
|
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
476 |
|
set INCLUDES = ( '-I/usr/local/include' ) |
477 |
|
case Linux*: |
478 |
|
echo "Configuring for " $platform |
479 |
|
set LN = ( '/bin/ln -s' ) |
480 |
|
set CPP = ( '/lib/cpp -traditional -P' ) |
481 |
|
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
482 |
|
set FC = ( 'g77' ) |
483 |
|
set FFLAGS = ( '-Wimplicit -Wunused -Wuninitialized' ) |
484 |
|
if ($?IEEE) set FFLAGS = ( $FFLAGS '-ffloat-store' ) |
485 |
|
set FOPTIM = ( '-O3 -malign-double -funroll-loops' ) |
486 |
|
set LINK = ( 'g77' ) |
487 |
|
breaksw |
488 |
case T3E: |
case T3E: |
489 |
case sn6312: |
case sn6312: |
490 |
|
echo "Configuring for T3E" |
491 |
set CPP = ( '/opt/ctl/bin/cpp -P') |
set CPP = ( '/opt/ctl/bin/cpp -P') |
492 |
set DEFINES = ( ${DEFINES} '-DTARGET_T3E -DWORDLENGTH=4' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_T3E -DWORDLENGTH=4' ) |
493 |
set FC = ( 'f90' ) |
set FC = ( 'f90' ) |
496 |
breaksw |
breaksw |
497 |
case T90: |
case T90: |
498 |
case sn7113: |
case sn7113: |
499 |
|
echo "Configuring for T90" |
500 |
set FC = ( 'f90' ) |
set FC = ( 'f90' ) |
501 |
set LINK = ( 'f90' ) |
set LINK = ( 'f90' ) |
502 |
set LN = ( '/bin/ln -s' ) |
set LN = ( '/bin/ln -s' ) |
519 |
set NOOPTFLAGS = ( '-O0' ) |
set NOOPTFLAGS = ( '-O0' ) |
520 |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
521 |
breaksw |
breaksw |
522 |
|
case SP3: |
523 |
|
# originally from A. Biastoch, SIO. |
524 |
|
echo "Configuring for IBM SP POWER3" |
525 |
|
set SOURCEDIRS = ( ./ $SOURCEDIRS ) |
526 |
|
set LN = ( 'ln -s' ) |
527 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_PWR3 -DTARGET_SGI -DWORDLENGTH=4' ) |
528 |
|
set INCLUDES = ( '-I/usr/lpp/ppe.poe/include' ) |
529 |
|
# set CPP = ( '/lib/cpp' ) |
530 |
|
set FC = ( 'mpxlf95' ) |
531 |
|
set LINK = ( 'mpxlf95' ) |
532 |
|
set FLAGS = ( '-O3 -qarch=pwr3 -qtune=pwr3 -qcache=auto -qmaxmem=-1' \ |
533 |
|
'-bmaxdata:0x80000000 -bloadmap:mitgcmuv.map' ) |
534 |
|
set FFLAGS = ( '-qfixed=132 -O3 -qarch=pwr3 -qtune=pwr3 -qcache=auto -qmaxmem=-1' \ |
535 |
|
'-bmaxdata:0x80000000 ' ) |
536 |
|
set LDFLAGS = ( '-O3 -qarch=pwr3 -qtune=pwr3 -qcache=auto -qmaxmem=-1' \ |
537 |
|
'-bmaxdata:0x80000000' ) |
538 |
|
set LIBS = ( ' timer_stats.o -L/usr/local/apps/mass -lmass' ) |
539 |
|
# set FFLAGS = ( '-extend_source -mp -mpio -bytereclen -r10000 -mips4' ) |
540 |
|
# set FOPTIM = ( '-O3' ) |
541 |
|
# set NOOPTFLAGS = ( '-O0' ) |
542 |
|
# set NOOPTFILES = ( 'barrier.F different_multiple.F ' \ |
543 |
|
# 'external_fields_load.F' ) |
544 |
|
set RMFILES = ( 'rii_files' ) |
545 |
|
breaksw |
546 |
default: |
default: |
547 |
echo "Error: platform not recognized: uname -p = " $platform$USEMPI |
echo "Error: platform not recognized: uname -p = " $platform$USEMPI |
548 |
exit |
exit |
737 |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS) |
\$(LINK) -o \$@ \$(FFLAGS) \$(FOPTIM) \$(OBJFILES) \$(LIBS) |
738 |
depend: |
depend: |
739 |
@make links |
@make links |
740 |
makedepend -o .f \$(INCLUDES) \$(SRCFILES) |
makedepend -o .f \$(DEFINES) \$(INCLUDES) \$(SRCFILES) |
741 |
|
|
742 |
links: \$(SRCFILES) \$(CSRCFILES) \$(HEADERFILES) |
links: \$(SRCFILES) \$(CSRCFILES) \$(HEADERFILES) |
743 |
|
|