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 flt ptracers ) |
if (! $?DISABLE) set DISABLE = ( aim aim_v23 autodiff cal cost ctrl ecco exf grdchk flt land ptracers seaice therm_seaice bulk_force dic gchem ) |
13 |
set DEFINES = ( ) |
if (! $?ENABLE) set ENABLE = ( ) |
14 |
set ENABLE = ( ) |
if (! $?DEFINES) set DEFINES = ( ) |
15 |
set MODS = ( ) |
if (! $?MODS) set MODS = ( ) |
16 |
|
|
17 |
# Grab variables/lists from .genmakerc |
# Grab variables/lists from .genmakerc |
18 |
if (-r .genmakerc) source .genmakerc |
if (-r .genmakerc) source .genmakerc |
78 |
echo "-enable overrides -disable, ie. a package listed in both is enabled" |
echo "-enable overrides -disable, ie. a package listed in both is enabled" |
79 |
exit |
exit |
80 |
breaksw |
breaksw |
|
case -ieee: |
|
|
set IEEE |
|
|
breaksw |
|
81 |
case -enable=*: |
case -enable=*: |
82 |
set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /g' `) |
set ENABLE = ( $ENABLE `echo $arg | sed 's/-enable=//' | sed 's/,/ /g' `) |
83 |
breaksw |
breaksw |
84 |
|
case -cpp: |
85 |
|
case -cpp=: |
86 |
|
echo "To define CPP macros use -cpp=arg" |
87 |
|
exit |
88 |
|
breaksw |
89 |
|
case -cpp=*: |
90 |
|
set DEFINES = ( $DEFINES `echo $arg | sed 's/-cpp=//' | sed 's/,/ /g' `) |
91 |
|
breaksw |
92 |
|
case -ieee: |
93 |
|
set IEEE |
94 |
|
breaksw |
95 |
case -mpi: |
case -mpi: |
96 |
echo "Enabling MPI options" |
echo "Enabling MPI options" |
97 |
set USEMPI |
set USEMPI |
100 |
set include_jam_libs |
set include_jam_libs |
101 |
echo "Including paths to JAM libraries" |
echo "Including paths to JAM libraries" |
102 |
breaksw |
breaksw |
103 |
|
case -arpack: |
104 |
|
echo "Enabling ARPACK libraries" |
105 |
|
set USEARPACK |
106 |
|
breaksw |
107 |
|
case -fc: |
108 |
|
case -fc=: |
109 |
|
echo "To change the compiler (\$FC) you must specify one with -fc=" |
110 |
|
echo "eg. -fc=f90 or -fc=g77" |
111 |
|
exit |
112 |
|
breaksw |
113 |
|
case -fc*: |
114 |
|
if ($?FC) then |
115 |
|
echo Option -fc=... can only be specified once.; exit 1 |
116 |
|
endif |
117 |
|
set FC = ( `echo $arg | sed 's/-fc=//' `) |
118 |
|
breaksw |
119 |
case -help: |
case -help: |
120 |
echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi] [-jam] [-disable=pkg1[,pkg2,...]] [-enable=pkg1[,pkg2,...]] [-mods=dir1[,dir2,...]] [-rootdir=dir]" |
echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi] [-jam] [-arpack] [-disable=pkg1[,pkg2,...]] [-enable=pkg1[,pkg2,...]] [-mods=dir1[,dir2,...]] [-rootdir=dir]" |
121 |
cat << EOF |
cat << EOF |
122 |
|
|
123 |
$0 is used to generate the Makefile in the current directory. |
$0 is used to generate the Makefile in the current directory. |
251 |
end |
end |
252 |
if (! $?PACKAGES) then |
if (! $?PACKAGES) then |
253 |
set PACKAGES=() |
set PACKAGES=() |
254 |
foreach pkg (`cd $ROOTDIR/pkg; find . -type d | grep -v CVS | sed 's:\./::' | grep -v "\." | sort`) |
foreach pkg (`cd $ROOTDIR/pkg; find . -type d -print | grep -v CVS | sed 's:\./::' | grep -v "\." | sort`) |
255 |
if (-d $ROOTDIR/pkg/$pkg) set PACKAGES=($PACKAGES $pkg) |
if (-d $ROOTDIR/pkg/$pkg) set PACKAGES=($PACKAGES $pkg) |
256 |
end |
end |
257 |
endif |
endif |
296 |
set DEFINES = ($DEFINES '-DDISABLE_MOM_VECINV'); breaksw |
set DEFINES = ($DEFINES '-DDISABLE_MOM_VECINV'); breaksw |
297 |
case generic_advdiff: |
case generic_advdiff: |
298 |
set DEFINES = ($DEFINES '-DDISABLE_GENERIC_ADVDIFF'); breaksw |
set DEFINES = ($DEFINES '-DDISABLE_GENERIC_ADVDIFF'); breaksw |
299 |
|
case debug: |
300 |
|
set DEFINES = ($DEFINES '-DDISABLE_DEBUGMODE'); breaksw |
301 |
default: |
default: |
302 |
breaksw |
breaksw |
303 |
endsw |
endsw |
315 |
set INCLUDEDIRS = ($INCLUDEDIRS $idr) |
set INCLUDEDIRS = ($INCLUDEDIRS $idr) |
316 |
end |
end |
317 |
|
|
318 |
|
# Find possible compilers |
319 |
|
if ($?FC) then |
320 |
|
echo "$FC was specified as the compiler" |
321 |
|
else |
322 |
|
echo " " |
323 |
|
switch ($platform) |
324 |
|
case Linux*: |
325 |
|
set likelysuspects=(g77 ifc pgf77 f77 f90 f95) |
326 |
|
breaksw |
327 |
|
default: |
328 |
|
set likelysuspects=(f77) |
329 |
|
breaksw |
330 |
|
endsw |
331 |
|
foreach fc ($likelysuspects) |
332 |
|
set foundfc=`which $fc |& cat - ` |
333 |
|
if (-x $foundfc[1]) then |
334 |
|
if ($?possiblefc) then |
335 |
|
set possiblefc=($possiblefc $fc) |
336 |
|
else |
337 |
|
set possiblefc=$fc |
338 |
|
endif |
339 |
|
endif |
340 |
|
end |
341 |
|
if ($?possiblefc) then |
342 |
|
set FC=$possiblefc[1] |
343 |
|
echo Found these compilers: $possiblefc. Using \"$FC\" as the compiler |
344 |
|
else |
345 |
|
echo "No compiler found\!" |
346 |
|
echo I tried looking for \"$likelysuspects\" in your \$PATH but found none |
347 |
|
echo I will continue anyway and see what happens. |
348 |
|
set FC = ( 'f77' ) |
349 |
|
# exit 13 |
350 |
|
endif |
351 |
|
endif |
352 |
|
|
353 |
# This is the generic configuration. |
# This is the generic configuration. |
354 |
# Platform specific options are chosen below |
# Platform specific options are chosen below |
355 |
set LN = ( 'ln -s' ) |
set LN = ( 'ln -s' ) |
356 |
set CPP = ( '/lib/cpp -P' ) |
set CPP = ( '/lib/cpp -P' ) |
357 |
set S64 = ( '$(TOOLSDIR)/set64bitConst.sh' ) |
set S64 = ( '$(TOOLSDIR)/set64bitConst.sh' ) |
358 |
set KPP = ( ) |
set KPP = ( ) |
359 |
set FC = ( 'f77' ) |
#set FC = ( 'f77' ) |
360 |
set LINK = ( 'f77' ) |
set LINK = $FC |
361 |
set MAKEDEPEND = ( 'makedepend' ) |
set MAKEDEPEND = ( 'makedepend' ) |
362 |
set INCLUDES = ( -I. ) |
set INCLUDES = ( -I. ) |
363 |
set FFLAGS = ( ) |
set FFLAGS = ( ) |
367 |
set KFLAGS2 = ( ) |
set KFLAGS2 = ( ) |
368 |
set LIBS = ( ) |
set LIBS = ( ) |
369 |
set KPPFILES = ( ) |
set KPPFILES = ( ) |
370 |
set NOOPTFILES = ( ) |
if (! $?NOOPTFILES ) set NOOPTFILES = ( ) |
371 |
set NOOPTFLAGS = ( ) |
if (! $?NOOPTFLAGS ) set NOOPTFLAGS = ( ) |
372 |
set RMFILES = ( ) |
set RMFILES = ( ) |
373 |
|
|
374 |
# We often want to use different compile/link options is using MPI |
# We often want to use different compile/link options is using MPI |
380 |
# set DEFINES = ( ${DEFINES} '-UALLOW_USE_MPI -UALWAYS_USE_MPI' ) |
# set DEFINES = ( ${DEFINES} '-UALLOW_USE_MPI -UALWAYS_USE_MPI' ) |
381 |
endif |
endif |
382 |
|
|
383 |
|
if ($?USEARPACK) then |
384 |
|
set USEARPACK = ( '+arpack' ) |
385 |
|
set LIBS = ( '-L/usr/lib -larpack -llapack' ) |
386 |
|
else |
387 |
|
set USEARPACK |
388 |
|
endif |
389 |
|
|
390 |
# Platform specific options |
# Platform specific options |
391 |
switch ($platform$USEMPI) |
switch ($platform$USEMPI$USEARPACK) |
392 |
case OSF1+mpi: |
case OSF1+mpi: |
393 |
|
#ph: e.g. halem.gsfc.nasa.gov |
394 |
echo "Configuring for DEC Alpha with MPI" |
echo "Configuring for DEC Alpha with MPI" |
395 |
set LIBS = ( '-lfmpi -lmpi -lkmp_osfp10 -pthread' ) |
set LIBS = ( '-lfmpi -lmpi -lkmp_osfp10 -pthread' ) |
396 |
|
#ph: -lkmp_osfp10 not needed on some/many platforms |
397 |
case OSF1: |
case OSF1: |
398 |
echo "Configuring for DEC Alpha" |
echo "Configuring for DEC Alpha" |
399 |
set CPP = ( '/usr/bin/cpp -P' ) |
set CPP = ( '/usr/bin/cpp -P' ) |
400 |
set DEFINES = ( ${DEFINES} '-DTARGET_DEC -DWORDLENGTH=1' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_DEC -DWORDLENGTH=1' ) |
401 |
|
set MAKEDEPEND = ( mkdep -f depend.out ) |
402 |
|
#ph: makedepend not available on some/many DEC Alpha's; use mkdep instead |
403 |
set KPP = ( ) |
set KPP = ( ) |
404 |
set KPPFILES = ( ) |
set KPPFILES = ( ) |
405 |
set KFLAGS1 = ( ) |
set KFLAGS1 = ( ) |
406 |
set FC = ( 'f77' ) |
set FC = ( 'f77' ) |
407 |
set FFLAGS = ( '-convert big_endian -r8 -extend_source -automatic -call_shared -notransform_loops -align dcommons' ) |
set FFLAGS = ( '-convert big_endian -r8 -extend_source -automatic -call_shared -notransform_loops -align dcommons' ) |
408 |
set FOPTIM = ( '-O5 -fast -tune host -inline all' ) |
set FOPTIM = ( '-O5 -fast -tune host -inline all' ) |
409 |
|
#ph: -O5 probably too aggressive in conjunction with adjoint code |
410 |
set NOOPTFLAGS = ( '-O0' ) |
set NOOPTFLAGS = ( '-O0' ) |
411 |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
412 |
set RMFILES = ( '*.p.out' ) |
set RMFILES = ( '*.p.out' ) |
427 |
set INCLUDES = ( '-I/usr/local/mpi/include' ) |
set INCLUDES = ( '-I/usr/local/mpi/include' ) |
428 |
set FFLAGS = ( '-extend_source -mp -mpio -bytereclen -r10000 -mips4 -r8 -static' ) |
set FFLAGS = ( '-extend_source -mp -mpio -bytereclen -r10000 -mips4 -r8 -static' ) |
429 |
set FOPTIM = ( '-O3' ) |
set FOPTIM = ( '-O3' ) |
430 |
# set NOOPTFLAGS = ( '-O0' ) |
if ($?IEEE) set FFLAGS = ( '-extend_source -mp -mpio -bytereclen -r10000 -mips4 -static' ) |
431 |
# set NOOPTFILES = ( 'barrier.F different_multiple.F ' \ |
if ($?IEEE) set FOPTIM = ( '-O0 -OPT:IEEE_arithmetic=1 -OPT:IEEE_NaN_inf=ON' ) |
|
# 'external_fields_load.F' ) |
|
432 |
set RMFILES = ( 'rii_files' ) |
set RMFILES = ( 'rii_files' ) |
433 |
breaksw |
breaksw |
434 |
case o2: |
case o2: |
454 |
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
455 |
set INCLUDES = ( '-I/usr/include' ) |
set INCLUDES = ( '-I/usr/include' ) |
456 |
set FFLAGS = ( '-n32 -extend_source -bytereclen' ) |
set FFLAGS = ( '-n32 -extend_source -bytereclen' ) |
457 |
set FOPTIM = ( '-O2' ) |
set FOPTIM = ( '-O3 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed' ) |
458 |
set NOOPTFILES = ( 'calc_mom_rhs.F' ) |
set LIBS = ( '-lmpi -lscs' ) |
459 |
set NOOPTFLAGS = ( '-O1' ) |
breaksw |
460 |
|
case o2k_noopt: |
461 |
|
case o2k_noopt+mpi: |
462 |
|
echo "Configuring for SGI Origin2000 running IRIX 6.5" |
463 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
464 |
|
set INCLUDES = ( '-I/usr/include' ) |
465 |
|
set FFLAGS = ( '-n32 -extend_source -bytereclen' ) |
466 |
|
set FOPTIM = ( '-O0' ) |
467 |
|
set LIBS = ( '-lmpi' ) |
468 |
|
breaksw |
469 |
|
case ames_dbg+mpi: |
470 |
|
echo "Configuring for SGI Origin2000 running IRIX 6.5" |
471 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
472 |
|
set INCLUDES = ( '-I/usr/include -I/opt/mpt/1.6.1.beta/usr/include' ) |
473 |
|
set FFLAGS = ( '-n32 -extend_source -bytereclen' ) |
474 |
|
set LIBS = ( '-lmpi -lscs' ) |
475 |
|
set FC = ( 'f90' ) |
476 |
|
set LINK = ( 'f90' ) |
477 |
|
breaksw |
478 |
|
case ames_opt+mpi: |
479 |
|
echo "Configuring for SGI Origin2000 running IRIX 6.5" |
480 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
481 |
|
set INCLUDES = ( '-I/usr/include -I/opt/mpt/1.6.1.beta/usr/include' ) |
482 |
|
set FFLAGS = ( '-n32 -extend_source -bytereclen' ) |
483 |
|
set FOPTIM = ( '-O3 -OPT:Olimit=0:roundoff=3:div_split=ON:alias=typed' ) |
484 |
set LIBS = ( '-lmpi -lscs' ) |
set LIBS = ( '-lmpi -lscs' ) |
485 |
|
set FC = ( 'f90' ) |
486 |
|
set LINK = ( 'f90' ) |
487 |
breaksw |
breaksw |
488 |
case onyx: |
case onyx: |
489 |
case onyx+mpi: |
case onyx+mpi: |
518 |
'-lsocket -lnsl' ) |
'-lsocket -lnsl' ) |
519 |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F ini_vertical_grid.F ini_spherical_polar_grid.F ini_cori.F mon_printstats_rl.F mon_printstats_rs.F') |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F ini_vertical_grid.F ini_spherical_polar_grid.F ini_cori.F mon_printstats_rl.F mon_printstats_rs.F') |
520 |
breaksw |
breaksw |
521 |
|
case SunFire+mpi: |
522 |
|
set FC = ( 'mpf77' ) |
523 |
|
set LINK = ( 'mpf77' ) |
524 |
|
set LN = ( '/usr/bin/ln -s' ) |
525 |
|
set CPP = ( '/usr/ccs/lib/cpp -P' ) |
526 |
|
set MAKEDEPEND = ( ${TOOLSDIR}/xmakedepend ) |
527 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_SUN -DWORDLENGTH=4' ) |
528 |
|
set INCLUDES = ( '-I/opt/SUNWhpc/include' ) |
529 |
|
set LIBS = ( '-lmpi -lthread -lsocket -lnsl' ) |
530 |
|
set FFLAGS = ( '-e -u -noautopar ' \ |
531 |
|
'-xtypemap=real:64,double:64,integer:32 -fsimple=0' ) |
532 |
|
set FOPTIM = ( '-dalign -O4 -xarch=native' ) |
533 |
|
set CFLAGS = ( '-dalign -xO4 -xarch=native' ) |
534 |
|
set NOOPTFLAGS = ( '-dalign -O0 -xarch=native' ) |
535 |
|
breaksw |
536 |
case IRIX32: |
case IRIX32: |
537 |
echo "Configuring for SGI ONYX running IRIX64" |
echo "Configuring for SGI ONYX running IRIX64" |
538 |
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
559 |
set NOOPTFILES = ( 'barrier.F different_multiple.F' \ |
set NOOPTFILES = ( 'barrier.F different_multiple.F' \ |
560 |
'external_fields_load.F' ) |
'external_fields_load.F' ) |
561 |
breaksw |
breaksw |
562 |
|
case Linux-ia64+mpi: |
563 |
|
echo "Configuring with MPI" |
564 |
|
case Linux-ia64: |
565 |
|
echo "Configuring for " $platform |
566 |
|
set LN = ( '/bin/ln -s' ) |
567 |
|
set CPP = ( '/lib/cpp -traditional -P' ) |
568 |
|
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
569 |
|
set FC = ( 'efc' ) |
570 |
|
set FFLAGS = ( '-WB -Vaxlib -u -w' ) |
571 |
|
# set FOPTIM = ( '-O2 -ftz' ) |
572 |
|
set FOPTIM = ( '-O3 -mp' ) |
573 |
|
set LINK = ( 'efc' ) |
574 |
|
set LIBS = ( '-lmpi -lscs -lpthread' ) |
575 |
|
breaksw |
576 |
case Linux-alpha+mpi: |
case Linux-alpha+mpi: |
577 |
echo "Configuring with MPI" |
echo "Configuring with MPI" |
578 |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
set LIBS = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' ) |
613 |
echo "Configuring for " $platform |
echo "Configuring for " $platform |
614 |
set LN = ( '/bin/ln -s' ) |
set LN = ( '/bin/ln -s' ) |
615 |
set CPP = ( '/lib/cpp -traditional -P' ) |
set CPP = ( '/lib/cpp -traditional -P' ) |
616 |
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
switch ($FC) |
617 |
set FC = ( 'g77' ) |
case g77: |
618 |
set FFLAGS = ( '-Wimplicit -Wunused -Wuninitialized' ) |
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
619 |
if ($?IEEE) set FFLAGS = ( $FFLAGS '-ffloat-store' ) |
set FFLAGS = ( '-Wimplicit -Wunused -Wuninitialized' ) |
620 |
set FOPTIM = ( '-O3 -malign-double -funroll-loops' ) |
if ($?IEEE) set FFLAGS = ( $FFLAGS '-ffloat-store' ) |
621 |
set LINK = ( 'g77' ) |
set FOPTIM = ( '-O3 -malign-double -funroll-loops' ) |
622 |
|
set NOOPTFLAGS = ( '-O0' ) |
623 |
|
breaksw |
624 |
|
case pgf77: |
625 |
|
set DEFINES = ( ${DEFINES} '-DWORDLENGTH=4' ) |
626 |
|
set FC = ( 'pgf77' ) |
627 |
|
set FFLAGS = ( '-byteswapio -r8 -Mnodclchk -Mextend' ) |
628 |
|
set FOPTIM = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' ) |
629 |
|
breaksw |
630 |
|
case ifc: |
631 |
|
set DEFINES = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' ) |
632 |
|
set FFLAGS = ( '-132 -r8 -i4 -w95 -W0 -WB' ) |
633 |
|
if ($?IEEE) set FFLAGS = ( $FFLAGS '-mp' ) |
634 |
|
set FOPTIM = ( '-O3 -align' ) |
635 |
|
#P3 set FOPTIM = ( $FOPTIM '-tpp6 -xWKM' ) |
636 |
|
#P4 set FOPTIM = ( $FOPTIM '-tpp7 -xWKM' ) |
637 |
|
set LIBS = ( ${LIBS} '-lPEPCF90' ) |
638 |
|
breaksw |
639 |
|
default: |
640 |
|
echo Error: Linux compiler not recognized: \$FC=$FC |
641 |
|
exit |
642 |
|
breaksw |
643 |
|
endsw |
644 |
breaksw |
breaksw |
645 |
case T3E: |
case T3E: |
646 |
case sn6312: |
case sn6312: |
676 |
set NOOPTFLAGS = ( '-O0' ) |
set NOOPTFLAGS = ( '-O0' ) |
677 |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
set NOOPTFILES = ( 'barrier.F different_multiple.F external_fields_load.F') |
678 |
breaksw |
breaksw |
679 |
|
case cg01+pgi: |
680 |
|
set LN = ( '/bin/ln -s' ) |
681 |
|
set CPP = ( '/lib/cpp -traditional -P' ) |
682 |
|
set INCLUDES = ( '-I/usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/include' ) |
683 |
|
set DEFINES = ( ${DEFINES} '-DWORDLENGTH=4' ) |
684 |
|
set FC = ( '/usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/bin/mpif77' ) |
685 |
|
set FFLAGS = ( '-byteswapio -r8 -Mnodclchk -Mextend' ) |
686 |
|
# set LIBS = ( '-L/home/cnh/src/gm-1.4/libgm') |
687 |
|
set FOPTIM = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' ) |
688 |
|
set LINK = ( '/usr/local/pkg/mpi/mpi-1.2.4..8a-gm-1.5/pgi/bin/mpif77' ) |
689 |
|
breaksw |
690 |
case SP3: |
case SP3: |
691 |
# originally from A. Biastoch, SIO. |
# originally from A. Biastoch, SIO. |
692 |
|
# e.g. horizon.npaci.edu |
693 |
echo "Configuring for IBM SP POWER3" |
echo "Configuring for IBM SP POWER3" |
694 |
set SOURCEDIRS = ( ./ $SOURCEDIRS ) |
set SOURCEDIRS = ( ./ $SOURCEDIRS ) |
695 |
set LN = ( 'ln -s' ) |
set LN = ( 'ln -s' ) |
712 |
# 'external_fields_load.F' ) |
# 'external_fields_load.F' ) |
713 |
set RMFILES = ( 'rii_files' ) |
set RMFILES = ( 'rii_files' ) |
714 |
breaksw |
breaksw |
715 |
|
case SP4: |
716 |
|
#ph: e.g. bluesky.ucar.edu, marcellus.navo.hpc.mil |
717 |
|
echo "Configuring for IBM SP POWER4" |
718 |
|
set SOURCEDIRS = ( ./ $SOURCEDIRS ) |
719 |
|
set LN = ( 'ln -s' ) |
720 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_PWR3 -DTARGET_SGI -DWORDLENGTH=4' ) |
721 |
|
set INCLUDES = ( '-I/usr/lpp/ppe.poe/include' ) |
722 |
|
# set CPP = ( '/lib/cpp' ) |
723 |
|
set FC = ( 'mpxlf95' ) |
724 |
|
set LINK = ( 'mpxlf95' ) |
725 |
|
set FLAGS = ( '-O3 -qarch=pwr4 -qtune=pwr4 -qcache=auto -qmaxmem=-1' \ |
726 |
|
'-bmaxdata:0x80000000 -bloadmap:mitgcmuv.map' ) |
727 |
|
set FFLAGS = ( '-qfixed=132 -O3 -qarch=pwr4 -qtune=pwr4 -qcache=auto -qmaxmem=-1' \ |
728 |
|
'-bmaxdata:0x80000000 ' ) |
729 |
|
set LDFLAGS = ( '-O3 -qarch=pwr4 -qtune=pwr4 -qcache=auto -qmaxmem=-1' \ |
730 |
|
'-bmaxdata:0x80000000' ) |
731 |
|
set LIBS = ( ' -L/usr/local/apps/mass -lmass' ) |
732 |
|
# set FFLAGS = ( '-extend_source -mp -mpio -bytereclen -r10000 -mips4' ) |
733 |
|
# set FOPTIM = ( '-O3' ) |
734 |
|
# set NOOPTFLAGS = ( '-O0' ) |
735 |
|
# set NOOPTFILES = ( 'barrier.F different_multiple.F ' \ |
736 |
|
# 'external_fields_load.F' ) |
737 |
|
set RMFILES = ( 'rii_files' ) |
738 |
|
breaksw |
739 |
|
case aer-linux-cluster+mpi |
740 |
|
echo "Configuring for " $platform |
741 |
|
set LN = ( '/bin/ln -s' ) |
742 |
|
set CPP = ( '/lib/cpp -traditional -P' ) |
743 |
|
set DEFINES = ( ${DEFINES} '-DWORDLENGTH=4' ) |
744 |
|
set FC = ( '/opt/mpich/bin/mpif77' ) |
745 |
|
set LINK = ( '/opt/mpich/bin/mpif77' ) |
746 |
|
set FFLAGS = ( '-byteswapio -r8 -Mnodclchk -Mextend' ) |
747 |
|
set FOPTIM = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' ) |
748 |
|
set LIBS = ( '-L/opt/mpich/lib/ -lfmpich -lmpich' ) |
749 |
|
set INCLUDES = ( '-I/opt/mpich/include' ) |
750 |
|
breaksw |
751 |
|
case gfdl-sgi-o3k |
752 |
|
echo "Configuring for " $platform |
753 |
|
set DEFINES = ( ${DEFINES} '-DTARGET_SGI -DWORDLENGTH=4' ) |
754 |
|
set FFLAGS = ( 'extend_source -mp -mpio -bytereclen -mips4 -r8 -static' ) |
755 |
|
set FOPTIM = ( '-O3' ) |
756 |
|
set LIBS = ( '-lmpi' ) |
757 |
|
set INCLUDES = ( '-I/opt/mpt/1510/usr/include' ) |
758 |
|
breaksw |
759 |
|
default: |
760 |
|
echo "Error: platform not recognized: uname -p = " $platform$USEMPI |
761 |
|
exit |
762 |
|
breaksw |
763 |
default: |
default: |
764 |
echo "Error: platform not recognized: uname -p = " $platform$USEMPI |
echo "Error: platform not recognized: uname -p = " $platform$USEMPI |
765 |
exit |
exit |
968 |
@\$(EXECUTABLE) > \$@ |
@\$(EXECUTABLE) > \$@ |
969 |
|
|
970 |
clean: |
clean: |
971 |
-rm -rf *.o *.f *.p ${RMFILES} |
-rm -rf *.o *.f *.p ${RMFILES} work.{pc,pcl} |
972 |
Clean: |
Clean: |
973 |
@make clean |
@make clean |
974 |
@make cleanlinks |
@make cleanlinks |
977 |
@make Clean |
@make Clean |
978 |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
-find \$(EXEDIR) -name "*.meta" -exec rm {} \; |
979 |
-find \$(EXEDIR) -name "*.data" -exec rm {} \; |
-find \$(EXEDIR) -name "*.data" -exec rm {} \; |
980 |
|
-find \$(EXEDIR) -name "fort.*" -exec rm {} \; |
981 |
-rm -f \$(EXECUTABLE) |
-rm -f \$(EXECUTABLE) |
982 |
|
|
983 |
makefile: |
makefile: |