#! /bin/bash ze_netcdf=netcdf-4.0.1 #ze_netcdf=netcdf-3.6.1 wget ftp://ftp.unidata.ucar.edu/pub/netcdf/$ze_netcdf.tar.gz tar xzvf $ze_netcdf.tar.gz \rm $ze_netcdf.tar.gz ######### SIMPLE #export CC=pgcc #export CXX=pgcpp #export FC=pgfortran #export F90=pgfortran #export LD=pgfortran #export CPPFLAGS="-DpgiFortran" ######## WITH OPTIONS #export CPPFLAGS="-DNDEBUG -DpgiFortran" #export CC=pgcc #export CFLAGS="-O2 -Msignextend -Mipa -Munroll -Mcache_align" #export CXX=pgCC #export CXXFLAGS="-O2 -Msignextend -Mipa -Munroll -Mcache_align" #export FC=pgf90 #export FFLAGS="-O2 -Mipa -Munroll -Mcache_align" ######## TEST NETCDF 3 #export CPPFLAGS="-DNDEBUG -DpgiFortran" #export CC=pgcc #export CXX=pgCC #export FC=pgf90 #export F90=pgf90 #export CFLAGS="-O2 -Msignextend -fpic -Mlarge_arrays" #export CXXFLAGS="-fpic -Mlarge_arrays" #export FFLAGS="-O2 -w -fpic -Mlarge_arrays" #export F90FLAGS="-O2 -w -fpic -Mlarge_arrays" ############# AVEC -fast export CPPFLAGS="-DNDEBUG -DpgiFortran" export CC=pgcc export CFLAGS="-fast" export CXX=pgCC export CXXFLAGS="-fast" export FC=pgf90 export FFLAGS="-fast" cd $ze_netcdf PREFIX=$PWD if [[ "$ze_netcdf" == "netcdf-3.6.1" ]] then cd src fi ./configure --prefix=${PREFIX} --disable-cxx make make test make install