Changeset 2203 for BOL


Ignore:
Timestamp:
Feb 12, 2015, 10:51:36 AM (10 years ago)
Author:
Ehouarn Millour
Message:

Fixes for pgf90. Removed installing C++ netcdf (not needed and causes issues with pgCC). Note that gcm still doesn't work with pgf90 because of erf/derf issues.
EM

File:
1 edited

Legend:

Unmodified
Added
Removed
  • BOL/script_install/install.sh

    r2165 r2203  
    4747# install.v2.sh instead of install.sh
    4848
    49 version=20130716.trunk
     49version=trunk
     50version=20141127.trunk
    5051version=testing
     52
    5153compilo=gfortran # compilo=pgf90 or g95 or gfortran or ifort sur PC linux
    5254
     
    7375## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578)
    7476## compile_with_fcm=0 : use makelmdz
    75 compile_with_fcm=0
    76 arch=local
    77 
    78 sequential=1
     77compile_with_fcm=1
    7978
    8079
     
    137136   OPTDEV="-Wall -fbounds-check"
    138137   fmod='I '
    139 #   OPTPREC="-ffree-line-length-0"
    140 #   if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" ; fi
    141    if [ $real = r8 ] ; then OPTPREC=" -fdefault-real-8 -DNC_DOUBLE" ; fi
     138   if [ $real = r8 ] ; then OPTPREC="-fdefault-real-8 -DNC_DOUBLE" ; fi
    142139   export F90FLAGS=" -ffree-form $OPTIMNC"
    143140   export FFLAGS=" $OPTIMNC"
     
    156153   export CXX=g++
    157154elif [ $compilo = pgf90 ] ; then
    158    OPTIM='-O2 -Munroll -Mnoframe -Mautoinline -Mcache_align'
     155   OPTIM='-O2 -Mipa -Munroll -Mnoframe -Mautoinline -Mcache_align'
     156   OPTDEB='-g -Mdclchk -Mbounds -Mchkfpstk -Mchkptr -Minform=inform -Mstandard -Ktrap=fp -traceback'
     157   OPTDEV='-g -Mbounds -Ktrap=fp -traceback'
    159158   fmod='module '
    160159   if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi
    161    export CPPFLAGS="-DNDEBUG -DpgiFortran"
     160   export CPPFLAGS="-DpgiFortran"
    162161   export CC=pgcc
    163    export CFLAGS="-Msignextend"
     162   export CFLAGS="-O2 -Msignextend"
    164163   export CXX=pgCC
    165    export CXXFLAGS="-Msignextend"
    166    export FFLAGS="$OPTIMNC"
    167    export F90FLAGS="$OPTIMNC"
     164   export CXXFLAGS="-O2 -Msignextend"
     165   export FFLAGS="-O2 $OPTIMNC"
     166   export F90FLAGS="-O2 $OPTIMNC"
    168167   compile_with_fcm=1
    169168elif [ $compilo = ifort ] ; then
     
    292291sed -e 's/gfortran/'$gfortran'/g' configure >| tmp ; mv -f tmp configure ; chmod +x configure
    293292localdir=`pwd -P`
    294 ./configure --prefix=$localdir
     293./configure --prefix=$localdir --disable-cxx
    295294sed -e 's/gfortran/'$gfortran'/g' Makefile >| tmp ; mv -f tmp Makefile
    296295make check
     
    321320  cp AA_make.gdef AA_make.orig
    322321  F_C="$compilo -c " ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then F_C="$compilo -c -cpp " ; fi
     322  if [ "$compilo" = "pgf90" ] ; then F_C="$compilo -c -Mpreprocess" ; fi
    323323  sed -e 's/^\#.*.g95.*.\#.*.$/\#/' AA_make.gdef > tmp
    324   sed -e "s:F_L = g95:F_L = $compilo:" -e "s:F_C = g95 -c:F_C = $F_C": \
     324  sed -e "s:F_L = g95:F_L = $compilo:" -e "s:F_C = g95 -c -cpp:F_C = $F_C": \
    325325  -e 's/g95.*.w_w.*.(F_D)/g95      w_w = '"$OPTIMGCM"'/' \
    326326  -e 's:g95.*.NCDF_INC.*.$:g95      NCDF_INC= '"$ncdfdir"'/include:' \
     
    421421  echo '########################################################'
    422422  cd $MODEL/modipsl/modeles/ORCHIDEE
    423   export ORCHPATH=`pwd`
    424   orchidee_rev=`svn info | grep '^Revision' | awk '{print $2}'`
    425   if [ -z $orchidee_rev ] ; then
    426     svn info 2 >| err
    427     grep 'svn upgrade' err > /dev/null
    428     if [ $? -eq 0 ] ; then
    429       svn upgrade
    430       orchidee_rev=`svn info | grep '^Revision' | awk '{print $2}'`
    431     else
    432       echo "Impossible de determiner la version d'ORCHIDEE"
    433       echo "Continuer (o/y/n) ?"
    434       read reponse
    435       if [ $reponse != 'o' ] && [ $reponse != 'y' ] ; then
    436         exit
    437       fi
    438     fi
    439   fi   
    440   echo '########################################################'
    441   echo 'Orchidee revision: ', $orchidee_rev
    442   echo '########################################################'
    443423  echo OKpwd ; pwd
    444   if [ $orchidee_rev -ge 2247 ] ; then
     424  if [ -d src_parallel ] ; then
     425     liste_src="parallel parameters global stomate sechiba driver"
    445426     veget_version=orchidee2.0
    446        cd arch
    447       sed -e s:"%COMPILER        .*.$":"%COMPILER            $compilo":1 \
    448      -e s:"%LINK            .*.$":"%LINK                $compilo":1 \
    449      -e s:"%PROD_FFLAGS     .*.$":"%PROD_FFLAGS         $OPTIM":1 \
    450      -e s:"%DEV_FFLAGS      .*.$":"%DEV_FFLAGS          $OPTDEV":1 \
    451      -e s:"%DEBUG_FFLAGS    .*.$":"%DEBUG_FFLAGS        $OPTDEB":1 \
    452      -e s:"%BASE_FFLAGS     .*.$":"%BASE_FFLAGS         $OPTPREC":1 \
    453      arch-gfortran.fcm > arch-local.fcm
    454      echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
    455      echo "NETCDF_INCDIR=${ncdfdir}/include" >> arch-local.path
    456      echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path
    457      echo "IOIPSL_LIBDIR=$ORCHPATH/../../lib" >> arch-local.path
    458      cd ../
    459 # compiling ORCHIDEE sequential mode
    460      ./makeorchidee_fcm -noxios -prod -parallel none -arch local
    461427  else
    462      if [ -d src_parallel ] ; then
    463        liste_src="parallel parameters global stomate sechiba driver"
    464        veget_version=orchidee2.0
    465      else
    466        # Obsolete, for ORCHIDEE_beton only
    467        liste_src="parameters stomate sechiba "
    468        # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
    469        cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
    470        veget_version=orchidee1.9
    471      fi
    472      for d in $liste_src ; do src_d=src_$d
    473         echo src_d $src_d
    474         echo ls ; ls
    475         if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
    476         cd $src_d ; \rm -f *.mod make ; make clean
    477         make ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
    478         cd ..
    479      done
     428     # Obsolete, for ORCHIDEE_beton only
     429     liste_src="parameters stomate sechiba "
     430     # A trick to compile ORCHIDEE depending on if we are using real*4 or real*8
     431     cd src_parameters ; \cp reqdprec.$real reqdprec.f90 ; cd ..
     432     veget_version=orchidee1.9
    480433  fi
     434  echo liste_strc $liste_src
     435
     436  for d in $liste_src ; do src_d=src_$d
     437      echo src_d $src_d
     438      echo ls ; ls
     439      if [ ! -d $src_d ] ; then echo Problem orchidee : no $src_d ; exit ; fi
     440      cd $src_d ; \rm -f *.mod make ; make clean
     441      make ; if [ "$compilo" = "$gfortran" -o "$compilo" = "mpif90" ] ; then cp -f *.mod ../../../lib ; fi
     442      cd ..
     443  done
    481444  echo install.sh orchidee_OK `date`
    482445fi # of if [ "$veget" = 1 ]
     
    506469# arch-local.path file
    507470echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path
    508 echo OK3
    509471echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path
    510472echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path
     
    521483    -e s:"%DEBUG_FFLAGS    .*.$":"%DEBUG_FFLAGS        $OPTDEB":1 \
    522484    -e s:"%BASE_FFLAGS     .*.$":"%BASE_FFLAGS         $OPTPREC":1 \
     485    -e s:"%FPP_DEF         .*.$":"%FPP_DEF             $FPP_DEF":1 \
    523486    arch-linux-32bit.fcm > arch-local.fcm
    524487
     
    537500##################################################################
    538501echo install.sh avant_compilation `date`
    539 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch $arch" ; else makelmdz=makelmdz ; fi
    540 
    541 if [ "$sequential" = 1 ] ; then
     502if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch local" ; else makelmdz=makelmdz ; fi
     503
    542504./$makelmdz -d ${grid_resolution} -v $veget_version gcm
    543505echo install.sh apres_compilation `date`
     
    601563echo '##########################################################'
    602564
    603 fi # fin sequential
    604 
    605565if [ "$gfortran" = "gfortran44" ] ; then
    606566    echo Your gfortran compiler was too old so that the model was automatically
Note: See TracChangeset for help on using the changeset viewer.