/[MITgcm]/MITgcm/tools/build_options/linux_amd64_sunf90+mpi_generic+mth
ViewVC logotype

Annotation of /MITgcm/tools/build_options/linux_amd64_sunf90+mpi_generic+mth

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


Revision 1.1 - (hide annotations) (download)
Fri Mar 19 04:00:27 2010 UTC (14 years, 2 months ago) by ce107
Branch: MAIN
New and modified optfiles (removed -lsunmath) for Sun compilers

1 ce107 1.1 #!/bin/bash
2     #
3    
4     # Build options for the Sun fortran compiler with a generic MPI
5     # DON'T FORGET to set environment variable MPI_INC_DIR to the include
6     # directory of your MPI implementation
7    
8     FC=${FC:=mpif77}
9     F90C=${F90C:=mpif90}
10     CC=${CC:=mpicc}
11     LINK=${F90C}
12     FC_NAMEMANGLE="#define FC_NAMEMANGLE(X) X ## _"
13     DEFINES='-DWORDLENGTH=4 -DUSE_OMP_THREADING'
14     CPP='cpp -traditional -P'
15     NOOPTFLAGS='-O0 -g -m64 -Kpic -xfilebyteorder=big16:%all -u -r8const -xopenmp=noopt'
16     NOOPTFILES=''
17     EXTENDED_SRC_FLAG='-e'
18    
19     if test "x$DEVEL" != x ; then
20     FFLAGS='-xfilebyteorder=big16:%all -u -r8const -g -xs -C -xcommonchk -xcheck=init_local -fpover -xopenmp=noopt'
21     else
22     FFLAGS='-xfilebyteorder=big16:%all -u -r8const -xopenmp'
23     fi
24    
25     if test "x$IEEE" = x ; then
26     # No need for IEEE-754
27     FOPTIM='-fast -m64 -xvector=simd -xpad=local -Kpic'
28     LIBS="$LIBS -lmopt"
29     else
30     # Try to follow IEEE-754
31     # FOPTIM='-O0 -m64 -Kpic'
32     FOPTIM='-fast -m64 -xpad=local -fsimple=1 -Kpic'
33     fi
34     F90FLAGS=$FFLAGS
35     F90OPTIM=$FOPTIM
36     CFLAGS='-O3 -m64 -Kpic -xopenmp'
37    
38     if [ "x$NETCDF_ROOT" != x ] ; then
39     INCLUDEDIR="${NETCDF_ROOT}/include"
40     INCLUDES="-I${NETCDF_ROOT}/include"
41     LIBDIR="${NETCDF_ROOT}/lib"
42     LIBS="-L${NETCDF_ROOT}/lib"
43     elif [ "x$NETCDF_HOME" != x ]; then
44     INCLUDEDIR="${NETCDF_HOME}/include"
45     INCLUDES="-I${NETCDF_HOME}/include"
46     LIBDIR="${NETCDF_HOME}/lib"
47     LIBS="-L${NETCDF_HOME}/lib"
48     elif [ "x$NETCDF_INC" != x -a "x$NETCDF_LIB" != x ]; then
49     NETCDF_INC=`echo $NETCDF_INC | sed 's/-I//g'`
50     NETCDF_LIB=`echo $NETCDF_LIB | sed 's/-L//g'`
51     INCLUDEDIR="${NETCDF_INC}"
52     INCLUDES="-I${NETCDF_INC}"
53     LIBDIR="${NETCDF_LIB}"
54     LIBS="-L${NETCDF_LIB}"
55     elif [ "x$NETCDF_INCDIR" != x -a "x$NETCDF_LIBDIR" != x ]; then
56     INCLUDEDIR="${NETCDF_INCDIR}"
57     INCLUDES="-I${NETCDF_INCDIR}"
58     LIBDIR="${NETCDF_LIBDIR}"
59     LIBS="-L${NETCDF_LIBDIR}"
60     elif test -d /usr/include/netcdf-3 ; then
61     INCLUDES='-I/usr/include/netcdf-3'
62     LIBS='-L/usr/lib/netcdf-3 -L/usr/lib64/netcdf-3'
63     elif test -d /usr/include/netcdf ; then
64     INCLUDES='-I/usr/include/netcdf'
65     elif test -d /usr/local/netcdf ; then
66     INCLUDES='-I/usr/local/netcdf/include'
67     LIBS='-L/usr/local/netcdf/lib'
68     elif test -d /usr/local/include/netcdf.inc ; then
69     INCLUDES='-I/usr/local/include'
70     LIBS='-L/usr/local/lib64 -L/usr/local/lib'
71     fi
72    
73     INCLUDES="$INCLUDES -I$MPI_INC_DIR"
74     INCLUDEDIRS="$INCLUDEDIRS $MPI_INC_DIR"
75     MPIINCLUDEDIR="$MPI_INC_DIR"
76     MPI_HEADER_FILES=${MPI_HEADER_FILES:='mpif.h mpiof.h'}
77     MPI_HEADER_FILES_INC=${MPI_HEADER_FILES_INC:='./mpi_headers/mpif.h ./mpi_headers/mpiof.h'}
78    

  ViewVC Help
Powered by ViewVC 1.1.22