Changeset 4267
- Timestamp:
- Sep 21, 2022, 10:37:42 AM (2 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
BOL/script_install/install_lmdz.sh
r4239 r4267 76 76 getlmdzor=1 77 77 netcdf=1 # 1: for automatic installation; 78 # or 0: do not install NetCDF and look for it in standard locations;79 # or absolute path: look for NetCDF there78 # or 0: do not install NetCDF and look for it in standard locations; 79 # or absolute path: look for NetCDF there 80 80 check_linux=1 81 81 ioipsl=1 … … 84 84 pcmac=0 # default: not on a Mac 85 85 compiler=gfortran 86 if [ `gfortran --version | head -1 | awk ' { print $NF } ' | cut -d. -f1` -ge 11 ] ; then allow_arg_mismatch="-fallow-argument-mismatch" ; fi 86 87 SCM=0 87 88 # surface/vegetation scheme treatment … … 456 457 457 458 if [ "$compiler" = "$gfortran" ] ; then 458 OPTIM='-O3' 459 OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -fbacktrace -finit-real=snan" 460 OPTDEV="-Wall -fbounds-check" 461 fmod='I ' 462 OPTPREC="$OPTPREC -cpp -ffree-line-length-0" 463 if [ $real = r8 ] ; then 464 OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" 465 fi 466 export F90FLAGS=" -ffree-form $OPTIMNC" 467 export FFLAGS=" $OPTIMNC" 468 export CC=gcc 469 export CXX=g++ 470 export fpp_flags="-P -C -traditional -ffreestanding" 459 OPTIM="-O3 $allow_arg_mismatch" 460 OPTDEB="-g3 -Wall -fbounds-check -ffpe-trap=invalid,zero,overflow -O0 -fstack-protector-all -fbacktrace -finit-real=snan $allow_arg_mismatch" 461 OPTDEV="-Wall -fbounds-check $allow_arg_mismatch" 462 fmod='I ' 463 OPTPREC="$OPTPREC -cpp -ffree-line-length-0" 464 if [ $real = r8 ] ; then OPTPREC="$OPTPREC -fdefault-real-8 -DNC_DOUBLE" ; fi 465 export F90FLAGS=" -ffree-form $OPTIMNC" 466 export FFLAGS=" $OPTIMNC" 467 export CC=gcc 468 export CXX=g++ 469 export fpp_flags="-P -C -traditional -ffreestanding" 471 470 472 471 elif [ $compiler = mpif90 ] ; then … … 586 585 ########################################################################### 587 586 if [ $getlmdzor = 1 -a ! -d $MODEL/modipsl ] ; then 588 ########################################################################### 589 echo '##########################################################' 590 echo Download a slightly modified version of LMDZ 591 echo '##########################################################' 592 cd $MODEL 593 myget src/modipsl.$version.tar.gz 594 echo install_lmdz.sh wget_OK `date` 595 gunzip modipsl.$version.tar.gz 596 tar xf modipsl.$version.tar 597 \rm modipsl.$version.tar 587 ########################################################################### 588 echo '##########################################################' 589 echo Download a slightly modified version of LMDZ 590 echo '##########################################################' 591 cd $MODEL 592 getlog=`pwd`/get.log 593 echo logfile : $getlog 594 myget src/modipsl.$version.tar.gz >> get.log 2>&1 595 echo install_lmdz.sh wget_OK `date` 596 gunzip modipsl.$version.tar.gz >> get.log 2>&1 597 tar xvf modipsl.$version.tar >> get.log 2>&1 598 \rm modipsl.$version.tar 598 599 fi 599 600 … … 608 609 echo log file : $netcdflog 609 610 if [[ "$with_xios" = "n" && ! -d $MODEL/netcdf4_hdf5_seq ]] ; then 610 myget import/install_netcdf4_hdf5_seq.bash 611 myget import/install_netcdf4_hdf5_seq.bash >> $netcdflog 2>&1 611 612 chmod +x install_netcdf4_hdf5_seq.bash 612 613 … … 614 615 then 615 616 ./install_netcdf4_hdf5_seq.bash -prefix $MODEL/netcdf4_hdf5_seq \ 616 -compiler gnu > $netcdflog 2>&1617 -compiler gnu >> $netcdflog 2>&1 617 618 elif [ "$compiler" = "ifort" ] 618 619 then 619 620 ./install_netcdf4_hdf5_seq.bash -prefix $MODEL/netcdf4_hdf5_seq \ 620 -compiler intel > $netcdflog 2>&1621 -compiler intel >> $netcdflog 2>&1 621 622 else 622 623 echo "unexpected compiler $compiler" ; exit … … 631 632 # download and compile hdf5 and netcdf, etc. using the 632 633 # install_netcdf4_hdf5.bash script 633 myget import/install_netcdf4_hdf5.bash 634 myget import/install_netcdf4_hdf5.bash >> $netcdflog 2>&1 634 635 chmod u=rwx install_netcdf4_hdf5.bash 635 636 if [ "$compiler" = "gfortran" ] ; then 636 637 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC gcc \ 637 -FC gfortran -CXX g++ -MPI $root_mpi > $netcdflog 2>&1638 -FC gfortran -CXX g++ -MPI $root_mpi >> $netcdflog 2>&1 638 639 elif [ "$compiler" = "ifort" ] ; then 639 640 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC icc \ 640 -FC ifort -CXX icpc -MPI $root_mpi > $netcdflog 2>&1641 -FC ifort -CXX icpc -MPI $root_mpi >> $netcdflog 2>&1 641 642 elif [ "$compiler" = "pgf90" ] ; then 642 643 ./install_netcdf4_hdf5.bash -prefix $MODEL/netcdf4_hdf5 -CC pgcc \ 643 -FC pgf90 -CXX pgCC -MPI $root_mpi > $netcdflog 2>&1644 -FC pgf90 -CXX pgCC -MPI $root_mpi >> $netcdflog 2>&1 644 645 else 645 646 echo "unexpected compiler $compiler" ; exit … … 670 671 671 672 $compiler -I$ncdfdir/include test_netcdf90.f90 -L$ncdfdir/lib -l netcdff \ 672 -lnetcdf && ./a.out673 -lnetcdf -Wl,-rpath=$ncdfdir/lib && ./a.out 673 674 674 675 if (($? == 0))
Note: See TracChangeset
for help on using the changeset viewer.