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

Annotation of /MITgcm/tools/build_options/linux_amd64_ifort

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


Revision 1.7 - (hide annotations) (download)
Mon Mar 22 19:47:52 2010 UTC (14 years, 1 month ago) by jmc
Branch: MAIN
CVS Tags: checkpoint63a, checkpoint63b, checkpoint63, checkpoint62g, checkpoint62f, checkpoint62e, checkpoint62d, checkpoint62k, checkpoint62j, checkpoint62i, checkpoint62h, checkpoint62o, checkpoint62n, checkpoint62m, checkpoint62l, checkpoint62s, checkpoint62r, checkpoint62q, checkpoint62p, checkpoint62w, checkpoint62v, checkpoint62u, checkpoint62t, checkpoint62z, checkpoint62y, checkpoint62x
Changes since 1.6: +2 -2 lines
fix previous modif (typo in FFLAGS setting)

1 ce107 1.1 #!/bin/bash
2 jmc 1.5 #
3 jmc 1.7 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_ifort,v 1.6 2010/03/21 18:00:26 jmc Exp $
4 jmc 1.5 # $Name: $
5     #
6    
7 ce107 1.3 # Composed and tested by ce107 on ross/weddell (Opteron system)
8     # Should work fine on EM64T and other AMD64 compatible Intel systems
9     # a) Processor specific flags:
10     # 1) for more speed on Core2 processors replace -xW with -xT
11     # 2) for more speed on Pentium4 based EM64T processors replaces -xW with -xP
12     # b) For more speed, provided your data size doesn't exceed 2GB you can
13     # remove -fPIC which carries a performance penalty of 2-6%.
14     # c) Provided that the libraries you link to are compiled with -fPIC this
15     # optfile should work.
16     # d) You can replace -fPIC with -mcmodel=medium which may perform faster
17 jmc 1.5 # than -fPIC and still support data sizes over 2GB per process but all
18 jmc 1.6 # the libraries you link to must be compiled with -fPIC or -mcmodel=medium
19 jmc 1.5 # e) Changed from -O3 to -O2 to avoid buggy Intel v.10 compilers. Speed
20 ce107 1.4 # impact appears to be minimal.
21 jmc 1.5
22     #-------
23     # run with OpenMP: needs to set environment var. OMP_NUM_THREADS
24     # and generally, needs to increase the stack-size:
25     # - sh,bash:
26     # > export OMP_NUM_THREADS=2
27     # > export KMP_STACKSIZE=400m
28     # - csh,tcsh:
29     # > setenv OMP_NUM_THREADS 2
30     # > setenv KMP_STACKSIZE 400m
31     #-------
32    
33 ce107 1.1 FC=ifort
34     F90C=ifort
35     CC=icc
36 ce107 1.3 LINK='ifort -i-dynamic -no-ipo'
37 ce107 1.1
38     DEFINES='-DWORDLENGTH=4'
39     CPP='cpp -traditional -P'
40     F90FIXEDFORMAT='-fixed -Tf'
41 jmc 1.5 EXTENDED_SRC_FLAG='-132'
42     OMPFLAG='-openmp'
43 ce107 1.1
44     NOOPTFLAGS='-O0 -g -m64 -fPIC'
45     NOOPTFILES=''
46    
47     INCLUDEDIRS=''
48     INCLUDES=''
49     LIBS=''
50    
51     if test "x$DEVEL" != x ; then
52 jmc 1.6 FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all"
53 ce107 1.1 else
54 jmc 1.7 FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC"
55 ce107 1.1 fi
56 jmc 1.5 #- might want to use '-r8' for fizhi pkg:
57     #FFLAGS="$FFLAGS -r8"
58 ce107 1.1
59     # Note that the -mp switch is for ieee "maintain precision" and is
60     # roughly equivalent to -ieee
61     if test "x$IEEE" = x ; then
62     # No need for IEEE-754
63 ce107 1.4 FOPTIM='-O2 -align -xW -ip'
64 ce107 1.1 else
65     # Try to follow IEEE-754
66     FOPTIM='-O2 -align -xW -ip -mp'
67     fi
68     F90FLAGS=$FFLAGS
69     F90OPTIM=$FOPTIM
70 ce107 1.4 CFLAGS='-O2 -ip -fPIC'
71 ce107 1.1
72     if [ "x$NETCDF_ROOT" != x ] ; then
73     INCLUDEDIRS="${NETCDF_ROOT}/include"
74     INCLUDES="-I${NETCDF_ROOT}/include"
75     LIBS="-L${NETCDF_ROOT}/lib"
76     elif [ "x$NETCDF_HOME" != x ]; then
77     INCLUDEDIRS="${NETCDF_HOME}/include"
78     INCLUDES="-I${NETCDF_HOME}/include"
79     LIBS="-L${NETCDF_HOME}/lib"
80     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
81     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
82     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
83     INCLUDEDIRS="${NETCDF_INC}"
84     INCLUDES="-I${NETCDF_INC}"
85     LIBS="-L${NETCDF_LIB}"
86     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
87     INCLUDEDIRS="${NETCDF_INCDIR}"
88     INCLUDES="-I${NETCDF_INCDIR}"
89     LIBS="-L${NETCDF_LIBDIR}"
90     elif test -d /usr/include/netcdf-3 ; then
91     INCLUDEDIRS='/usr/include/netcdf-3'
92     INCLUDES='-I/usr/include/netcdf-3'
93     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
94     elif test -d /usr/include/netcdf ; then
95     INCLUDEDIRS='/usr/include/netcdf'
96     INCLUDES='-I/usr/include/netcdf'
97     elif test -d /usr/local/netcdf ; then
98     INCLUDEDIRS='/usr/include/netcdf/include'
99     INCLUDES='-I/usr/local/netcdf/include'
100     LIBS='-L/usr/local/netcdf/lib'
101     elif test -d /usr/local/include/netcdf.inc ; then
102     INCLUDEDIRS='/usr/local/include'
103     INCLUDES='-I/usr/local/include'
104     LIBS='-L/usr/local/lib64'
105     fi

  ViewVC Help
Powered by ViewVC 1.1.22