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

Annotation of /MITgcm/tools/build_options/linux_ia64_cray_ollie

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


Revision 1.7 - (hide annotations) (download)
Mon Mar 13 09:28:07 2017 UTC (7 years, 2 months ago) by mlosch
Branch: MAIN
CVS Tags: checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66i, checkpoint66h
Changes since 1.6: +18 -1 lines
add netcdf paths

1 mlosch 1.1 #!/bin/bash
2     #
3 mlosch 1.7 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_ia64_cray_ollie,v 1.6 2016/08/29 14:39:28 mlosch Exp $
4 mlosch 1.2 # $Name: $
5 mlosch 1.1
6 mlosch 1.2 # Tested on cray CS400 ollie.awi.de
7     # <https://swrepo1.awi.de/plugins/mediawiki/wiki/hpc/index.php/Main_Page>
8     # module load craype-broadwell
9 mlosch 1.1 # module load PrgEnv-cray
10     # module swap mvapich2_cce cray-impi
11     # module load intel/impi-5.1.3
12    
13     FC='ftn'
14     CC='cc'
15    
16     FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
17     DEFINES='-DWORDLENGTH=4 '
18     CPP='cpp -traditional -P'
19     EXTENDED_SRC_FLAG='-Mextend'
20 mlosch 1.3 OMPFLAG='-homp'
21 mlosch 1.1 GET_FC_VERSION="-V"
22     RMFILES='*.lst'
23    
24 mlosch 1.4 NOOPTFLAGS="-O1"
25 mlosch 1.1 NOOPTFILES=''
26    
27 mlosch 1.3 FFLAGS="$FFLAGS -h byteswapio"
28 mlosch 1.4 if test "$OMP" = true ; then
29     # for some reason this solves a problem with an unexpected
30     # "expectStatus=20" when using OpenMP with hyperthreads
31 mlosch 1.5 NOOPTFILES="${NOOPTFILES} diagnostics_switch_onoff.F mon_init.F mon_set_iounit.F"
32 mlosch 1.4 else
33     FFLAGS="$FFLAGS -hnoomp"
34 mlosch 1.3 fi
35     # source file listing with compiler messages:
36     #FFLAGS="$FFLAGS -rm"
37 mlosch 1.1 #FFLAGS="$FFLAGS -Wl,--whole-archive,-lhugetlbfs,--no-whole-archive -Wl,-Ttext-segment=0x20000000,-zmax-page-size=0x20000000 "
38    
39     if test "x$IEEE" = x ; then #- with optimisation:
40     # this is the default
41     # FOPTIM='-O2'
42     # more aggressive
43 mlosch 1.4 FOPTIM="-O ipa3 -hfp3 -O3 "
44 mlosch 1.1 else
45 mlosch 1.4 NOOPTFLAGS="-O0"
46 mlosch 1.1 if test "x$DEVEL" = x ; then #- no optimisation + IEEE :
47     FOPTIM="-O0 -hfp0"
48     # -fltconsistency
49     else #- development/check options:
50     FOPTIM="-O0 -hfp0"
51     FOPTIM="$FOPTIM -g -hfp0 -Rbc"
52     # -r[list_ opt] produces a source listing file *.lst, -rm produces a
53     # listing with loopmark information and much more, not needed
54     # for simple tests
55     # -hmsgs -hnegmsgs writes a lot of optimisation messages to stderr
56     #FOPTIM="$FOPTIM -rm -hmsgs -hnegmsgs"
57     fi
58     fi
59    
60     F90FLAGS=$FFLAGS
61     F90OPTIM=$FOPTIM
62     CFLAGS="-O0 $MCMODEL"
63    
64 mlosch 1.7
65     if [ "x$NETCDF_ROOT" != x ] ; then
66     INCLUDEDIRS="${NETCDF_ROOT}/include"
67     INCLUDES="-I${NETCDF_ROOT}/include"
68     LIBS="-L${NETCDF_ROOT}/lib"
69     elif [ "x$NETCDF_HOME" != x ]; then
70     INCLUDEDIRS="${NETCDF_HOME}/include"
71     INCLUDES="-I${NETCDF_HOME}/include"
72     LIBS="-L${NETCDF_HOME}/lib"
73     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
74     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
75     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
76     INCLUDEDIRS="${NETCDF_INC}"
77     INCLUDES="-I${NETCDF_INC}"
78     LIBS="-L${NETCDF_LIB}"
79     fi
80    
81 mlosch 1.6 if [ -n "$MPI_ROOT" -a -z "$MPI_INC_DIR" ]; then
82     MPI_INC_DIR=${MPI_ROOT}/include
83     fi
84     if [ -n "$MPI_HOME" -a -z "$MPI_INC_DIR" ]; then
85     MPI_INC_DIR="$MPI_HOME/include"
86     fi
87     # MPI_INC_DIR needs to be set properly
88     if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
89 mlosch 1.1 INCLUDES="$INCLUDES -I$MPI_INC_DIR"
90     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
91     #- used for parallel (MPI) DIVA
92     # MPIINCLUDEDIR="$MPI_INC_DIR"
93     # MPI_HEADER_FILES='mpif.h mpiof.h'
94 mlosch 1.6 else
95     echo "MPI_INC_DIR needs to point to the correct directory, so that"
96     echo "\$MPI_INC_DIR/mpif.h is available"
97 mlosch 1.1 fi
98    

  ViewVC Help
Powered by ViewVC 1.1.22