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

Contents of /MITgcm/tools/build_options/linux_ia64_ifort

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


Revision 1.6 - (show annotations) (download)
Wed Jan 11 17:34:00 2012 UTC (12 years, 4 months ago) by mlosch
Branch: MAIN
Changes since 1.5: +42 -23 lines
- add (copy) scheme to set MPI include paths
- update flags for ifort 12.1.0, update some comments

1 #!/bin/bash
2 #
3 # $Header: $
4 # $Name: $
5
6 # Tested on uv100.awi.de (SGI UV 100, details:
7 # http://www.sgi.com/products/servers/uv/specs.html)
8 # a) For more speed, provided your data size does not exceed 2GB you can
9 # remove -fPIC which carries a performance penalty of 2-6%.
10 # b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may
11 # perform faster than -fPIC and still support data sizes over 2GB per
12 # process but all the libraries you link to must be compiled with
13 # -fPIC or -mcmodel=medium
14 # c) flags adjusted for ifort 12.1.0
15
16 FC=ifort
17 F90C=ifort
18 CC=icc
19 # requires that all static libraries are available:
20 #LINK='ifort -static'
21 LINK='ifort'
22 # for adjoint runs the default makedepend often cannot handle enough files
23 #MAKEDEPEND=tools_xmakedepend
24
25 DEFINES='-DWORDLENGTH=4'
26 CPP='cpp -traditional -P'
27 F90FIXEDFORMAT='-fixed -Tf'
28 EXTENDED_SRC_FLAG='-132'
29 #OMPFLAG='-openmp'
30
31 INCLUDEDIRS=''
32 INCLUDES=''
33 LIBS=''
34
35 MCMODEL='-fPIC'
36 # for large memory requirements uncomment this line
37 #MCMODEL='-mcmodel=medium -shared-intel'
38 FFLAGS="-W0 -WB -convert big_endian -assume byterecl $MCMODEL"
39
40 NOOPTFLAGS="-O0 -g -m64"
41 NOOPTFILES=''
42
43 if test "x$DEVEL" != x ; then
44 FFLAGS="$FFLAGS -O0 -g -noalign -check all -fpe0 -traceback -ftrapuv -fp-model precise -fp-model except -warn all"
45 else
46 FFLAGS="$FFLAGS"
47 fi
48 #- might want to use '-r8' for fizhi pkg:
49 #FFLAGS="$FFLAGS -r8"
50
51 # Note that the -mp switch is for ieee "maintain precision" and is
52 # roughly equivalent to -ieee
53 if test "x$IEEE" = x ; then
54 # No need for IEEE-754
55 FOPTIM='-O3 -align'
56 # does not work when -static does not work
57 # FOPTIM='-fast -align'
58 # instead you can use
59 # FOPTIM='-O3 -ipo -align'
60 else
61 # Try to follow IEEE-754
62 FOPTIM='-O0 -noalign -fp-model precise'
63 # -fltconsistency'
64 fi
65 F90FLAGS=$FFLAGS
66 F90OPTIM=$FOPTIM
67 CFLAGS="-O0 -ip $MCMODEL"
68
69 if [ "x$NETCDF_ROOT" != x ] ; then
70 INCLUDEDIRS="${NETCDF_ROOT}/include"
71 INCLUDES="-I${NETCDF_ROOT}/include"
72 LIBS="-L${NETCDF_ROOT}/lib"
73 elif [ "x$NETCDF_HOME" != x ]; then
74 INCLUDEDIRS="${NETCDF_HOME}/include"
75 INCLUDES="-I${NETCDF_HOME}/include"
76 LIBS="-L${NETCDF_HOME}/lib"
77 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
78 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
79 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
80 INCLUDEDIRS="${NETCDF_INC}"
81 INCLUDES="-I${NETCDF_INC}"
82 LIBS="-L${NETCDF_LIB}"
83 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
84 INCLUDEDIRS="${NETCDF_INCDIR}"
85 INCLUDES="-I${NETCDF_INCDIR}"
86 LIBS="-L${NETCDF_LIBDIR}"
87 elif test -d /usr/include/netcdf-3 ; then
88 INCLUDEDIRS='/usr/include/netcdf-3'
89 INCLUDES='-I/usr/include/netcdf-3'
90 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
91 elif test -d /usr/include/netcdf ; then
92 INCLUDEDIRS='/usr/include/netcdf'
93 INCLUDES='-I/usr/include/netcdf'
94 elif test -d /usr/local/netcdf ; then
95 INCLUDEDIRS='/usr/include/netcdf/include'
96 INCLUDES='-I/usr/local/netcdf/include'
97 LIBS='-L/usr/local/netcdf/lib'
98 elif test -d /usr/local/include/netcdf.inc ; then
99 INCLUDEDIRS='/usr/local/include'
100 INCLUDES='-I/usr/local/include'
101 LIBS='-L/usr/local/lib64'
102 fi
103
104 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
105 LIBS="$LIBS -lmpi"
106 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
107 INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
108 MPIINCLUDEDIR="$MPI_INC_DIR"
109 MPI_HEADER_FILES='mpif.h mpiof.h'
110 MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'
111 fi

  ViewVC Help
Powered by ViewVC 1.1.22