- Timestamp:
- Feb 12, 2015, 10:51:36 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install.sh
r2165 r2203 47 47 # install.v2.sh instead of install.sh 48 48 49 version=20130716.trunk 49 version=trunk 50 version=20141127.trunk 50 51 version=testing 52 51 53 compilo=gfortran # compilo=pgf90 or g95 or gfortran or ifort sur PC linux 52 54 … … 73 75 ## compile_with_fcm=1 : use makelmdz_fcm, possible a of version 20111103.trunk (LMDZ5/trunk rev 1578) 74 76 ## compile_with_fcm=0 : use makelmdz 75 compile_with_fcm=0 76 arch=local 77 78 sequential=1 77 compile_with_fcm=1 79 78 80 79 … … 137 136 OPTDEV="-Wall -fbounds-check" 138 137 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 142 139 export F90FLAGS=" -ffree-form $OPTIMNC" 143 140 export FFLAGS=" $OPTIMNC" … … 156 153 export CXX=g++ 157 154 elif [ $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' 159 158 fmod='module ' 160 159 if [ $real = r8 ] ; then OPTPREC="-r8 -DNC_DOUBLE" ; fi 161 export CPPFLAGS="-D NDEBUG -DpgiFortran"160 export CPPFLAGS="-DpgiFortran" 162 161 export CC=pgcc 163 export CFLAGS="- Msignextend"162 export CFLAGS="-O2 -Msignextend" 164 163 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" 168 167 compile_with_fcm=1 169 168 elif [ $compilo = ifort ] ; then … … 292 291 sed -e 's/gfortran/'$gfortran'/g' configure >| tmp ; mv -f tmp configure ; chmod +x configure 293 292 localdir=`pwd -P` 294 ./configure --prefix=$localdir 293 ./configure --prefix=$localdir --disable-cxx 295 294 sed -e 's/gfortran/'$gfortran'/g' Makefile >| tmp ; mv -f tmp Makefile 296 295 make check … … 321 320 cp AA_make.gdef AA_make.orig 322 321 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 323 323 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": \ 325 325 -e 's/g95.*.w_w.*.(F_D)/g95 w_w = '"$OPTIMGCM"'/' \ 326 326 -e 's:g95.*.NCDF_INC.*.$:g95 NCDF_INC= '"$ncdfdir"'/include:' \ … … 421 421 echo '########################################################' 422 422 cd $MODEL/modipsl/modeles/ORCHIDEE 423 export ORCHPATH=`pwd`424 orchidee_rev=`svn info | grep '^Revision' | awk '{print $2}'`425 if [ -z $orchidee_rev ] ; then426 svn info 2 >| err427 grep 'svn upgrade' err > /dev/null428 if [ $? -eq 0 ] ; then429 svn upgrade430 orchidee_rev=`svn info | grep '^Revision' | awk '{print $2}'`431 else432 echo "Impossible de determiner la version d'ORCHIDEE"433 echo "Continuer (o/y/n) ?"434 read reponse435 if [ $reponse != 'o' ] && [ $reponse != 'y' ] ; then436 exit437 fi438 fi439 fi440 echo '########################################################'441 echo 'Orchidee revision: ', $orchidee_rev442 echo '########################################################'443 423 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" 445 426 veget_version=orchidee2.0 446 cd arch447 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.fcm454 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path455 echo "NETCDF_INCDIR=${ncdfdir}/include" >> arch-local.path456 echo "IOIPSL_INCDIR=$ORCHPATH/../../lib" >> arch-local.path457 echo "IOIPSL_LIBDIR=$ORCHPATH/../../lib" >> arch-local.path458 cd ../459 # compiling ORCHIDEE sequential mode460 ./makeorchidee_fcm -noxios -prod -parallel none -arch local461 427 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 480 433 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 481 444 echo install.sh orchidee_OK `date` 482 445 fi # of if [ "$veget" = 1 ] … … 506 469 # arch-local.path file 507 470 echo "NETCDF_LIBDIR=\"-L${ncdfdir}/lib -lnetcdf\"" > arch-local.path 508 echo OK3509 471 echo "NETCDF_INCDIR=-I${ncdfdir}/include" >> arch-local.path 510 472 echo 'IOIPSL_INCDIR=$LMDGCM/../../lib' >> arch-local.path … … 521 483 -e s:"%DEBUG_FFLAGS .*.$":"%DEBUG_FFLAGS $OPTDEB":1 \ 522 484 -e s:"%BASE_FFLAGS .*.$":"%BASE_FFLAGS $OPTPREC":1 \ 485 -e s:"%FPP_DEF .*.$":"%FPP_DEF $FPP_DEF":1 \ 523 486 arch-linux-32bit.fcm > arch-local.fcm 524 487 … … 537 500 ################################################################## 538 501 echo 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 502 if [ $compile_with_fcm = 1 ] ; then makelmdz="makelmdz_fcm -arch local" ; else makelmdz=makelmdz ; fi 503 542 504 ./$makelmdz -d ${grid_resolution} -v $veget_version gcm 543 505 echo install.sh apres_compilation `date` … … 601 563 echo '##########################################################' 602 564 603 fi # fin sequential604 605 565 if [ "$gfortran" = "gfortran44" ] ; then 606 566 echo Your gfortran compiler was too old so that the model was automatically
Note: See TracChangeset
for help on using the changeset viewer.