/[MITgcm]/MITgcm/tools/genmake
ViewVC logotype

Diff of /MITgcm/tools/genmake

Parent Directory Parent Directory | Revision Log Revision Log | View Revision Graph Revision Graph | View Patch Patch

revision 1.11 by adcroft, Fri May 7 18:12:29 1999 UTC revision 1.18 by heimbach, Wed Jun 21 20:42:30 2000 UTC
# Line 30  while ($#allargs) Line 30  while ($#allargs)
30     echo "Enabling MPI options"     echo "Enabling MPI options"
31     set USEMPI     set USEMPI
32     breaksw     breaksw
33     case -jam:
34       set include_jam_libs
35       echo "Including paths to JAM libraries"
36       breaksw
37   case -help:   case -help:
38     echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi]"     echo "usage: $0 [-help] [-makefile[=...]] [-platform=...] [-mpi]"
39     exit     exit
# Line 56  echo Operating system: $mach Line 60  echo Operating system: $mach
60  #   copy everything in ../eesupp/src, ../model/src,  #   copy everything in ../eesupp/src, ../model/src,
61  #   ../eesupp/inc and ../model/inc into a directory and then  #   ../eesupp/inc and ../model/inc into a directory and then
62  #   edit the paths below to ./  #   edit the paths below to ./
63  set SOURCEDIRS  = ( ../eesupp/src/ ../model/src/ ../diags/src/)  set SOURCEDIRS  = ( ../eesupp/src/ ../model/src/ ../diags/src/ ../pkg/*/)
64  set INCLUDEDIRS = ( ../eesupp/inc/ ../model/inc/ ../diags/inc/)  set INCLUDEDIRS = ( ./ ../eesupp/inc/ ../model/inc/ ../diags/inc/ ../pkg/*/)
65  set BUILDDIR    = ( ../bin/ )  set BUILDDIR    = ( ../bin/ )
66  set EXEDIR      = ( ../exe/ )  set EXEDIR      = ( ../exe/ )
67  set EXECUTABLE  = ( mitgcmuv )  set EXECUTABLE  = ( mitgcmuv )
# Line 178  switch ($platform$USEMPI) Line 182  switch ($platform$USEMPI)
182      breaksw      breaksw
183    case Linux+mpi:    case Linux+mpi:
184      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
185        set INCLUDES   = ( '-I/usr/local/include' )
186    case Linux:    case Linux:
187      set LN         = ( '/bin/ln -fs' )      set LN         = ( '/bin/ln -fs' )
188      set CPP        = ( '/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp  -traditional -P' )      set CPP        = ( '/lib/cpp  -traditional -P' )
189      set DEFINES    = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' )      set DEFINES    = ( ${DEFINES} '-D_BYTESWAPIO -DWORDLENGTH=4' )
     set INCLUDES   = ( '-I/usr/local/include' )  
190      set FC         = ( 'g77' )      set FC         = ( 'g77' )
191      set FFLAGS     = ( ' ' )      set FFLAGS     = ( '-Wimplicit -Wunused -Wuninitialized' )
192      set FOPTIM     = ( '-O3 -funroll-loops ' )      set FOPTIM     = ( '-O3 -malign-double -funroll-loops ' )
193      set LINK       = ( 'g77' )      set LINK       = ( 'g77' )
194      breaksw      breaksw
195      case Linux+pgi+mpi:
196        if ($?include_jam_libs) then
197         set INCLUDES   = ( '-I/usr/local//mpich-cnh-install/include' )
198         set LIBS       = ( '-L/usr/local/mpich-cnh-install/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
199        else
200         set INCLUDES   = ( '-I/usr/local/include' )
201         set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich' )
202        endif
203    case Linux+pgi:    case Linux+pgi:
204      set LN         = ( '/bin/ln -fs' )      set LN         = ( '/bin/ln -fs' )
205      set CPP        = ( '/usr/lib/gcc-lib/i386-redhat-linux/2.7.2.3/cpp -P' )      set CPP        = ( '/lib/cpp -traditional -P' )
206      set DEFINES    = ( ${DEFINES} '-DWORDLENGTH=4' )      set DEFINES    = ( ${DEFINES} '-DWORDLENGTH=4' )
     set INCLUDES   = ( '-I/usr/local/include' )  
207      set FC         = ( 'pgf77' )      set FC         = ( 'pgf77' )
208      set FFLAGS     = ( '-byteswapio' )      set FFLAGS     = ( '-byteswapio' )
209      set FOPTIM     = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' )      set FOPTIM     = ( '-tp p6 -v -O2 -Munroll -Mvect=cachesize:512000,transform -Kieee' )
210      set LINK       = ( 'pgf77' )      set LINK       = ( 'pgf77' )
211      set LIBS       = ( '-L/usr/local/lib/LINUX/ch_p4/ -lfmpich -lmpich -Kieee' )      breaksw
212      case T3E:
213      case sn6312:
214        set CPP        = ( '/opt/ctl/bin/cpp -P')
215        set DEFINES    = ( ${DEFINES} '-DTARGET_T3E -DWORDLENGTH=4' )
216        set FC         = ( 'f90' )
217        set LINK       = ( 'f90' )
218        set FFLAGS     = ( '-O 2,fusion' )
219        breaksw
220      case T90:
221      case sn7113:
222        set FC         = ( 'f90' )
223        set LINK       = ( 'f90' )
224        set LN         = ( '/bin/ln -fs' )
225        set CPP        = ( '/opt/ctl/bin/cpp -P' )
226        set DEFINES    = ( ${DEFINES} '-DTARGET_CRAY_VECTOR -DCRAY_TS -DWORDLENGTH=4' )
227        set FFLAGS     = ( '-Rabc -N 132')
228        set FOPTIM     = ( '-O0' )
229        set NOOPTFLAGS = ( '-O0' )
230        set NOOPTFILES = ( 'barrier.F different_multiple.F load_external_fields.F')
231        breaksw
232      case SV1:
233      case sn3002:
234        set FC         = ( 'f90' )
235        set LINK       = ( 'f90' )
236        set LN         = ( '/bin/ln -fs' )
237        set CPP        = ( '/opt/ctl/bin/cpp -P' )
238        set DEFINES    = ( ${DEFINES} '-DTARGET_CRAY_VECTOR -DCRAY_TS -DWORDLENGTH=4' )
239        set FFLAGS     = ( '-m2 -ea -Rabc -N 132')
240        set FOPTIM     = ( '-O0' )
241        set NOOPTFLAGS = ( '-O0' )
242        set NOOPTFILES = ( 'barrier.F different_multiple.F load_external_fields.F')
243      breaksw      breaksw
244    default:    default:
245      echo "Error: platform not recognized: uname -p = " $platform$USEMPI      echo "Error: platform not recognized: uname -p = " $platform$USEMPI
# Line 291  INCLUDEDIRS = ${INCLUDEDIRS} Line 333  INCLUDEDIRS = ${INCLUDEDIRS}
333  EXEDIR     = ${EXEDIR}  EXEDIR     = ${EXEDIR}
334  EXECUTABLE = \$(EXEDIR)${EXECUTABLE}  EXECUTABLE = \$(EXEDIR)${EXECUTABLE}
335    
336    EOF
337    
338    
339    # JAM libraries on Hyades
340    if ($?include_jam_libs) then
341    cat >> ${mfile} <<EOF
342    # extra stuff for Hyades ............................................
343    HYADES_DIR = /u/u0/cnh/jam-lib/software
344    HYADES_DIR = /u/u0/cnh/jam-lib-twoproc
345    WORK_DIR   = \$(HYADES_DIR)
346    DEPOSIT_DIR = linux_bin
347    
348    STARTXOBJDIR = startx_util/\$(DEPOSIT_DIR)
349    STARTXOBJ = \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/startx_timer.o \
350                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/startx_util.o \
351                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/client.o \
352                \$(WORK_DIR)/startx_util/\$(DEPOSIT_DIR)/csutil.o
353    
354    JAMOBJDIR  = jam/\$(DEPOSIT_DIR)
355    JAMOBJ     = \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_init.o \
356                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_kernel.o \
357                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_malloc.o \
358                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_vmalloc.o \
359                 \$(WORK_DIR)/jam/\$(DEPOSIT_DIR)/jam_mutex.o
360    
361    JAMCOBJDIR = jam_collective/\$(DEPOSIT_DIR)
362    JAMCOBJ    = \$(WORK_DIR)/jam_collective/\$(DEPOSIT_DIR)/jam_collective.o
363    
364    XLIBS      = \$(STARTXOBJ) \$(JAMOBJ) \$(JAMCOBJ)
365    
366    # ..................................................................
367    
368    EOF
369    endif
370    
371    
372    cat >> ${mfile} <<EOF
373  # Unix ln (link)  # Unix ln (link)
374  LN = ${LN}  LN = ${LN}
375  # C preprocessor  # C preprocessor
# Line 316  FOPTIM = ${FOPTIM} Line 395  FOPTIM = ${FOPTIM}
395  NOOPTFILES = ${NOOPTFILES}  NOOPTFILES = ${NOOPTFILES}
396  NOOPTFLAGS = ${NOOPTFLAGS}  NOOPTFLAGS = ${NOOPTFLAGS}
397  # Flags and libraries needed for linking  # Flags and libraries needed for linking
398  LIBS = ${LIBS}  LIBS = ${LIBS} \$(XLIBS)
399    
400  EOF  EOF
401    
# Line 344  Clean: Line 423  Clean:
423          @make clean          @make clean
424          -find . -type l -exec rm {} \;          -find . -type l -exec rm {} \;
425          -rm Makefile.bak          -rm Makefile.bak
426    CLEAN:
427            @make Clean
428            -find ../verification/ -name "*.meta" -exec rm {} \;
429            -find ../verification/ -name "*.data" -exec rm {} \;
430            -rm \$(EXECUTABLE)
431    
432  # The normal chain of rules is (  .F - .f - .o  )  # The normal chain of rules is (  .F - .f - .o  )
433  .F.f:  .F.f:

Legend:
Removed from v.1.11  
changed lines
  Added in v.1.18

  ViewVC Help
Powered by ViewVC 1.1.22