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

Contents of /MITgcm/tools/build_options/linux_amd64_ifort_generic_mpi

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


Revision 1.3 - (show annotations) (download)
Tue Jul 31 22:26:20 2007 UTC (16 years, 8 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint62c, checkpoint62b, checkpoint62a, checkpoint59q, checkpoint59p, checkpoint59r, checkpoint59g, checkpoint59f, checkpoint59m, checkpoint59l, checkpoint59o, checkpoint59n, checkpoint59i, checkpoint59h, checkpoint59k, checkpoint59j, checkpoint61f, checkpoint61g, checkpoint61d, checkpoint61e, checkpoint61b, checkpoint61c, checkpoint61a, checkpoint61n, checkpoint61o, checkpoint61l, checkpoint61m, checkpoint61j, checkpoint61k, checkpoint61h, checkpoint61i, checkpoint61v, checkpoint61w, checkpoint61t, checkpoint61u, checkpoint61r, checkpoint61s, checkpoint61p, checkpoint61q, checkpoint61z, checkpoint61x, checkpoint61y, checkpoint60, checkpoint61, checkpoint62
Changes since 1.2: +4 -2 lines
Downgraded the default non-IEEE optimization level to -O2 to avoid trouble
with v.10 Intel compilers producing NaNs at -O3 (apart from -O3 -mp which
is slower than -O2)

1 #!/bin/bash
2 #
3 # Composed and tested by ce107 on ross/weddell (Opteron system)
4 # Should work fine on EM64T and other AMD64 compatible Intel systems
5 # a) Processor specific flags:
6 # 1) for more speed on Core2 processors replace -xW with -xT
7 # 2) for more speed on Pentium4 based EM64T processors replaces -xW with -xP
8 # b) For more speed, provided your data size doesn't exceed 2GB you can
9 # remove -fPIC which carries a performance penalty of 2-6%.
10 # c) Provided that the libraries you link to are compiled with -fPIC this
11 # optfile should work.
12 # d) You can replace -fPIC with -mcmodel=medium which may perform faster
13 # then -fPIC and still support data sizes over 2GB per process but all
14 # the libraries you link to myst be compiled with -fPIC or -mcmodel=medium
15 # e) Changed from -O3 to -O2 to avoid buggy Intel v.10 compilers. Speed
16 # impact appears to be minimal.
17 #
18 # DON'T FORGET to set environment variable MPI_INC_DIR to the include
19 # directory of your MPI implementation
20
21 FC=mpif77
22 F90C=mpif90
23 CC=mpicc
24 LINK='mpif90 -i-dynamic -no-ipo'
25
26 DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
27 CPP='cpp -traditional -P'
28 F90FIXEDFORMAT='-fixed -Tf'
29
30 NOOPTFLAGS='-O0 -g -m64 -fPIC'
31 NOOPTFILES=''
32
33 INCLUDEDIRS=''
34 INCLUDES=''
35 LIBS=''
36
37 if test "x$DEVEL" != x ; then
38 FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all'
39 else
40 FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC'
41 fi
42
43 # Note that the -mp switch is for ieee "maintain precision" and is
44 # roughly equivalent to -ieee
45 if test "x$IEEE" = x ; then
46 # No need for IEEE-754
47 FOPTIM='-O2 -align -xW -ip'
48 else
49 # Try to follow IEEE-754
50 FOPTIM='-O2 -align -xW -ip -mp'
51 fi
52 F90FLAGS=$FFLAGS
53 F90OPTIM=$FOPTIM
54 CFLAGS='-O2 -ip -fPIC'
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 -L/usr/lib64/netcdf-3'
78 elif test -d /usr/include/netcdf ; then
79 INCLUDEDIRS='/usr/include/netcdf'
80 INCLUDES='-I/usr/include/netcdf'
81 elif test -d /usr/local/netcdf ; then
82 INCLUDEDIRS='/usr/include/netcdf/include'
83 INCLUDES='-I/usr/local/netcdf/include'
84 LIBS='-L/usr/local/netcdf/lib'
85 elif test -d /usr/local/include/netcdf.inc ; then
86 INCLUDEDIRS='/usr/local/include'
87 INCLUDES='-I/usr/local/include'
88 LIBS='-L/usr/local/lib64'
89 fi
90
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