- Timestamp:
- Sep 29, 2020, 3:18:19 PM (4 years ago)
- Location:
- trunk/LMDZ.COMMON/ioipsl
- Files:
-
- 3 deleted
- 8 edited
- 1 moved
Legend:
- Unmodified
- Added
- Removed
-
trunk/LMDZ.COMMON/ioipsl/README
r456 r2412 1 1 Scripts in this directory are illustrative examples of how to 2 obtain and install IOIPSL: 3 1) install_ioipsl_gnome.bash: everything is set for Gnome, just run: 4 ./install_ioipsl_gnome.bash 5 And output modules and library will be in subdirectory 'modipsl/lib' 2 download and install IOIPSL, e.g.: 3 1) install_ioipsl_occigen.bash: everything is set for Occigen, just run: 4 ./install_ioipsl_occigen.bash 5 And output modules and library will be in ../../IOIPSL 6 (with links in 'modipsl/lib' and 'modipsl/bin' for backward compatibility) 6 7 7 2) install_ioipsl_gfortran.bash and install_ioipsl_pgf90.bash are more 8 general examples for installing IOIPSL on a machine with either compiler. 9 Note that the paths to the NetCDF library hard coded in the scripts 10 will surely need to be adapted to your local settings. 11 Then simply execute the script; output modules 12 and library will be in subdirectory 'modipsl/lib' 8 2) install_ioipsl_gfortran.bash, and install_ioipsl_pgf90.bash and 9 install_ioipsl_ifort.bash are more general examples 10 for installing IOIPSL on a machine with these compilers. 11 For these you might need to ajust the location of the NetCDF library 12 (see the NETCDF_HOME variable in the script) 13 And you will need to set up arch files (which should match those 14 of the GCM) to adequately compile the library 13 15 14 Note that it is a good idea to install IOIPSL outside of the LMDZ tree16 Note that it is a good idea to install IOIPSL alongside LMDZ 15 17 so that its version can be tracked (and potentialy updated), as it is 16 18 downloaded from a different svn repository. … … 18 20 19 21 22 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_centos-ifort.bash
r2185 r2412 4 4 5 5 #0. Preliminary stuff 6 # source the environment from the GCM arch files 7 source ../arch/arch-centos-ifort-para.env 8 source ../arch/arch-centos-ifort-para.path 6 if (( $# == 0 )) 7 then 8 # default behavior: get latest version of IOIPSL 9 rev="HEAD" 10 else 11 # but otherwise the first argument of the script can be the version to use 12 if (( $# == 1 )) 13 then 14 rev=$1 15 else 16 echo "Error, invalid script arguments" 17 echo "Usage:" 18 echo "$0 rev" 19 echo " where optional rev is the IOIPSL revision number" 20 exit 21 fi 22 fi 9 23 10 whereami=`pwd -P` 24 # cleanup possible previous attempt: 25 \rm -rf ../../IOIPSL modipsl 11 26 12 # 1. Get IOIPSL (via modipsl) 13 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 14 cd modipsl/util 27 # 1. Get IOIPSL 28 # move up at same level as LMDZ.COMMON , etc. 29 cd ../.. 30 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 15 31 16 ./model IOIPSL_PLUS 17 18 # 2. Set correct settings: 19 # add a "ciclad" configuration to AA_make.gdef 20 echo "#-Q- cicladi #- Global definitions for CentOS at LMD, ifort" >> AA_make.gdef 21 echo "#-Q- cicladi M_K = make" >> AA_make.gdef 22 echo "#-Q- cicladi P_C = cpp" >> AA_make.gdef 23 echo '#-Q- cicladi P_O = -P -C $(P_P)' >> AA_make.gdef 24 echo "#-Q- cicladi F_C = ifort -mcmodel=large -shared-intel -c" >> AA_make.gdef 25 echo "#-Q- cicladi #-D- MD F_D = -g" >> AA_make.gdef 26 echo "#-Q- cicladi #-D- MN F_D =" >> AA_make.gdef 27 echo "#-Q- cicladi #-P- I4R4 F_P = -integer-size 32" >> AA_make.gdef 28 echo "#-Q- cicladi #-P- I4R8 F_P = -integer-size 32 -real-size 64" >> AA_make.gdef 29 echo "#-Q- cicladi #-P- I8R8 F_P = -integer-size 64 -real-size 64" >> AA_make.gdef 30 echo '#-Q- cicladi F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef 31 echo "#-Q- cicladi F_L = ifort" >> AA_make.gdef 32 echo "#-Q- cicladi M_M = 0" >> AA_make.gdef 33 echo "#-Q- cicladi L_X = 0" >> AA_make.gdef 34 echo "#-Q- cicladi L_O =" >> AA_make.gdef 35 echo "#-Q- cicladi A_C = ar -r" >> AA_make.gdef 36 echo "#-Q- cicladi A_G = ar -x" >> AA_make.gdef 37 echo "#-Q- cicladi C_C = icc -c" >> AA_make.gdef 38 echo "#-Q- cicladi C_O =" >> AA_make.gdef 39 echo "#-Q- cicladi C_L = icc" >> AA_make.gdef 40 echo "#-Q- cicladi #-" >> AA_make.gdef 41 echo "#-Q- cicladi NCDF_INC = ${NETCDF_INCDIR:2}" >> AA_make.gdef 42 echo "#-Q- cicladi NCDF_LIB = ${NETCDF_LIBDIR} ${NETCDF_LIB}" >> AA_make.gdef 43 echo "#-Q- cicladi #-" >> AA_make.gdef 44 45 # set default working precision for IOIPSL: 46 ./ins_make -t cicladi -p I4R8 32 # 2. Set correct settings: copy over arch.* files 33 cd IOIPSL 34 cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.env arch 35 cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.path arch 36 cp -f ../LMDZ.COMMON/arch/arch-centos-ifort-para.fcm arch 47 37 48 38 ## 3. build ioipsl: 49 cd ../modeles/IOIPSL/src 50 make 51 ## Compile the rebuild tool: 52 cd ../tools 53 make 39 ./makeioipsl_fcm -arch centos-ifort-para -job 8 > makeioipsl.out 2>&1 54 40 55 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 41 ## 4. Check if the library was indeed built: 42 whereami=`pwd -P` 43 if [[ -f lib/libioipsl.a ]] 56 44 then 57 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"45 echo "OK: ioipsl library is in ${whereami}/lib" 58 46 else 59 echo "Something went wrong..." 47 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 48 exit 60 49 fi 50 51 ## 5. Comply with old setup and make appropriate links 52 cd ../LMDZ.COMMON/ioipsl 53 mkdir modipsl 54 cd modipsl 55 # lib + module files 56 mkdir lib 57 cd lib 58 ln -s ../../../../IOIPSL/lib/libioipsl.a . 59 ln -s ../../../../IOIPSL/inc/* . 60 cd .. 61 # rebuild utility 62 mkdir bin 63 cd bin 64 ln -s ../../../../IOIPSL/bin/* . 65 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_ciclad-ifort.bash
r2411 r2412 4 4 5 5 #0. Preliminary stuff 6 # source the environment from the GCM arch files7 source ../arch/arch-CICLADifort.env8 source ../arch/arch-CICLADifort.path9 6 10 whereami=`pwd -P` 7 if (( $# == 0 )) 8 then 9 # default behavior: get latest version of IOIPSL 10 rev="HEAD" 11 else 12 # but otherwise the first argument of the script can be the version to use 13 if (( $# == 1 )) 14 then 15 rev=$1 16 else 17 echo "Error, invalid script arguments" 18 echo "Usage:" 19 echo "$0 rev" 20 echo " where optional rev is the IOIPSL revision number" 21 exit 22 fi 23 fi 11 24 12 # 1. Get IOIPSL (via modipsl) 13 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 14 cd modipsl/util 25 # cleanup possible previous attempt: 26 \rm -rf ../../IOIPSL modipsl 15 27 16 ./model IOIPSL_PLUS 28 # 1. Get IOIPSL 29 # move up at same level as LMDZ.COMMON , etc. 30 cd ../.. 31 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 17 32 18 # 2. Set correct settings: 19 # add a "ciclad" configuration to AA_make.gdef 20 echo "#-Q- cicladi #- Global definitions for ciclad at UPMC, ifort" >> AA_make.gdef 21 echo "#-Q- cicladi M_K = make" >> AA_make.gdef 22 echo "#-Q- cicladi P_C = cpp" >> AA_make.gdef 23 echo '#-Q- cicladi P_O = -P -C $(P_P)' >> AA_make.gdef 24 echo "#-Q- cicladi F_C = ifort -mcmodel=large -shared-intel -c" >> AA_make.gdef 25 echo "#-Q- cicladi #-D- MD F_D = -g" >> AA_make.gdef 26 echo "#-Q- cicladi #-D- MN F_D =" >> AA_make.gdef 27 echo "#-Q- cicladi #-P- I4R4 F_P = -integer-size 32" >> AA_make.gdef 28 echo "#-Q- cicladi #-P- I4R8 F_P = -integer-size 32 -real-size 64" >> AA_make.gdef 29 echo "#-Q- cicladi #-P- I8R8 F_P = -integer-size 64 -real-size 64" >> AA_make.gdef 30 echo '#-Q- cicladi F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef 31 echo "#-Q- cicladi F_L = ifort" >> AA_make.gdef 32 echo "#-Q- cicladi M_M = 0" >> AA_make.gdef 33 echo "#-Q- cicladi L_X = 0" >> AA_make.gdef 34 echo "#-Q- cicladi L_O =" >> AA_make.gdef 35 echo "#-Q- cicladi A_C = ar -r" >> AA_make.gdef 36 echo "#-Q- cicladi A_G = ar -x" >> AA_make.gdef 37 echo "#-Q- cicladi C_C = icc -c" >> AA_make.gdef 38 echo "#-Q- cicladi C_O =" >> AA_make.gdef 39 echo "#-Q- cicladi C_L = icc" >> AA_make.gdef 40 echo "#-Q- cicladi #-" >> AA_make.gdef 41 echo "#-Q- cicladi NCDF_INC = ${NETCDF_INCDIR:2}" >> AA_make.gdef 42 echo "#-Q- cicladi NCDF_LIB = ${NETCDF_LIBDIR} ${NETCDF_LIB}" >> AA_make.gdef 43 echo "#-Q- cicladi #-" >> AA_make.gdef 44 45 # set default working precision for IOIPSL: 46 ./ins_make -t cicladi -p I4R8 33 # 2. Set correct settings: copy over arch.* files 34 cd IOIPSL 35 cp -f ../LMDZ.COMMON/arch/arch-CICLADifort.env arch 36 cp -f ../LMDZ.COMMON/arch/arch-CICLADifort.path arch 37 cp -f ../LMDZ.COMMON/arch/arch-CICLADifort.fcm arch 47 38 48 39 ## 3. build ioipsl: 49 cd ../modeles/IOIPSL/src 50 make 51 ## Compile the rebuild tool: 52 cd ../tools 53 make 40 ./makeioipsl_fcm -arch CICLADifort -job 8 > makeioipsl.out 2>&1 54 41 55 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 42 ## 4. Check if the library was indeed built: 43 whereami=`pwd -P` 44 if [[ -f lib/libioipsl.a ]] 56 45 then 57 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"46 echo "OK: ioipsl library is in ${whereami}/lib" 58 47 else 59 echo "Something went wrong..." 48 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 49 exit 60 50 fi 51 52 ## 5. Comply with old setup and make appropriate links 53 cd ../LMDZ.COMMON/ioipsl 54 mkdir modipsl 55 cd modipsl 56 # lib + module files 57 mkdir lib 58 cd lib 59 ln -s ../../../../IOIPSL/lib/libioipsl.a . 60 ln -s ../../../../IOIPSL/inc/* . 61 cd .. 62 # rebuild utility 63 mkdir bin 64 cd bin 65 ln -s ../../../../IOIPSL/bin/* . -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_gfortran.bash
r2075 r2412 2 2 # script to download and install the latest version of IOIPSL 3 3 # using gfortran 4 # You'll probably have to change path s to NetCDF library 'lib' and 'include'4 # You'll probably have to change path to NetCDF library 5 5 # below to adapt this script to your computer. 6 6 7 #setfolder="/planeto/emlmd/netcdf64-4.0.1_gfortran4.4.7" 8 #setfolder="/donnees/emlmd/netcdf64-4.0.1_gfortran/" 9 setfolder=$NETCDF 7 #0. Preliminary stuff 8 if (( $# == 0 )) 9 then 10 # default behavior: get latest version of IOIPSL 11 rev="HEAD" 12 else 13 # but otherwise the first argument of the script can be the version to use 14 if (( $# == 1 )) 15 then 16 rev=$1 17 else 18 echo "Error, invalid script arguments" 19 echo "Usage:" 20 echo "$0 rev" 21 echo " where optional rev is the IOIPSL revision number" 22 exit 23 fi 24 fi 10 25 11 #0. Preliminary stuff 12 # netcdf include and lib dirs: 13 netcdf_include=$setfolder"/include" 14 netcdf_lib=$setfolder"/lib" 26 # Where is the NetCDF library root located? Hopefully nf-config can tell us 27 # but you might need an appropriate "module load netcdf***" beforehand 28 NETCDF_HOME=$(nf-config --prefix) 15 29 16 whereami=`pwd -P` 30 # cleanup possible previous attempt: 31 \rm -rf ../../IOIPSL modipsl 17 32 18 # 1. Get IOIPSL (via modipsl) 19 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 20 cd modipsl/util 33 # 1. Get IOIPSL 34 # move up at same level as LMDZ.COMMON , etc. 35 cd ../.. 36 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 21 37 22 # make all refs to ksh become refs to bash 23 for i in ins_m_prec model script_diff_model script_log_analyse script_recup_model 24 do 25 sed -e s:'#!/bin/ksh':'#!/bin/bash':1 $i > tmp 26 mv -f tmp $i 27 done 28 chmod u=rwx model 29 chmod u=rwx ins_m_prec 30 ./model IOIPSL_PLUS 31 32 # 2. Set correct settings: 33 # modify path to netcdf in 'AA_make.gdef' 34 cp AA_make.gdef AA_make.gdef.old 35 sed -e s:"gfortran NCDF_INC = /usr/local/include":"gfortran NCDF_INC = ${netcdf_include}":1 \ 36 -e s:"gfortran NCDF_LIB = -L/usr/local/lib":"gfortran NCDF_LIB = -L${netcdf_lib}":1 \ 37 AA_make.gdef.old > AA_make.gdef 38 39 # set default working precision for IOIPSL: 40 ./ins_make -t gfortran -p I4R8 38 # 2. Set correct settings: make some arch.* files 39 # Ideally these arch files should be the same as the GCM's 40 # arch.env file (add any suitable module load here) 41 cd IOIPSL/arch 42 echo "" > arch-gfortran.env 43 echo "export NETCDF_HOME=$NETCDF_HOME" >> arch-gfortran.env 44 # arch.fcm file 45 echo '%COMPILER gfortran' > arch-gfortran.fcm 46 echo '%LINK gfortran' >> arch-gfortran.fcm 47 echo '%AR ar' >> arch-gfortran.fcm 48 echo '%MAKE make' >> arch-gfortran.fcm 49 echo '%FPP_FLAGS -P -traditional' >> arch-gfortran.fcm 50 echo '%BASE_FFLAGS -c -fdefault-real-8 -fdefault-double-8 -ffree-line-length-none -fno-align-commons -fcray-pointer' >> arch-gfortran.fcm 51 echo '%PROD_FFLAGS -O3' >> arch-gfortran.fcm 52 echo '%DEV_FFLAGS -O -Wall -fbounds-check' >> arch-gfortran.fcm 53 echo '%DEBUG_FFLAGS -ffpe-trap=invalid,zero,overflow -fbounds-check -g3 -O0 -fstack-protector-all -finit-real=snan -fbacktrace' >> arch-gfortran.fcm 54 echo '%MPI_FFLAGS ' >> arch-gfortran.fcm 55 echo '%OMP_FFLAGS ' >> arch-gfortran.fcm 56 echo '%BASE_LD ' >> arch-gfortran.fcm 57 echo '%MPI_LD ' >> arch-gfortran.fcm 58 echo '%OMP_LD ' >> arch-gfortran.fcm 59 # arch.path file 60 echo "NETCDF_INCDIR=\"-I$NETCDF_HOME/include\"" > arch-gfortran.path 61 echo "NETCDF_LIBDIR=\"-L$NETCDF_HOME/lib\"" >> arch-gfortran.path 62 echo 'NETCDF_LIB="-lnetcdff"' >> arch-gfortran.path 63 echo '' >> arch-gfortran.path 64 echo 'HDF5_INCDIR=""' >> arch-gfortran.path 65 echo 'HDF5_LIBDIR=""' >> arch-gfortran.path 66 echo 'HDF5_LIB=""' >> arch-gfortran.path 67 echo '' >> arch-gfortran.path 68 echo 'MPI_INCDIR=""' >> arch-gfortran.path 69 echo 'MPI_LIBDIR=""' >> arch-gfortran.path 70 echo 'MPI_LIB=""' >> arch-gfortran.path 41 71 42 72 ## 3. build ioipsl: 43 cd ../modeles/IOIPSL/src 44 # make all refs to ksh become refs to bash 45 for i in AA_make.ldef Makefile 46 do 47 sed -e s:'/bin/ksh':'/bin/bash':1 $i > tmp 48 mv -f tmp $i 49 done 50 make 51 ## Compile the rebuild tool: 52 cd ../tools 53 # make all refs to ksh become refs to bash 54 for i in AA_make.ldef Makefile rebuild 55 do 56 sed -e s:'/bin/ksh':'/bin/bash':1 $i > tmp 57 mv -f tmp $i 58 done 59 chmod u=rwx rebuild 60 make 73 cd .. 74 ./makeioipsl_fcm -arch gfortran -job 8 > makeioipsl.out 2>&1 61 75 62 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 76 ## 4. Check if the library was indeed built: 77 whereami=`pwd -P` 78 if [[ -f lib/libioipsl.a ]] 63 79 then 64 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"80 echo "OK: ioipsl library is in ${whereami}/lib" 65 81 else 66 echo "Something went wrong..." 82 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 83 exit 67 84 fi 68 85 86 ## 5. Comply with old setup and make appropriate links 87 cd ../LMDZ.COMMON/ioipsl 88 mkdir modipsl 89 cd modipsl 90 # lib + module files 91 mkdir lib 92 cd lib 93 ln -s ../../../../IOIPSL/lib/libioipsl.a . 94 ln -s ../../../../IOIPSL/inc/* . 95 cd .. 96 # rebuild utility 97 mkdir bin 98 cd bin 99 ln -s ../../../../IOIPSL/bin/* . 100 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_ifort.bash
r1824 r2412 1 1 #!/bin/bash 2 # script to download and install the latest version of IOIPSL on Gnome 3 # 2 # script to download and install the latest version of IOIPSL 3 # using ifort 4 # You'll probably have to change path to NetCDF library 5 # below to adapt this script to your computer. 4 6 5 7 #0. Preliminary stuff 6 NETCDF="/opt/netcdf3/ifort" 7 netcdf_include="$NETCDF/include" 8 netcdf_lib="$NETCDF/lib" 9 echo $netcdf_include 10 echo $netcdf_lib 8 if (( $# == 0 )) 9 then 10 # default behavior: get latest version of IOIPSL 11 rev="HEAD" 12 else 13 # but otherwise the first argument of the script can be the version to use 14 if (( $# == 1 )) 15 then 16 rev=$1 17 else 18 echo "Error, invalid script arguments" 19 echo "Usage:" 20 echo "$0 rev" 21 echo " where optional rev is the IOIPSL revision number" 22 exit 23 fi 24 fi 11 25 12 whereami=`pwd -P` 26 # Where is the NetCDF library root located? Hopefully nf-config can tell us 27 # but you might need an appropriate "module load netcdf***" beforehand 28 NETCDF_HOME=$(nf-config --prefix) 13 29 14 # 1. Get IOIPSL (via modipsl) 15 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 16 cd modipsl/util 30 # cleanup possible previous attempt: 31 \rm -rf ../../IOIPSL modipsl 17 32 18 ./model IOIPSL_PLUS 33 # 1. Get IOIPSL 34 # move up at same level as LMDZ.COMMON , etc. 35 cd ../.. 36 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 19 37 20 # 2. Set correct settings: 21 # add a "ciclad" configuration to AA_make.gdef 22 echo "#-Q- cicladi #- Global definitions for ciclad at UPMC, ifort" >> AA_make.gdef 23 echo "#-Q- cicladi M_K = make" >> AA_make.gdef 24 echo "#-Q- cicladi P_C = cpp" >> AA_make.gdef 25 echo '#-Q- cicladi P_O = -P -C $(P_P)' >> AA_make.gdef 26 echo "#-Q- cicladi F_C = ifort -mcmodel=large -shared-intel -c" >> AA_make.gdef 27 echo "#-Q- cicladi #-D- MD F_D = -g" >> AA_make.gdef 28 echo "#-Q- cicladi #-D- MN F_D =" >> AA_make.gdef 29 echo "#-Q- cicladi #-P- I4R4 F_P = -integer-size 32" >> AA_make.gdef 30 echo "#-Q- cicladi #-P- I4R8 F_P = -integer-size 32 -real-size 64" >> AA_make.gdef 31 echo "#-Q- cicladi #-P- I8R8 F_P = -integer-size 64 -real-size 64" >> AA_make.gdef 32 echo '#-Q- cicladi F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef 33 echo "#-Q- cicladi F_L = ifort" >> AA_make.gdef 34 echo "#-Q- cicladi M_M = 0" >> AA_make.gdef 35 echo "#-Q- cicladi L_X = 0" >> AA_make.gdef 36 echo "#-Q- cicladi L_O =" >> AA_make.gdef 37 echo "#-Q- cicladi A_C = ar -r" >> AA_make.gdef 38 echo "#-Q- cicladi A_G = ar -x" >> AA_make.gdef 39 echo "#-Q- cicladi C_C = icc -c" >> AA_make.gdef 40 echo "#-Q- cicladi C_O =" >> AA_make.gdef 41 echo "#-Q- cicladi C_L = icc" >> AA_make.gdef 42 echo "#-Q- cicladi #-" >> AA_make.gdef 43 echo "#-Q- cicladi NCDF_INC = ${netcdf_include}" >> AA_make.gdef 44 echo "#-Q- cicladi NCDF_LIB = -L${netcdf_lib} -lnetcdf" >> AA_make.gdef 45 echo "#-Q- cicladi #-" >> AA_make.gdef 46 47 # set default working precision for IOIPSL: 48 ./ins_make -t cicladi -p I4R8 38 # 2. Set correct settings: make some arch.* files 39 # Ideally these arch files should be the same as the GCM's 40 # arch.env file (add any suitable module load here) 41 cd IOIPSL/arch 42 echo "" > arch-ifort.env 43 echo "export NETCDF_HOME=$NETCDF_HOME" >> arch-ifort.env 44 # arch.fcm file 45 echo '%COMPILER ifort' > arch-ifort.fcm 46 echo '%LINK ifort' >> arch-ifort.fcm 47 echo '%AR ar' >> arch-ifort.fcm 48 echo '%MAKE make' >> arch-ifort.fcm 49 echo '%FPP_FLAGS -P -traditional' >> arch-ifort.fcm 50 echo '%BASE_FFLAGS -real-size 64 -ip -mkl=parallel -fp-model precise -align common' >> arch-ifort.fcm 51 echo '%PROD_FFLAGS -O3' >> arch-ifort.fcm 52 echo '%DEV_FFLAGS -O2' >> arch-ifort.fcm 53 echo '%DEBUG_FFLAGS -fpe0 -g -no-ftz -check -traceback -ftrapuv -fp-stack-check -O0' >> arch-ifort.fcm 54 echo '%MPI_FFLAGS ' >> arch-ifort.fcm 55 echo '%OMP_FFLAGS ' >> arch-ifort.fcm 56 echo '%BASE_LD ' >> arch-ifort.fcm 57 echo '%MPI_LD ' >> arch-ifort.fcm 58 echo '%OMP_LD ' >> arch-ifort.fcm 59 # arch.path file 60 echo "NETCDF_INCDIR=\"-I$NETCDF_HOME/include\"" > arch-ifort.path 61 echo "NETCDF_LIBDIR=\"-L$NETCDF_HOME/lib\"" >> arch-ifort.path 62 echo 'NETCDF_LIB="-lnetcdff"' >> arch-ifort.path 63 echo '' >> arch-ifort.path 64 echo 'HDF5_INCDIR=""' >> arch-ifort.path 65 echo 'HDF5_LIBDIR=""' >> arch-ifort.path 66 echo 'HDF5_LIB=""' >> arch-ifort.path 67 echo '' >> arch-ifort.path 68 echo 'MPI_INCDIR=""' >> arch-ifort.path 69 echo 'MPI_LIBDIR=""' >> arch-ifort.path 70 echo 'MPI_LIB=""' >> arch-ifort.path 49 71 50 72 ## 3. build ioipsl: 51 cd ../modeles/IOIPSL/src 52 make 53 ## Compile the rebuild tool: 54 cd ../tools 55 make 73 cd .. 74 ./makeioipsl_fcm -arch ifort -job 8 > makeioipsl.out 2>&1 56 75 57 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 76 ## 4. Check if the library was indeed built: 77 whereami=`pwd -P` 78 if [[ -f lib/libioipsl.a ]] 58 79 then 59 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"80 echo "OK: ioipsl library is in ${whereami}/lib" 60 81 else 61 echo "Something went wrong..." 82 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 83 exit 62 84 fi 85 86 ## 5. Comply with old setup and make appropriate links 87 cd ../LMDZ.COMMON/ioipsl 88 mkdir modipsl 89 cd modipsl 90 # lib + module files 91 mkdir lib 92 cd lib 93 ln -s ../../../../IOIPSL/lib/libioipsl.a . 94 ln -s ../../../../IOIPSL/inc/* . 95 cd .. 96 # rebuild utility 97 mkdir bin 98 cd bin 99 ln -s ../../../../IOIPSL/bin/* . 100 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_jeanzay.bash
r2256 r2412 1 1 #!/bin/bash 2 # script to download and install the latest version of IOIPSL on occigen2 # script to download and install the latest version of IOIPSL on Jean Zay 3 3 # 4 4 5 5 #0. Preliminary stuff 6 source ../arch/arch-X64_JEANZAY.env7 6 module load subversion 8 7 8 if (( $# == 0 )) 9 then 10 # default behavior: get latest version of IOIPSL 11 rev="HEAD" 12 else 13 # but otherwise the first argument of the script can be the version to use 14 if (( $# == 1 )) 15 then 16 rev=$1 17 else 18 echo "Error, invalid script arguments" 19 echo "Usage:" 20 echo "$0 rev" 21 echo " where optional rev is the IOIPSL revision number" 22 exit 23 fi 24 fi 9 25 10 whereami=`pwd -P` 26 # cleanup possible previous attempt: 27 \rm -rf ../../IOIPSL modipsl 11 28 12 # 1. Get IOIPSL (via modipsl) 13 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 14 cd modipsl/util 29 # 1. Get IOIPSL 30 # move up at same level as LMDZ.COMMON , etc. 31 cd ../.. 32 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 15 33 16 ./model IOIPSL_PLUS 17 18 # 2. Set correct settings: 19 # set default working precision for IOIPSL: 20 ./ins_make -t jeanzay -p I4R8 34 # 2. Set correct settings: copy over arch.* files 35 cd IOIPSL 36 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY.env arch 37 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY.path arch 38 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY.fcm arch 21 39 22 40 ## 3. build ioipsl: 23 cd ../modeles/IOIPSL/src 24 gmake 25 ## Compile the rebuild tool: 26 cd ../tools 27 gmake 41 ./makeioipsl_fcm -arch X64_JEANZAY -job 8 > makeioipsl.out 2>&1 28 42 29 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 43 ## 4. Check if the library was indeed built: 44 whereami=`pwd -P` 45 if [[ -f lib/libioipsl.a ]] 30 46 then 31 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"47 echo "OK: ioipsl library is in ${whereami}/lib" 32 48 else 33 echo "Something went wrong..." 49 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 50 exit 34 51 fi 52 53 ## 5. Comply with old setup and make appropriate links 54 cd ../LMDZ.COMMON/ioipsl 55 mkdir modipsl 56 cd modipsl 57 # lib + module files 58 mkdir lib 59 cd lib 60 ln -s ../../../../IOIPSL/lib/libioipsl.a . 61 ln -s ../../../../IOIPSL/inc/* . 62 cd .. 63 # rebuild utility 64 mkdir bin 65 cd bin 66 ln -s ../../../../IOIPSL/bin/* . 67 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_jeanzay_pgi.bash
r2256 r2412 1 1 #!/bin/bash 2 # script to download and install the latest version of IOIPSL on occigen2 # script to download and install the latest version of IOIPSL on Jean Zay 3 3 # 4 4 5 5 #0. Preliminary stuff 6 source ../arch/arch-X64_JEANZAY-pgi.env7 6 module load subversion 8 7 8 if (( $# == 0 )) 9 then 10 # default behavior: get latest version of IOIPSL 11 rev="HEAD" 12 else 13 # but otherwise the first argument of the script can be the version to use 14 if (( $# == 1 )) 15 then 16 rev=$1 17 else 18 echo "Error, invalid script arguments" 19 echo "Usage:" 20 echo "$0 rev" 21 echo " where optional rev is the IOIPSL revision number" 22 exit 23 fi 24 fi 9 25 10 whereami=`pwd -P` 26 # cleanup possible previous attempt: 27 \rm -rf ../../IOIPSL modipsl 11 28 12 # 1. Get IOIPSL (via modipsl) 13 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 14 cd modipsl/util 29 # 1. Get IOIPSL 30 # move up at same level as LMDZ.COMMON , etc. 31 cd ../.. 32 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 15 33 16 ./model IOIPSL_PLUS 17 18 # 2. Set correct settings: 19 # set default working precision for IOIPSL: 20 sed -i -e s:"jeanzay F_C = mpiifort -c -cpp":"jeanzay F_C = mpif90 -c -Mpreprocess":1 \ 21 -e s/'jeanzay F_O = -DCPP_PARA -O3 $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR) -fp-model precise'/'jeanzay F_O = -DCPP_PARA -fast -O3 -Munroll=c:4 $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)'/1 \ 22 -e s:'jeanzay NCDF_INC = ./':"jeanzay NCDF_INC = $(nf-config --includedir)":1 \ 23 -e s:'jeanzay NCDF_LIB = -lnetcdff':"jeanzay NCDF_LIB = $(nf-config --flibs)":1 \ 24 -e s:"jeanzay F_L = mpiifort":"jeanzay F_L = mpif90":1 AA_make.gdef 25 26 ./ins_make -t jeanzay -p I4R8 34 # 2. Set correct settings: copy over arch.* files 35 cd IOIPSL 36 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY-pgi.env arch 37 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY-pgi.path arch 38 cp -f ../LMDZ.COMMON/arch/arch-X64_JEANZAY-pgi.fcm arch 27 39 28 40 ## 3. build ioipsl: 29 cd ../modeles/IOIPSL/src 30 gmake 31 ## Compile the rebuild tool: 32 cd ../tools 33 gmake 41 ./makeioipsl_fcm -arch X64_JEANZAY-pgi -job 8 > makeioipsl.out 2>&1 34 42 35 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 43 ## 4. Check if the library was indeed built: 44 whereami=`pwd -P` 45 if [[ -f lib/libioipsl.a ]] 36 46 then 37 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"47 echo "OK: ioipsl library is in ${whereami}/lib" 38 48 else 39 echo "Something went wrong..." 49 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 50 exit 40 51 fi 52 53 ## 5. Comply with old setup and make appropriate links 54 cd ../LMDZ.COMMON/ioipsl 55 mkdir modipsl 56 cd modipsl 57 # lib + module files 58 mkdir lib 59 cd lib 60 ln -s ../../../../IOIPSL/lib/libioipsl.a . 61 ln -s ../../../../IOIPSL/inc/* . 62 cd .. 63 # rebuild utility 64 mkdir bin 65 cd bin 66 ln -s ../../../../IOIPSL/bin/* . 67 -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_occigen.bash
r1671 r2412 1 1 #!/bin/bash 2 # script to download and install the latest version of IOIPSL on occigen2 # script to download and install the latest version of IOIPSL on Occigen 3 3 # 4 4 5 #0. Preliminary stuff 6 module purge 7 #module load intel/15.6.233 8 #module load intelmpi/5.1.3.258 9 #module load hdf5/1.8.14 10 #module load netcdf/4.3.3-rc2_fortran-4.4.1 11 module load intel/17.0 12 module load intelmpi/2017.0.098 13 module load hdf5/1.8.17 14 module load netcdf/4.4.0_fortran-4.4.2 5 #0. Preliminary stuff 15 6 16 whereami=`pwd -P` 7 if (( $# == 0 )) 8 then 9 # default behavior: get latest version of IOIPSL 10 rev="HEAD" 11 else 12 # but otherwise the first argument of the script can be the version to use 13 if (( $# == 1 )) 14 then 15 rev=$1 16 else 17 echo "Error, invalid script arguments" 18 echo "Usage:" 19 echo "$0 rev" 20 echo " where optional rev is the IOIPSL revision number" 21 exit 22 fi 23 fi 17 24 18 # 1. Get IOIPSL (via modipsl) 19 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 20 cd modipsl/util 25 # cleanup possible previous attempt: 26 \rm -rf ../../IOIPSL modipsl 21 27 22 ./model IOIPSL_PLUS 28 # 1. Get IOIPSL 29 # move up at same level as LMDZ.COMMON , etc. 30 cd ../.. 31 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 23 32 24 # 2. Set correct settings: 25 # add a "occigen" configuration to AA_make.gdef 26 echo "#-Q- occigen #- Global definitions for Occigen at CINES, ifort" >> AA_make.gdef 27 echo "#-Q- occigen M_K = make" >> AA_make.gdef 28 echo "#-Q- occigen P_C = cpp" >> AA_make.gdef 29 echo '#-Q- occigen P_O = -P -C $(P_P)' >> AA_make.gdef 30 echo "#-Q- occigen F_C = ifort -mcmodel=medium -shared-intel -c" >> AA_make.gdef 31 echo "#-Q- occigen #-D- MD F_D = -g" >> AA_make.gdef 32 echo "#-Q- occigen #-D- MN F_D =" >> AA_make.gdef 33 echo "#-Q- occigen #-P- I4R4 F_P = -integer-size 32" >> AA_make.gdef 34 echo "#-Q- occigen #-P- I4R8 F_P = -integer-size 32 -real-size 64" >> AA_make.gdef 35 echo "#-Q- occigen #-P- I8R8 F_P = -integer-size 64 -real-size 64" >> AA_make.gdef 36 echo '#-Q- occigen F_O = -O $(F_D) $(F_P) -I$(MODDIR) -module $(MODDIR)' >> AA_make.gdef 37 echo "#-Q- occigen F_L = ifort" >> AA_make.gdef 38 echo "#-Q- occigen M_M = 0" >> AA_make.gdef 39 echo "#-Q- occigen L_X = 0" >> AA_make.gdef 40 echo "#-Q- occigen L_O =" >> AA_make.gdef 41 echo "#-Q- occigen A_C = ar -r" >> AA_make.gdef 42 echo "#-Q- occigen A_G = ar -x" >> AA_make.gdef 43 echo "#-Q- occigen C_C = icc -c" >> AA_make.gdef 44 echo "#-Q- occigen C_O =" >> AA_make.gdef 45 echo "#-Q- occigen C_L = icc" >> AA_make.gdef 46 echo "#-Q- occigen #-" >> AA_make.gdef 47 echo "#-Q- occigen NCDF_INC = ${NETCDFF_INCDIR}" >> AA_make.gdef 48 echo "#-Q- occigen NCDF_LIB = -L${NETCDFF_LIBDIR} -lnetcdff" >> AA_make.gdef 49 echo "#-Q- occigen #-" >> AA_make.gdef 50 51 # set default working precision for IOIPSL: 52 ./ins_make -t occigen -p I4R8 33 # 2. Set correct settings: copy over arch.* files 34 cd IOIPSL 35 cp -f ../LMDZ.COMMON/arch/arch-X64_OCCIGEN.env arch 36 cp -f ../LMDZ.COMMON/arch/arch-X64_OCCIGEN.path arch 37 cp -f ../LMDZ.COMMON/arch/arch-X64_OCCIGEN.fcm arch 53 38 54 39 ## 3. build ioipsl: 55 cd ../modeles/IOIPSL/src 56 make 57 ## Compile the rebuild tool: 58 cd ../tools 59 make 40 # but first make a small correction to makeioipsl_fcm 41 sed -i -e s:'$HDF5_LIBDIR $HDF5_LIB':'':1 makeioipsl_fcm 42 ./makeioipsl_fcm -arch X64_OCCIGEN -job 8 > makeioipsl.out 2>&1 60 43 61 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 44 ## 4. Check if the library was indeed built: 45 whereami=`pwd -P` 46 if [[ -f lib/libioipsl.a ]] 62 47 then 63 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"48 echo "OK: ioipsl library is in ${whereami}/lib" 64 49 else 65 echo "Something went wrong..." 50 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 51 exit 66 52 fi 53 54 ## 5. Comply with old setup and make appropriate links 55 cd ../LMDZ.COMMON/ioipsl 56 mkdir modipsl 57 cd modipsl 58 # lib + module files 59 mkdir lib 60 cd lib 61 ln -s ../../../../IOIPSL/lib/libioipsl.a . 62 ln -s ../../../../IOIPSL/inc/* . 63 cd .. 64 # rebuild utility 65 mkdir bin 66 cd bin 67 ln -s ../../../../IOIPSL/bin/* . -
trunk/LMDZ.COMMON/ioipsl/install_ioipsl_pgf90.bash
r1567 r2412 2 2 # script to download and install the latest version of IOIPSL 3 3 # using pgf90 4 # You'll probably have to change path s to NetCDF library 'lib' and 'include'4 # You'll probably have to change path to NetCDF library 5 5 # below to adapt this script to your computer. 6 6 7 7 #0. Preliminary stuff 8 # netcdf include and lib dirs: 9 netcdf_include="/donnees/emlmd/netcdf64-4.0.1_pgi/include" 10 netcdf_lib="/donnees/emlmd/netcdf64-4.0.1_pgi/lib" 8 if (( $# == 0 )) 9 then 10 # default behavior: get latest version of IOIPSL 11 rev="HEAD" 12 else 13 # but otherwise the first argument of the script can be the version to use 14 if (( $# == 1 )) 15 then 16 rev=$1 17 else 18 echo "Error, invalid script arguments" 19 echo "Usage:" 20 echo "$0 rev" 21 echo " where optional rev is the IOIPSL revision number" 22 exit 23 fi 24 fi 11 25 12 whereami=`pwd -P` 26 # Where is the NetCDF library root located? Hopefully nf-config can tell us 27 # but you might need an appropriate "module load netcdf***" beforehand 28 NETCDF_HOME=$(nf-config --prefix) 13 29 14 # 1. Get IOIPSL (via modipsl) 15 svn co http://forge.ipsl.jussieu.fr/igcmg/svn/modipsl/trunk modipsl 16 cd modipsl/util 30 # cleanup possible previous attempt: 31 \rm -rf ../../IOIPSL modipsl 17 32 18 ./model IOIPSL_PLUS 33 # 1. Get IOIPSL 34 # move up at same level as LMDZ.COMMON , etc. 35 cd ../.. 36 svn co --revision $rev http://forge.ipsl.jussieu.fr/igcmg/svn/IOIPSL/trunk IOIPSL 19 37 20 # 2. Set correct settings: 21 # modify path to netcdf in 'AA_make.gdef' 22 cp AA_make.gdef AA_make.gdef.old 23 sed -e s:"linux NCDF_INC = /distrib/local/netcdf/pgf/include/":"linux NCDF_INC = ${netcdf_include}":1 \ 24 -e s:"linux NCDF_LIB = -L/distrib/local/netcdf/pgf/lib/":"linux NCDF_LIB = -L${netcdf_lib}":1 \ 25 AA_make.gdef.old > AA_make.gdef 26 27 # set default working precision for IOIPSL: 28 ./ins_make -t linux -p I4R8 38 # 2. Set correct settings: make some arch.* files 39 # Ideally these arch files should be the same as the GCM's 40 # arch.env file (add any suitable module load here) 41 cd IOIPSL/arch 42 echo "" > arch-pgf90.env 43 echo "export NETCDF_HOME=$NETCDF_HOME" >> arch-pgf90.env 44 # arch.fcm file 45 echo '%COMPILER pgf90' > arch-pgf90.fcm 46 echo '%LINK pgf90' >> arch-pgf90.fcm 47 echo '%AR ar' >> arch-pgf90.fcm 48 echo '%MAKE make' >> arch-pgf90.fcm 49 echo '%FPP_FLAGS -P -traditional' >> arch-pgf90.fcm 50 echo '%BASE_FFLAGS -i4 -r8' >> arch-pgf90.fcm 51 echo '%PROD_FFLAGS -O2 -Munroll -Mnoframe -Mautoinline -Mcache_align' >> arch-pgf90.fcm 52 echo '%DEV_FFLAGS -Mbounds' >> arch-pgf90.fcm 53 echo '%DEBUG_FFLAGS -g -traceback -Mbounds -Mchkfpstk -Mchkstk -Ktrap=denorm,divz,fp,inv,ovf' >> arch-pgf90.fcm 54 echo '%MPI_FFLAGS ' >> arch-pgf90.fcm 55 echo '%OMP_FFLAGS ' >> arch-pgf90.fcm 56 echo '%BASE_LD ' >> arch-pgf90.fcm 57 echo '%MPI_LD ' >> arch-pgf90.fcm 58 echo '%OMP_LD ' >> arch-pgf90.fcm 59 # arch.path file 60 echo "NETCDF_INCDIR=\"-I$NETCDF_HOME/include\"" > arch-pgf90.path 61 echo "NETCDF_LIBDIR=\"-L$NETCDF_HOME/lib\"" >> arch-pgf90.path 62 echo 'NETCDF_LIB="-lnetcdff"' >> arch-pgf90.path 63 echo '' >> arch-pgf90.path 64 echo 'HDF5_INCDIR=""' >> arch-pgf90.path 65 echo 'HDF5_LIBDIR=""' >> arch-pgf90.path 66 echo 'HDF5_LIB=""' >> arch-pgf90.path 67 echo '' >> arch-pgf90.path 68 echo 'MPI_INCDIR=""' >> arch-pgf90.path 69 echo 'MPI_LIBDIR=""' >> arch-pgf90.path 70 echo 'MPI_LIB=""' >> arch-pgf90.path 29 71 30 72 ## 3. build ioipsl: 31 cd ../modeles/IOIPSL/src 32 make 33 ## Compile the rebuild tool: 34 cd ../tools 35 make 73 cd .. 74 ./makeioipsl_fcm -arch pgf90 -job 8 > makeioipsl.out 2>&1 36 75 37 if [[ -f ${whereami}/modipsl/lib/libioipsl.a ]] 76 ## 4. Check if the library was indeed built: 77 whereami=`pwd -P` 78 if [[ -f lib/libioipsl.a ]] 38 79 then 39 echo "OK: ioipsl library is in ${whereami}/ modipsl/lib"80 echo "OK: ioipsl library is in ${whereami}/lib" 40 81 else 41 echo "Something went wrong..." 82 echo "Something went wrong... check messages in ${whereami}/makeioipsl.out" 83 exit 42 84 fi 43 85 86 ## 5. Comply with old setup and make appropriate links 87 cd ../LMDZ.COMMON/ioipsl 88 mkdir modipsl 89 cd modipsl 90 # lib + module files 91 mkdir lib 92 cd lib 93 ln -s ../../../../IOIPSL/lib/libioipsl.a . 94 ln -s ../../../../IOIPSL/inc/* . 95 cd .. 96 # rebuild utility 97 mkdir bin 98 cd bin 99 ln -s ../../../../IOIPSL/bin/* . 100
Note: See TracChangeset
for help on using the changeset viewer.