/[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.4 - (show annotations) (download)
Fri Mar 5 22:31:47 2010 UTC (14 years, 2 months ago) by jmc
Branch: MAIN
Changes since 1.3: +15 -12 lines
update comments ; add CVS Header & Name.

1 #!/bin/bash
2 #
3 # $Header: $
4 # $Name: $
5
6 # Tested on columbia (SGI Altix cluster)
7 # a) Processor specific flags:
8 # 1) for more speed on Core2 processors replace -xW with -xT
9 # 2) for more speed on Pentium4 based EM64T processors replaces -xW with -xP
10 # b) For more speed, provided your data size doesn't exceed 2GB you can
11 # remove -fPIC which carries a performance penalty of 2-6%.
12 # c) Provided that the libraries you link to are compiled with -fPIC this
13 # optfile should work.
14 # d) You can replace -fPIC with -mcmodel=medium which may perform faster
15 # then -fPIC and still support data sizes over 2GB per process but all
16 # the libraries you link to myst be compiled with -fPIC or -mcmodel=medium
17 # e) Changed from -O3 to -O2 to avoid buggy Intel v.10 compilers. Speed
18 # impact appears to be minimal.
19
20 FC=ifort
21 F90C=ifort
22 CC=icc
23 LINK='ifort -static'
24
25 DEFINES='-DWORDLENGTH=4'
26 CPP='cpp -traditional -P'
27 F90FIXEDFORMAT='-fixed -Tf'
28 EXTENDED_SRC_FLAG='-132'
29 #OMPFLAG='-openmp'
30
31 NOOPTFLAGS='-O0 -g -m64 -fPIC'
32 NOOPTFILES=''
33
34 INCLUDEDIRS=''
35 INCLUDES=''
36 LIBS=''
37
38 if test "x$DEVEL" != x ; then
39 FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all"
40 else
41 FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC"
42 fi
43 #- might want to use '-r8' for fizhi pkg:
44 #FFLAGS="$FFLAGS -r8"
45
46 # Note that the -mp switch is for ieee "maintain precision" and is
47 # roughly equivalent to -ieee
48 if test "x$IEEE" = x ; then
49 # No need for IEEE-754
50 FOPTIM='-O2 -align'
51 else
52 # Try to follow IEEE-754
53 FOPTIM='-O0 -noalign -mp'
54 fi
55 F90FLAGS=$FFLAGS
56 F90OPTIM=$FOPTIM
57 CFLAGS='-O2 -ip -fPIC'
58
59 if [ "x$NETCDF_ROOT" != x ] ; then
60 INCLUDEDIRS="${NETCDF_ROOT}/include"
61 INCLUDES="-I${NETCDF_ROOT}/include"
62 LIBS="-L${NETCDF_ROOT}/lib"
63 elif [ "x$NETCDF_HOME" != x ]; then
64 INCLUDEDIRS="${NETCDF_HOME}/include"
65 INCLUDES="-I${NETCDF_HOME}/include"
66 LIBS="-L${NETCDF_HOME}/lib"
67 elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
68 NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
69 NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
70 INCLUDEDIRS="${NETCDF_INC}"
71 INCLUDES="-I${NETCDF_INC}"
72 LIBS="-L${NETCDF_LIB}"
73 elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
74 INCLUDEDIRS="${NETCDF_INCDIR}"
75 INCLUDES="-I${NETCDF_INCDIR}"
76 LIBS="-L${NETCDF_LIBDIR}"
77 elif test -d /usr/include/netcdf-3 ; then
78 INCLUDEDIRS='/usr/include/netcdf-3'
79 INCLUDES='-I/usr/include/netcdf-3'
80 LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
81 elif test -d /usr/include/netcdf ; then
82 INCLUDEDIRS='/usr/include/netcdf'
83 INCLUDES='-I/usr/include/netcdf'
84 elif test -d /usr/local/netcdf ; then
85 INCLUDEDIRS='/usr/include/netcdf/include'
86 INCLUDES='-I/usr/local/netcdf/include'
87 LIBS='-L/usr/local/netcdf/lib'
88 elif test -d /usr/local/include/netcdf.inc ; then
89 INCLUDEDIRS='/usr/local/include'
90 INCLUDES='-I/usr/local/include'
91 LIBS='-L/usr/local/lib64'
92 fi

  ViewVC Help
Powered by ViewVC 1.1.22