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

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

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

revision 1.2 by edhill, Sun Nov 14 19:30:42 2004 UTC revision 1.8 by jmc, Fri Jun 26 16:06:08 2009 UTC
# Line 1  Line 1 
1  #!/bin/bash  #!/bin/bash
2  #  #
3  #  Ed Hill  #  $Header$
4  #  #
5  #  tested on faulks, 20030818  #  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  #  #
9  #  Build options for the intel 8.0 fortran compiler  #  Needs the appropriate module commands,
10  #  the compiler is now called ifort (not ifc) and it appears to  #  and DON'T FORGET to set environment variable MPI_INC_DIR to the include
11  #  need -DWORDLENGTH=1 and not -DWORDLENGTH=4 (which is what ifc 6.0) used to have.  #  directory of the selected MPI implementation
12    #
13    #-- using default intel (v8.1) and default mpich/intel:
14    #    module add mpich/intel
15    #    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    #
29    #-- 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    
42    # Notes: the PBS -V option for exporting environment variables does not work
43    #        => need to set all env var on compute nodes
44    
45    FC='mpif77'
46    CC='mpicc'
47    F90C='mpif90 -fixed -c '
48    LINK='mpif77'
49    
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    
62  FC=mpif77  DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
 CC=mpicc  
 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=1'  
 LINK=mpif77  
63  CPP='cpp  -traditional -P'  CPP='cpp  -traditional -P'
64  INCLUDES='-I/usr/local/pkg/mpich/mpich-intel/include -I/usr/local/pkg/ifc/ifc-8.1.018/include'  EXTENDED_SRC_FLAG='-132'
65    OMPFLAG='-openmp'
66    
67    NOOPTFLAGS='-O0'
68    NOOPTFILES='mds_byteswapr8.F mds_byteswapr4.F mds_byteswapi4.F'
69    
70  #  Note that the -mp switch is for ieee "maintain precision" and is  #  Note that the -mp switch is for ieee "maintain precision" and is
71  #  roughly equivalent to -ieee  #  roughly equivalent to -ieee
72  if test "x$IEEE" = x ; then  if test "x$IEEE" = x ; then
73      FOPTIM='-O3 -align'      FOPTIM='-O3 -align'
74  #P3 FOPTIM=$FOPTIM' -tpp6 -xWKM'      #P3 FOPTIM=$FOPTIM' -tpp6 -xWKM'
75  #P4 FOPTIM=$FOPTIM' -tpp7 -xWKM'      #P4 FOPTIM=$FOPTIM' -tpp7 -xWKM'
76      FFLAGS='-132 -r8 -i4 -w95 -W0 -WB'      FFLAGS='-r8 -i4 -w95 -W0 -WB -assume byterecl -convert big_endian'
77  else  else
78      FFLAGS='-mp -132 -r8 -i4 -w95 -W0 -WB'      # FOPTIM='-O0 -noalign -CA -CB -CU -CV -CS'
79        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  fi  fi
83    F90FLAGS=$FFLAGS
84    F90OPTIM=$FOPTIM
85    
86    NOOPTFILES=$NOOPTFILES' mitcplr_char2real.F mitcplr_real2char.F'
87    NOOPTFILES=$NOOPTFILES' mitcplr_char2int.F mitcplr_int2char.F mds_byteswap.F'
88    

Legend:
Removed from v.1.2  
changed lines
  Added in v.1.8

  ViewVC Help
Powered by ViewVC 1.1.22