3 |
# $Header$ |
# $Header$ |
4 |
# $Name$ |
# $Name$ |
5 |
|
|
6 |
# Tested on columbia (SGI Altix cluster) |
# Tested on uv100.awi.de (SGI UV 100, details: |
7 |
# a) Processor specific flags: |
# http://www.sgi.com/products/servers/uv/specs.html) |
8 |
# 1) for more speed on Core2 processors replace -xW with -xT |
# a) For more speed, provided your data size does not exceed 2GB you can |
|
# 2) for more speed on Pentium4 based EM64T processors replaces -xW with -xP |
|
|
# 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%. |
# remove -fPIC which carries a performance penalty of 2-6%. |
10 |
# c) Provided that the libraries you link to are compiled with -fPIC this |
# b) You can replace -fPIC with '-mcmodel=medium -shared-intel' which may |
11 |
# optfile should work. |
# perform faster than -fPIC and still support data sizes over 2GB per |
12 |
# d) You can replace -fPIC with -mcmodel=medium which may perform faster |
# process but all the libraries you link to must be compiled with |
13 |
# than -fPIC and still support data sizes over 2GB per process but all |
# -fPIC or -mcmodel=medium |
14 |
# the libraries you link to must be compiled with -fPIC or -mcmodel=medium |
# c) flags adjusted for ifort 12.1.0 |
|
# e) Changed from -O3 to -O2 to avoid buggy Intel v.10 compilers. Speed |
|
|
# impact appears to be minimal. |
|
15 |
|
|
16 |
FC=ifort |
FC=ifort |
17 |
F90C=ifort |
F90C=ifort |
18 |
CC=icc |
CC=icc |
19 |
LINK='ifort -static' |
# requires that all static libraries are available: |
20 |
|
#LINK='ifort -static' |
21 |
|
LINK='ifort' |
22 |
|
# for adjoint runs the default makedepend often cannot handle enough files |
23 |
|
#MAKEDEPEND=tools_xmakedepend |
24 |
|
|
25 |
DEFINES='-DWORDLENGTH=4' |
DEFINES='-DWORDLENGTH=4' |
26 |
CPP='cpp -traditional -P' |
CPP='cpp -traditional -P' |
27 |
F90FIXEDFORMAT='-fixed -Tf' |
F90FIXEDFORMAT='-fixed -Tf' |
28 |
EXTENDED_SRC_FLAG='-132' |
EXTENDED_SRC_FLAG='-132' |
29 |
#OMPFLAG='-openmp' |
#OMPFLAG='-openmp' |
30 |
|
|
|
NOOPTFLAGS='-O0 -g -m64 -fPIC' |
|
|
NOOPTFILES='' |
|
|
|
|
31 |
INCLUDEDIRS='' |
INCLUDEDIRS='' |
32 |
INCLUDES='' |
INCLUDES='' |
33 |
LIBS='' |
LIBS='' |
34 |
|
|
35 |
|
MCMODEL='-fPIC' |
36 |
|
# for large memory requirements uncomment this line |
37 |
|
#MCMODEL='-mcmodel=medium -shared-intel' |
38 |
|
FFLAGS="-W0 -WB -convert big_endian -assume byterecl $MCMODEL" |
39 |
|
|
40 |
|
NOOPTFLAGS="-O0 -g -m64" |
41 |
|
NOOPTFILES='' |
42 |
|
|
43 |
if test "x$DEVEL" != x ; then |
if test "x$DEVEL" != x ; then |
44 |
FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC -O0 -g -noalign -fpstkchk -check all -fpe0 -traceback -ftrapuv -fpmodel except -warn all" |
FFLAGS="$FFLAGS -O0 -g -noalign -check all -fpe0 -traceback -ftrapuv -fp-model precise -fp-model except -warn all" |
45 |
else |
else |
46 |
FFLAGS="$FFLAGS -w95 -W0 -WB -convert big_endian -assume byterecl -fPIC" |
FFLAGS="$FFLAGS" |
47 |
fi |
fi |
48 |
#- might want to use '-r8' for fizhi pkg: |
#- might want to use '-r8' for fizhi pkg: |
49 |
#FFLAGS="$FFLAGS -r8" |
#FFLAGS="$FFLAGS -r8" |
52 |
# roughly equivalent to -ieee |
# roughly equivalent to -ieee |
53 |
if test "x$IEEE" = x ; then |
if test "x$IEEE" = x ; then |
54 |
# No need for IEEE-754 |
# No need for IEEE-754 |
55 |
FOPTIM='-O2 -align' |
FOPTIM='-O3 -align' |
56 |
|
# does not work when -static does not work |
57 |
|
# FOPTIM='-fast -align' |
58 |
|
# instead you can use |
59 |
|
# FOPTIM='-O3 -ipo -align' |
60 |
else |
else |
61 |
# Try to follow IEEE-754 |
# Try to follow IEEE-754 |
62 |
FOPTIM='-O0 -noalign -mp' |
FOPTIM='-O0 -noalign -fp-model precise' |
63 |
|
# -fltconsistency' |
64 |
fi |
fi |
65 |
F90FLAGS=$FFLAGS |
F90FLAGS=$FFLAGS |
66 |
F90OPTIM=$FOPTIM |
F90OPTIM=$FOPTIM |
67 |
CFLAGS='-O2 -ip -fPIC' |
CFLAGS="-O0 -ip $MCMODEL" |
68 |
|
|
69 |
if [ "x$NETCDF_ROOT" != x ] ; then |
if [ "x$NETCDF_ROOT" != x ] ; then |
70 |
INCLUDEDIRS="${NETCDF_ROOT}/include" |
INCLUDEDIRS="${NETCDF_ROOT}/include" |
101 |
LIBS='-L/usr/local/lib64' |
LIBS='-L/usr/local/lib64' |
102 |
fi |
fi |
103 |
|
|
104 |
|
if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then |
105 |
|
LIBS="$LIBS -lmpi" |
106 |
|
INCLUDES="$INCLUDES -I$MPI_INC_DIR" |
107 |
|
INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR" |
108 |
|
MPIINCLUDEDIR="$MPI_INC_DIR" |
109 |
|
MPI_HEADER_FILES='mpif.h mpiof.h' |
110 |
|
MPI_HEADER_FILES_INC='./mpi_headers/mpif.h ./mpi_headers/mpiof.h' |
111 |
|
fi |
112 |
|
|