/[MITgcm]/MITgcm/tools/build_options/unsupported/linux_amd64_ifort11+mpi_generic
ViewVC logotype

Annotation of /MITgcm/tools/build_options/unsupported/linux_amd64_ifort11+mpi_generic

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


Revision 1.1 - (hide annotations) (download)
Thu Sep 29 16:09:31 2011 UTC (12 years, 7 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64i, checkpoint64h, checkpoint64k, checkpoint64j, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint64a, checkpoint64c, checkpoint64b, checkpoint64e, checkpoint64d, checkpoint64g, checkpoint64f, checkpoint63p, checkpoint63q, checkpoint63r, checkpoint63s, checkpoint63l, checkpoint63m, checkpoint63n, checkpoint63o, checkpoint63h, checkpoint63i, checkpoint63j, checkpoint63k, checkpoint63d, checkpoint63e, checkpoint63f, checkpoint63g, checkpoint64, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
move to unsupported/ (has been merged into linux_amd64_ifort11)

1 jmc 1.1 #!/bin/bash
2     #
3     # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_ifort11+mpi_generic,v 1.3 2011/07/07 22:59:02 jmc Exp $
4     # $Name: $
5     #
6     # Constantinos Evangelinos
7     #
8     # Build options for the intel 11 & 12 fortran compiler with a generic MPI
9     # ==> DON'T FORGET to set environment variable MPI_INC_DIR to the include
10     # directory of your MPI implementation
11    
12     # Tested on danton (FC 14), with and without OpenMP, using
13     # intel compiler v.11.1.046 (20090630) and also v.12.0.4 (20110427)
14    
15     #-------
16     # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
17     # and generally, needs to increase the stack-size:
18     # - sh,bash:
19     # > export OMP_NUM_THREADS=2
20     # > export KMP_STACKSIZE=400m
21     # - csh,tcsh:
22     # > setenv OMP_NUM_THREADS 2
23     # > setenv KMP_STACKSIZE 400m
24     # NOTE: need to set KMP_STACKSIZE in ~/.tcshrc
25     # (but curiously, works without OMP_NUM_THREADS in ~/.tcshrc).
26     #-------
27    
28     FC=${FC:=mpif77}
29     F90C=${F90C:=mpif90}
30     CC=${CC:=mpicc}
31     LINK="$F90C -shared-intel -no-ipo"
32    
33     DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
34     CPP='cpp -traditional -P'
35     F90FIXEDFORMAT='-fixed -Tf'
36     EXTENDED_SRC_FLAG='-132'
37     GET_FC_VERSION="--version"
38     OMPFLAG='-openmp'
39    
40     NOOPTFLAGS='-O0 -g'
41     NOOPTFILES=''
42    
43     INCLUDEDIRS=''
44     INCLUDES=''
45     LIBS=''
46    
47     if test "x$GENERIC" != x ; then
48     PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
49     else
50     PROCF=-xHost
51     fi
52    
53     FFLAGS="$FFLAGS -m64 -fPIC -convert big_endian -assume byterecl"
54     #- might want to use '-r8' for fizhi pkg:
55     #FFLAGS="$FFLAGS -r8"
56    
57     if test "x$IEEE" = x ; then #- with optimisation:
58     FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
59     else
60     if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
61     FOPTIM="-O0 -fp-model source -noalign $PROCF"
62     else #- development/check options:
63     #FFLAGS="$FFLAGS -debug all -debug-parameters all -fp-model strict"
64     FFLAGS="$FFLAGS -warn all -warn nounused"
65     FOPTIM="-fpe0 -ftz -fp-stack-check -check all -ftrapuv"
66     FOPTIM="$FOPTIM -O0 -noalign -g -traceback $PROCF"
67     fi
68     fi
69    
70     F90FLAGS=$FFLAGS
71     F90OPTIM=$FOPTIM
72     CFLAGS="-O0 -ip -m64 -fPIC $PROCF"
73    
74     if [ "x$NETCDF_ROOT" != x ] ; then
75     INCLUDEDIRS="${NETCDF_ROOT}/include"
76     INCLUDES="-I${NETCDF_ROOT}/include"
77     LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_ROOT}/lib"
78     elif [ "x$NETCDF_HOME" != x ]; then
79     INCLUDEDIRS="${NETCDF_HOME}/include"
80     INCLUDES="-I${NETCDF_HOME}/include"
81     LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_HOME}/lib"
82     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
83     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
84     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
85     INCLUDEDIRS="${NETCDF_INC}"
86     INCLUDES="-I${NETCDF_INC}"
87     LIBS="-L${NETCDF_LIB}"
88     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
89     INCLUDEDIRS="${NETCDF_INCDIR}"
90     INCLUDES="-I${NETCDF_INCDIR}"
91     LIBS="-L${NETCDF_LIBDIR}"
92     elif test -d /usr/include/netcdf-3 ; then
93     INCLUDEDIRS='/usr/include/netcdf-3'
94     INCLUDES='-I/usr/include/netcdf-3'
95     LIBS='-L/usr/lib64/netcdf-3 -L/usr/lib/netcdf-3'
96     elif test -d /usr/local/pkg/netcdf ; then
97     INCLUDEDIRS='/usr/local/pkg/netcdf/include'
98     INCLUDES='-I/usr/local/pkg/netcdf/include'
99     LIBS='-L/usr/local/pkg-x86_64/netcdf/lib64 -L/usr/local/pkg-x86_64/netcdf/lib -L/usr/local/pkg/netcdf/lib64 -L/usr/local/pkg/netcdf/lib'
100     elif test -d /usr/include/netcdf ; then
101     INCLUDEDIRS='/usr/include/netcdf'
102     INCLUDES='-I/usr/include/netcdf'
103     elif test -d /usr/local/netcdf ; then
104     INCLUDEDIRS='/usr/include/netcdf/include'
105     INCLUDES='-I/usr/local/netcdf/include'
106     LIBS='-L/usr/local/netcdf/lib64 -L/usr/local/netcdf/lib'
107     elif test -f /usr/local/include/netcdf.inc ; then
108     INCLUDEDIRS='/usr/local/include'
109     INCLUDES='-I/usr/local/include'
110     LIBS='-L/usr/local/lib64 -L/usr/local/lib'
111     fi
112    
113     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
114     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
115     MPIINCLUDEDIR="$MPI_INC_DIR"
116     MPI_HEADER_FILES='mpif.h mpiof.h'
117     MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'

  ViewVC Help
Powered by ViewVC 1.1.22