/[MITgcm]/MITgcm/tools/build_options/linux_ia32_ifort11+mpi_generic
ViewVC logotype

Contents of /MITgcm/tools/build_options/linux_ia32_ifort11+mpi_generic

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


Revision 1.1 - (show annotations) (download)
Tue Feb 16 23:56:03 2010 UTC (14 years, 3 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint62c
rename "_generic_mpi" -> "+mpi_generic" (like other "+mpi" optfile)
 but keep the former optfile for few weeks for smooth transition

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

  ViewVC Help
Powered by ViewVC 1.1.22