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

Diff of /MITgcm/tools/build_options/linux_amd64_sunf90

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

revision 1.3 by jmc, Sun Mar 21 22:22:52 2010 UTC revision 1.4 by jmc, Mon Sep 12 15:13:07 2011 UTC
# Line 3  Line 3 
3  # $Header$  # $Header$
4  # $Name$  # $Name$
5    
6  FC=f77  # Build options for the Sun fortran compiler (with and without MPI)
7  F90C=f90  #            on Linux AMD64 platform
8  CC=cc  # MPI : need to set environment variable MPI_INC_DIR to the include
9  LINK=${F90C}  #       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  FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"  FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
24  DEFINES='-DWORDLENGTH=4'  DEFINES='-DWORDLENGTH=4'
25  CPP='cpp  -traditional -P'  CPP='cpp  -traditional -P'
 NOOPTFLAGS='-O0 -g -m64 -Kpic -xfilebyteorder=big16:%all -u -r8const'  
 NOOPTFILES=''  
26  EXTENDED_SRC_FLAG='-e'  EXTENDED_SRC_FLAG='-e'
27  OMPFLAG='-xopenmp'  OMPFLAG='-xopenmp'
28    
29    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  if test "x$DEVEL" != x ; then  if test "x$DEVEL" != x ; then
38      FFLAGS='-xfilebyteorder=big16:%all -u -r8const -g -xs -C -xcommonchk -xcheck=init_local -fpover'      FFLAGS="$FFLAGS -g -xs -C -xcommonchk -xcheck=init_local -fpover"
39  else      OMPFLAG='-xopenmp=noopt'
     FFLAGS='-xfilebyteorder=big16:%all -u -r8const'  
40  fi  fi
41    
42  if test "x$IEEE" = x ; then  if test "x$IEEE" = x ; then     #- with optimisation:
43      #  No need for IEEE-754      FOPTIM='-fast -xvector=simd -xpad=local'
44      FOPTIM='-fast -m64 -xvector=simd -xpad=local -Kpic'      LIBS="$LIBS -lmopt"   #- but get overwritten during NETCDF libs setting below
45      LIBS="$LIBS -lmopt"  else                            #- no optimisation + IEEE :
46  else  #   FOPTIM='-O0'
47      #  Try to follow IEEE-754      FOPTIM='-fast -xpad=local -fsimple=1'
 #    FOPTIM='-O0 -m64 -Kpic'  
     FOPTIM='-fast -m64 -xpad=local -fsimple=1 -Kpic'  
48  fi  fi
49    
50  F90FLAGS=$FFLAGS  F90FLAGS=$FFLAGS
51  F90OPTIM=$FOPTIM  F90OPTIM=$FOPTIM
52  CFLAGS='-O3 -m64 -Kpic'  CFLAGS='-O0 -m64 -Kpic'
53    
54    INCLUDEDIRS=''
55    INCLUDES=''
56    #LIBS=''
57    
58  if [ "x$NETCDF_ROOT" != x ] ; then  if [ "x$NETCDF_ROOT" != x ] ; then
59      INCLUDEDIR="${NETCDF_ROOT}/include"      INCLUDEDIR="${NETCDF_ROOT}/include"
# Line 69  elif test -d /usr/local/include/netcdf.i Line 90  elif test -d /usr/local/include/netcdf.i
90      LIBS='-L/usr/local/lib64 -L/usr/local/lib'      LIBS='-L/usr/local/lib64 -L/usr/local/lib'
91  fi  fi
92    
93    if [ -n "$MPI_INC_DIR" -a "x$MPI" = xtrue ] ; then
94        INCLUDES="$INCLUDES -I$MPI_INC_DIR"
95        INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
96        MPIINCLUDEDIR="$MPI_INC_DIR"
97        MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
98        MPI_HEADER_FILES_INC=${MPI_HEADER_FILES_INC:='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'}
99    fi
100    
101    

Legend:
Removed from v.1.3  
changed lines
  Added in v.1.4

  ViewVC Help
Powered by ViewVC 1.1.22