Warning, /tools/build_options/linux_ia32_gfortran+mpi_fc_lam is written in an unsupported language. File is not indexed.
view on githubraw file Latest commit add29e06 on 2018-01-31 20:35:05 UTC
c2b74c7b4a Ed H*0001 #!/bin/bash
0002 #
0003 #
0004
0005 # Tested with gcc-gfortran v4.0.x as shipped with Fedora Core 4.
0006 # It fixes the ' \' versus ' &' terminator problem but some
0007 # namelist problems remain. The biggest seems to be the inability
0008 # of current gfortran versions to support namelist syntax such as:
0009 #
0010 # fields(1,1) = 'UVELSLT ','VVELSLT ','WVELSLT ',
0011 #
0012 # which results in run-time errors.
0013
0014 # This optfile is nearly identical to linux_ia32_gfortran since it
0015 # just invokes the LAM compiler-wrappers as shipped with LAM for
0016 # Fedora Core 4 which, in spite of its "mpif77" name, is actually
0017 # a wrapper for gfortran.
0018
0019 FC=mpif77
0020 CC=mpicc
0021 DEFINES='-D_BYTESWAPIO -DWORDLENGTH=4 -DNML_TERMINATOR'
0022 CPP='cpp -traditional -P'
0023 NOOPTFLAGS='-O0'
0024
0025 if test "x$IEEE" = x ; then
0026 # No need for IEEE-754
0027 # "warning: -Wuninitialized is not supported without -O"
0028 FFLAGS='-Wunused'
0029 FOPTIM='-O3 -malign-double -funroll-loops'
0030 else
0031 # Try to follow IEEE-754
0032 has_sse2=f
0033 grep flags /proc/cpuinfo | grep sse2 > /dev/null 2>&1 && has_sse2=t
0034 if test "x$has_sse2" = xt ; then
0035 FFLAGS='-Wunused -mfpmath=sse -msse -msse2'
0036 else
0037 FFLAGS='-Wunused -ffloat-store'
0038 fi
0039 # echo 'FFLAGS="'$FFLAGS'"'
0040 FOPTIM='-O0 -malign-double'
0041 fi
0042
0043 if test -d /usr/include/netcdf-3 ; then
0044 INCLUDES='-I/usr/include/netcdf-3'
0045 LIBS='-L/usr/lib/netcdf-3'
0046 elif test -d /usr/include/netcdf ; then
0047 INCLUDES='-I/usr/include/netcdf'
0048 elif test -d /usr/local/netcdf ; then
0049 INCLUDES='-I/usr/local/netcdf/include'
0050 LIBS='-L/usr/local/netcdf/lib'
0051 fi
0052