/[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.1 - (hide annotations) (download)
Fri Feb 23 02:52:25 2007 UTC (17 years, 2 months ago) by ce107
Branch: MAIN
CVS Tags: checkpoint59, checkpoint58x_post, checkpoint58y_post, checkpoint58w_post
New optfiles for ifort on AMD64 architectures. The MPI implementation is left
to be generic provided it has compiler drivers mpif77 etc. and its include
directory is specified in the environment variable MPI_INC_DIR

1 ce107 1.1 #!/bin/bash
2     #
3     # composed and tested by ce107 on ross/weddell
4     # for more speed on Core2 processors replace -xW with -xT
5     # for more speed on Pentium4 based EM64T processors replaces -xW with -xP
6     #
7     # DON'T FORGET to set environment variable MPI_INC_DIR to the include
8     # directory of your MPI implementation
9    
10     FC=mpif77
11     F90C=mpif90
12     CC=mpicc
13     LINK='mpif90 -i-static -no-ipo'
14    
15     DEFINES='-DALLOW_USE_MPI -DALWAYS_USE_MPI -DWORDLENGTH=4'
16     CPP='cpp -traditional -P'
17     F90FIXEDFORMAT='-fixed -Tf'
18    
19     NOOPTFLAGS='-O0 -g -m64 -fPIC'
20     NOOPTFILES=''
21    
22     INCLUDEDIRS=''
23     INCLUDES=''
24     LIBS=''
25    
26     if test "x$DEVEL" != x ; then
27     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'
28     else
29     FFLAGS='-132 -r8 -i4 -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC'
30     fi
31    
32     # Note that the -mp switch is for ieee "maintain precision" and is
33     # roughly equivalent to -ieee
34     if test "x$IEEE" = x ; then
35     # No need for IEEE-754
36     FOPTIM='-O3 -align -xW -ip'
37     else
38     # Try to follow IEEE-754
39     FOPTIM='-O2 -align -xW -ip -mp'
40     fi
41     F90FLAGS=$FFLAGS
42     F90OPTIM=$FOPTIM
43     CFLAGS='-O3 -ip -fPIC'
44    
45     if [ "x$NETCDF_ROOT" != x ] ; then
46     INCLUDEDIRS="${NETCDF_ROOT}/include"
47     INCLUDES="-I${NETCDF_ROOT}/include"
48     LIBS="-L${NETCDF_ROOT}/lib"
49     elif [ "x$NETCDF_HOME" != x ]; then
50     INCLUDEDIRS="${NETCDF_HOME}/include"
51     INCLUDES="-I${NETCDF_HOME}/include"
52     LIBS="-L${NETCDF_HOME}/lib"
53     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
54     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
55     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
56     INCLUDEDIRS="${NETCDF_INC}"
57     INCLUDES="-I${NETCDF_INC}"
58     LIBS="-L${NETCDF_LIB}"
59     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
60     INCLUDEDIRS="${NETCDF_INCDIR}"
61     INCLUDES="-I${NETCDF_INCDIR}"
62     LIBS="-L${NETCDF_LIBDIR}"
63     elif test -d /usr/include/netcdf-3 ; then
64     INCLUDEDIRS='/usr/include/netcdf-3'
65     INCLUDES='-I/usr/include/netcdf-3'
66     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
67     elif test -d /usr/include/netcdf ; then
68     INCLUDEDIRS='/usr/include/netcdf'
69     INCLUDES='-I/usr/include/netcdf'
70     elif test -d /usr/local/netcdf ; then
71     INCLUDEDIRS='/usr/include/netcdf/include'
72     INCLUDES='-I/usr/local/netcdf/include'
73     LIBS='-L/usr/local/netcdf/lib'
74     elif test -d /usr/local/include/netcdf.inc ; then
75     INCLUDEDIRS='/usr/local/include'
76     INCLUDES='-I/usr/local/include'
77     LIBS='-L/usr/local/lib64'
78     fi
79    
80    
81     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
82     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
83     MPIINCLUDEDIR="$MPI_INC_DIR"
84     MPI_HEADER_FILES='mpif.h mpiof.h'
85     MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'

  ViewVC Help
Powered by ViewVC 1.1.22