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

Annotation of /MITgcm/tools/build_options/linux_amd64_sunf90

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


Revision 1.5 - (hide annotations) (download)
Mon Jul 22 18:40:45 2013 UTC (10 years, 10 months ago) by jmc
Branch: MAIN
CVS Tags: checkpoint64y, checkpoint64x, checkpoint64z, checkpoint64q, checkpoint64p, checkpoint64s, checkpoint64r, checkpoint64u, checkpoint64t, checkpoint64w, checkpoint64v, checkpoint64k, checkpoint64m, checkpoint64l, checkpoint64o, checkpoint64n, checkpoint65, checkpoint66g, checkpoint66f, checkpoint66e, checkpoint66d, checkpoint66c, checkpoint66b, checkpoint66a, checkpoint66o, checkpoint66n, checkpoint66m, checkpoint66l, checkpoint66k, checkpoint66j, checkpoint66i, checkpoint66h, checkpoint65z, checkpoint65x, checkpoint65y, checkpoint65r, checkpoint65s, checkpoint65p, checkpoint65q, checkpoint65v, checkpoint65w, checkpoint65t, checkpoint65u, checkpoint65j, checkpoint65k, checkpoint65h, checkpoint65i, checkpoint65n, checkpoint65o, checkpoint65l, checkpoint65m, checkpoint65b, checkpoint65c, checkpoint65a, checkpoint65f, checkpoint65g, checkpoint65d, checkpoint65e, HEAD
Changes since 1.4: +3 -3 lines
- remove MPI_HEADER_FILES_INC setting (no longer used)
- for now, comment out MPI_HEADER_FILES list (let genmake2 find which
   MPI header is needed)

1 ce107 1.1 #!/bin/bash
2     #
3 jmc 1.5 # $Header: /u/gcmpack/MITgcm/tools/build_options/linux_amd64_sunf90,v 1.4 2011/09/12 15:13:07 jmc Exp $
4 jmc 1.3 # $Name: $
5 ce107 1.1
6 jmc 1.4 # Build options for the Sun fortran compiler (with and without MPI)
7     # on Linux AMD64 platform
8     # MPI : need to set environment variable MPI_INC_DIR to the include
9     # directory of your MPI implementation
10    
11     if test "x$MPI" = xtrue ; then
12     CC=${CC:=mpicc}
13     FC=${FC:=mpif77}
14     F90C=${F90C:=mpif90}
15     LINK=${F90C}
16     else
17     CC='cc'
18     FC='f77'
19     F90C='f90'
20     LINK=${F90C}
21     fi
22    
23 ce107 1.2 FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
24 ce107 1.1 DEFINES='-DWORDLENGTH=4'
25     CPP='cpp -traditional -P'
26 ce107 1.2 EXTENDED_SRC_FLAG='-e'
27     OMPFLAG='-xopenmp'
28 ce107 1.1
29 jmc 1.4 NOOPTFLAGS='-O0 -g'
30     NOOPTFILES=''
31    
32     FFLAGS="$FFLAGS -m64 -xfilebyteorder=big16:%all -u"
33     #FFLAGS="$FFLAGS -r8const"
34     # for big objects:
35     FFLAGS="$FFLAGS -Kpic"
36    
37 ce107 1.1 if test "x$DEVEL" != x ; then
38 jmc 1.4 FFLAGS="$FFLAGS -g -xs -C -xcommonchk -xcheck=init_local -fpover"
39     OMPFLAG='-xopenmp=noopt'
40 ce107 1.1 fi
41    
42 jmc 1.4 if test "x$IEEE" = x ; then #- with optimisation:
43     FOPTIM='-fast -xvector=simd -xpad=local'
44     LIBS="$LIBS -lmopt" #- but get overwritten during NETCDF libs setting below
45     else #- no optimisation + IEEE :
46     # FOPTIM='-O0'
47     FOPTIM='-fast -xpad=local -fsimple=1'
48 ce107 1.1 fi
49 jmc 1.4
50 ce107 1.1 F90FLAGS=$FFLAGS
51     F90OPTIM=$FOPTIM
52 jmc 1.4 CFLAGS='-O0 -m64 -Kpic'
53    
54     INCLUDEDIRS=''
55     INCLUDES=''
56     #LIBS=''
57 ce107 1.1
58     if [ "x$NETCDF_ROOT" != x ] ; then
59     INCLUDEDIR="${NETCDF_ROOT}/include"
60     INCLUDES="-I${NETCDF_ROOT}/include"
61     LIBDIR="${NETCDF_ROOT}/lib"
62     LIBS="-L${NETCDF_ROOT}/lib"
63     elif [ "x$NETCDF_HOME" != x ]; then
64     INCLUDEDIR="${NETCDF_HOME}/include"
65     INCLUDES="-I${NETCDF_HOME}/include"
66     LIBDIR="${NETCDF_HOME}/lib"
67     LIBS="-L${NETCDF_HOME}/lib"
68     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
69     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
70     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
71     INCLUDEDIR="${NETCDF_INC}"
72     INCLUDES="-I${NETCDF_INC}"
73     LIBDIR="${NETCDF_LIB}"
74     LIBS="-L${NETCDF_LIB}"
75     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
76     INCLUDEDIR="${NETCDF_INCDIR}"
77     INCLUDES="-I${NETCDF_INCDIR}"
78     LIBDIR="${NETCDF_LIBDIR}"
79     LIBS="-L${NETCDF_LIBDIR}"
80     elif test -d /usr/include/netcdf-3 ; then
81     INCLUDES='-I/usr/include/netcdf-3'
82     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
83     elif test -d /usr/include/netcdf ; then
84     INCLUDES='-I/usr/include/netcdf'
85     elif test -d /usr/local/netcdf ; then
86     INCLUDES='-I/usr/local/netcdf/include'
87     LIBS='-L/usr/local/netcdf/lib'
88     elif test -d /usr/local/include/netcdf.inc ; then
89     INCLUDES='-I/usr/local/include'
90 ce107 1.2 LIBS='-L/usr/local/lib64 -L/usr/local/lib'
91 ce107 1.1 fi
92    
93 jmc 1.4 if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
94     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
95     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
96 jmc 1.5 #- used for parallel (MPI) DIVA
97 jmc 1.4 MPIINCLUDEDIR="$MPI_INC_DIR"
98 jmc 1.5 #MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
99 jmc 1.4 fi
100    
101    

  ViewVC Help
Powered by ViewVC 1.1.22