/[MITgcm]/MITgcm/tools/build_options/linux_ia32_ifort+mpi_aces
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_ia32_ifort+mpi_aces

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


Revision 1.8 - (hide annotations) (download)
Fri Jun 26 16:06:08 2009 UTC (14 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62, checkpoint62c, checkpoint62b, checkpoint62a, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61s, checkpoint61z, checkpoint61x, checkpoint61y
Changes since 1.7: +49 -13 lines
adopt Constantinos' method:
  allow different versions of ifort (8 or 9) and different versions
   of mpi (mpich or mpich2) to be used with the same optfile.
  requires to load a netcdf module and set MPI_INC_DIR (see comments
   inside optfile).

1 edhill 1.1 #!/bin/bash
2     #
3 jmc 1.8 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia32_ifort+mpi2_aces,v 1.1 2009/06/23 22:54:32 jmc Exp $
4 edhill 1.1 #
5 jmc 1.8 # build options used with the Intel compiler, version 8 and 9,
6     # for the daily testing on ACES (which are initiated by cron jobs
7     # on the "ao" head node).
8 edhill 1.1 #
9 jmc 1.8 # Needs the appropriate module commands,
10     # and DON'T FORGET to set environment variable MPI_INC_DIR to the include
11     # directory of the selected MPI implementation
12 edhill 1.4 #
13 jmc 1.8 #-- using default intel (v8.1) and default mpich/intel:
14 edhill 1.4 # module add mpich/intel
15 jmc 1.8 # module add netcdf/3.6.1/icc
16     # e.g.(sh,bash):
17     # export MPI_INC_DIR='/usr/local/pkg/mpich/mpich-intel/include/'
18     # (and run using mpirun -machinefile my_list_of_nodes)
19     #
20     #-- using intel v9.0 and mpich2-intel, in this order:
21     # module add ifc/9.0.021 icc/9.0.021 intel/9.0
22     # module add mpich2/1.0.3/intel
23     # module add netcdf/3.6.1/icc
24     # module add mpiexec (<-- to run with mpiexec)
25     # e.g.(sh,bash):
26     # export MPI_INC_DIR='/usr/local/pkg/mpich2/mpich2-1.0.3/intel/include/'
27     # (and run using mpiexec)
28 edhill 1.4 #
29 jmc 1.8 #-- Multi-Threading with OpenMP:
30     # -several problems with earlier version of ifort (including some version 8)
31     # -with version 9 and more recent one:
32     # 1) compile with genmake2 -omp option ;
33     # 2) needs to set environment variable OMP_NUM_THREADS, and generally,
34     # needs also to increase the thread stack-size:
35     # (sh, bash) > export OMP_NUM_THREADS=2
36     # > export KMP_STACKSIZE=400m
37     # (csh,tcsh) > setenv OMP_NUM_THREADS 2
38     # > setenv KMP_STACKSIZE 400m
39     # NOTE: set KMP_STACKSIZE in .bashrc/.profile/.cshrc/.tcshrc is the easiest
40     # way (I found) to set it for all proc; not an issue (?) for OMP_NUM_THREADS
41 edhill 1.4
42 jmc 1.8 # Notes: the PBS -V option for exporting environment variables does not work
43     # => need to set all env var on compute nodes
44 edhill 1.1
45 edhill 1.4 FC='mpif77'
46     CC='mpicc'
47 cnh 1.5 F90C='mpif90 -fixed -c '
48 edhill 1.4 LINK='mpif77'
49 jmc 1.8
50     #-- for NetCDF:
51     INCLUDES="-I$NETCDF_INCDIR"
52     INCLUDEDIRS=$NETCDF_INCDIR
53     LIBS="-L$NETCDF_LIBDIR"
54    
55     #- for MPI:
56     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
57     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
58     MPIINCLUDEDIR="$MPI_INC_DIR"
59     MPI_HEADER_FILES='mpif.h mpiof.h'
60     MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'
61 edhill 1.1
62 edhill 1.4 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
63 edhill 1.1 CPP='cpp -traditional -P'
64 jmc 1.7 EXTENDED_SRC_FLAG='-132'
65 jmc 1.8 OMPFLAG='-openmp'
66 edhill 1.4
67     NOOPTFLAGS='-O0'
68     NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F'
69 edhill 1.1
70     # Note that the -mp switch is for ieee "maintain precision" and is
71     # roughly equivalent to -ieee
72     if test "x$IEEE" = x ; then
73     FOPTIM='-O3 -align'
74 edhill 1.4 #P3 FOPTIM=$FOPTIM' -tpp6 -xWKM'
75     #P4 FOPTIM=$FOPTIM' -tpp7 -xWKM'
76 jmc 1.7 FFLAGS='-r8 -i4 -w95 -W0 -WB -assume byterecl -convert big_endian'
77 edhill 1.1 else
78 edhill 1.4 # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
79 jmc 1.7 FOPTIM='-O0 -noalign -CB -CU -CV'
80     FFLAGS='-r8 -i4 -w95 -W0 -WB -pc64 -xW -assume byterecl -convert big_endian'
81     # FLAGS='-mp -r8 -i4 -w95 -W0 -WB -assume byterecl -convert big_endian'
82 edhill 1.1 fi
83 utke 1.6 F90FLAGS=$FFLAGS
84     F90OPTIM=$FOPTIM
85 edhill 1.1
86 edhill 1.4 NOOPTFILES=$NOOPTFILES' mitcplr_char2real.F mitcplr_real2char.F'
87     NOOPTFILES=$NOOPTFILES' mitcplr_char2int.F mitcplr_int2char.F mds_byteswap.F'
88 jmc 1.8

  ViewVC Help
Powered by ViewVC 1.1.22