/[MITgcm]/MITgcm/tools/build_options/linux_amd64_ifort11_generic_mpi
ViewVC logotype

Contents of /MITgcm/tools/build_options/linux_amd64_ifort11_generic_mpi

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


Revision 1.1 - (show annotations) (download)
Mon Jun 22 23:13:30 2009 UTC (14 years, 10 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62b, checkpoint62a, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint62, checkpoint61z, checkpoint61x, checkpoint61y
New and updated optfiles for Intel 11, 10.1 and Pathscale/Open64.

1 #!/bin/bash
2 #
3 # Constantinos Evangelinos
4 #
5 # Build options for the intel 11 fortran compiler with a generic MPI
6 # DON'T FORGET to set environment variable MPI_INC_DIR to the include
7 # directory of your MPI implementation
8
9 FC=${FC:=mpif77}
10 F90C=${F90C:=mpif90}
11 CC=${CC:=mpicc}
12 LINK="$F90C -shared-intel -no-ipo"
13
14 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
15 CPP='cpp -traditional -P'
16 F90FIXEDFORMAT='-fixed -Tf'
17 EXTENDED_SRC_FLAG='-132'
18
19 NOOPTFLAGS='-O0 -g -m64 -fPIC'
20 NOOPTFILES=''
21
22 INCLUDEDIRS=''
23 INCLUDES=''
24 LIBS=''
25
26 if test "x$DEVEL" != x ; then
27 FFLAGS='-m64 -fPIC -r8 -i4 -convert big_endian -assume byterecl -O0 -g -debug all -debug-parameters all -noalign -fp-stack-check -check all -fpe0 -traceback -ftrapuv -fp-model strict -warn all'
28 else
29 FFLAGS='-m64 -fPIC -r8 -i4 -W0 -WB -convert big_endian -assume byterecl'
30 fi
31
32 if test "x$GENERIC" != x ; then
33 PROCF=-axSSE4.2,SSE4.1,SSSE3,SSE3,SSE2
34 else
35 PROCF=-xHost
36 fi
37 # Note that the -mp switch is for ieee "maintain precision" and is
38 # roughly equivalent to -ieee
39 # Note the addition of -g to circumvent bug with Intel 11.
40 if test "x$IEEE" = x ; then
41 FOPTIM="-O2 -align -ip -opt-streaming-stores auto $PROCF"
42 else
43 if test "x$DEVEL" != x ; then
44 FOPTIM="$PROCF"
45 else
46 FOPTIM="-O0 -fp-model source -noalign $PROCF"
47 fi
48 fi
49 F90FLAGS=$FFLAGS
50 F90OPTIM=$FOPTIM
51 CFLAGS="-O2 -ip -m64 -fPIC $PROCF"
52
53 if [ "x$NETCDF_ROOT" != x ] ; then
54 INCLUDEDIRS="${NETCDF_ROOT}/include"
55 INCLUDES="-I${NETCDF_ROOT}/include"
56 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_ROOT}/lib"
57 elif [ "x$NETCDF_HOME" != x ]; then
58 INCLUDEDIRS="${NETCDF_HOME}/include"
59 INCLUDES="-I${NETCDF_HOME}/include"
60 LIBS="-L${NETCDF_ROOT}/lib64 -L${NETCDF_HOME}/lib"
61 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
62 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
63 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
64 INCLUDEDIRS="${NETCDF_INC}"
65 INCLUDES="-I${NETCDF_INC}"
66 LIBS="-L${NETCDF_LIB}"
67 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
68 INCLUDEDIRS="${NETCDF_INCDIR}"
69 INCLUDES="-I${NETCDF_INCDIR}"
70 LIBS="-L${NETCDF_LIBDIR}"
71 elif test -d /usr/include/netcdf-3 ; then
72 INCLUDEDIRS='/usr/include/netcdf-3'
73 INCLUDES='-I/usr/include/netcdf-3'
74 LIBS='-L/usr/lib64/netcdf-3 -L/usr/lib/netcdf-3'
75 elif test -d /usr/local/pkg/netcdf ; then
76 INCLUDEDIRS='/usr/local/pkg/netcdf/include'
77 INCLUDES='-I/usr/local/pkg/netcdf/include'
78 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'
79 elif test -d /usr/include/netcdf ; then
80 INCLUDEDIRS='/usr/include/netcdf'
81 INCLUDES='-I/usr/include/netcdf'
82 elif test -d /usr/local/netcdf ; then
83 INCLUDEDIRS='/usr/include/netcdf/include'
84 INCLUDES='-I/usr/local/netcdf/include'
85 LIBS='-L/usr/local/netcdf/lib64 -L/usr/local/netcdf/lib'
86 elif test -f /usr/local/include/netcdf.inc ; then
87 INCLUDEDIRS='/usr/local/include'
88 INCLUDES='-I/usr/local/include'
89 LIBS='-L/usr/local/lib64 -L/usr/local/lib'
90 fi
91
92 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
93 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
94 MPIINCLUDEDIR="$MPI_INC_DIR"
95 MPI_HEADER_FILES='mpif.h mpiof.h'
96 MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'

  ViewVC Help
Powered by ViewVC 1.1.22