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

Annotation 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.2 - (hide annotations) (download)
Fri Apr 20 20:14:02 2007 UTC (17 years ago) by ce107
Branch: MAIN
CVS Tags: checkpoint59e, checkpoint59d, checkpoint59a, checkpoint59c, checkpoint59b
Changes since 1.1: +13 -4 lines
Updated to work properly with -fPIC and comments about -mcmodel=medium

1 ce107 1.1 #!/bin/bash
2     #
3 ce107 1.2 # 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 ce107 1.1 #
16     # DON'T FORGET to set environment variable MPI_INC_DIR to the include
17     # directory of your MPI implementation
18    
19     FC=mpif77
20     F90C=mpif90
21     CC=mpicc
22 ce107 1.2 LINK='mpif90 -i-dynamic -no-ipo'
23 ce107 1.1
24     DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
25     CPP='cpp -traditional -P'
26     F90FIXEDFORMAT='-fixed -Tf'
27    
28     NOOPTFLAGS='-O0 -g -m64 -fPIC'
29     NOOPTFILES=''
30    
31     INCLUDEDIRS=''
32     INCLUDES=''
33     LIBS=''
34    
35     if test "x$DEVEL" != x ; then
36     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'
37     else
38     FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC'
39     fi
40    
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     # No need for IEEE-754
45     FOPTIM='-O3 -align -xW -ip'
46     else
47     # Try to follow IEEE-754
48     FOPTIM='-O2 -align -xW -ip -mp'
49     fi
50     F90FLAGS=$FFLAGS
51     F90OPTIM=$FOPTIM
52     CFLAGS='-O3 -ip -fPIC'
53    
54     if [ "x$NETCDF_ROOT" != x ] ; then
55     INCLUDEDIRS="${NETCDF_ROOT}/include"
56     INCLUDES="-I${NETCDF_ROOT}/include"
57     LIBS="-L${NETCDF_ROOT}/lib"
58     elif [ "x$NETCDF_HOME" != x ]; then
59     INCLUDEDIRS="${NETCDF_HOME}/include"
60     INCLUDES="-I${NETCDF_HOME}/include"
61     LIBS="-L${NETCDF_HOME}/lib"
62     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
63     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
64     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
65     INCLUDEDIRS="${NETCDF_INC}"
66     INCLUDES="-I${NETCDF_INC}"
67     LIBS="-L${NETCDF_LIB}"
68     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
69     INCLUDEDIRS="${NETCDF_INCDIR}"
70     INCLUDES="-I${NETCDF_INCDIR}"
71     LIBS="-L${NETCDF_LIBDIR}"
72     elif test -d /usr/include/netcdf-3 ; then
73     INCLUDEDIRS='/usr/include/netcdf-3'
74     INCLUDES='-I/usr/include/netcdf-3'
75     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
76     elif test -d /usr/include/netcdf ; then
77     INCLUDEDIRS='/usr/include/netcdf'
78     INCLUDES='-I/usr/include/netcdf'
79     elif test -d /usr/local/netcdf ; then
80     INCLUDEDIRS='/usr/include/netcdf/include'
81     INCLUDES='-I/usr/local/netcdf/include'
82     LIBS='-L/usr/local/netcdf/lib'
83     elif test -d /usr/local/include/netcdf.inc ; then
84     INCLUDEDIRS='/usr/local/include'
85     INCLUDES='-I/usr/local/include'
86     LIBS='-L/usr/local/lib64'
87     fi
88    
89    
90     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
91     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
92     MPIINCLUDEDIR="$MPI_INC_DIR"
93     MPI_HEADER_FILES='mpif.h mpiof.h'
94     MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'

  ViewVC Help
Powered by ViewVC 1.1.22