Changeset 1497 for XIOS/dev/XIOS_DEV_CMIP6/make_xios
- Timestamp:
- 05/03/18 14:05:28 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/make_xios
r1458 r1497 5 5 use_oasis="false" 6 6 oasis="oasis3_mct" 7 build_path="./" 8 build_dir="./" 9 build_suffixed="false" 7 10 use_extern_boost="false" 8 11 use_extern_blitz="false" … … 11 14 netcdf_lib="netcdf4_par" 12 15 compil_mode="prod" 13 arch_path= "arch"14 arch_default_path= "arch"16 arch_path=$PWD/"arch" 17 arch_default_path=$PWD/"arch" 15 18 arch_defined="FALSE" 16 19 arch_path_defined="FALSE" … … 30 33 echo " [--avail] : to know available target architectures " 31 34 echo " [--full] : to generate dependencies and recompile from scratch" 32 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"i 35 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler" 36 echo " [--build_path : absolute or relative path to the build directory" 37 echo " [--build_dir : name of the build directory" 38 echo " [--build_suffixed : generate automatically suffixed name of the build directory (e.g. config_X64_CURIE_prod)" 33 39 echo " [--use_extern_boost : to use external boost library" 34 40 echo " [--use_extern_blitz : to use external blitz library" … … 48 54 "--full") compil_full="true" ; shift ;; 49 55 "--use_oasis") use_oasis="true" oasis=$2 ; shift ; shift ;; 56 "--build_path") build_path=$2 ; shift ; shift ;; 57 "--build_dir") build_dir=$2 ; shift ; shift ;; 58 "--build_suffixed") build_suffixed="true" ; shift ;; 50 59 "--use_extern_boost") use_extern_boost="true" ; shift ;; 51 60 "--use_extern_blitz") use_extern_blitz="true" ; shift ;; … … 73 82 fi 74 83 84 # Definition of the root directory of the build 85 if [[ "$build_suffixed" == "true" ]]; then 86 install_dir=$PWD/${build_path}/config_${arch}_${compil_mode} 87 else 88 install_dir=$PWD/${build_path}/${build_dir} 89 fi 90 mkdir -p $install_dir 91 92 rm -f ${PWD}/bld_dir.cfg 93 echo "inc ${install_dir}/arch.fcm" >> ${PWD}/bld_dir.cfg 94 echo "inc ${install_dir}/config.fcm" >> ${PWD}/bld_dir.cfg 95 echo "dir::root ${install_dir}" >> ${PWD}/bld_dir.cfg 96 75 97 # Vérification de la présence d'un identifiant d'architecture. 76 98 … … 87 109 if [[ "$arch_defined" == "TRUE" ]] 88 110 then 89 rm -f arch.path90 rm -f arch.fcm91 rm -f arch.env111 rm -f ${install_dir}/arch.path 112 rm -f ${install_dir}/arch.fcm 113 rm -f ${install_dir}/arch.env 92 114 93 115 if test -f $arch_path/arch-${arch}.path 94 116 then 95 ln -s $arch_path/arch-${arch}.path arch.path117 ln -s $arch_path/arch-${arch}.path ${install_dir}/arch.path 96 118 elif test -f $arch_default_path/arch-${arch}.path 97 119 then 98 ln -s $arch_default_path/arch-${arch}.path arch.path120 ln -s $arch_default_path/arch-${arch}.path ${install_dir}/arch.path 99 121 fi 100 122 101 123 if test -f $arch_path/arch-${arch}.fcm 102 124 then 103 ln -s $arch_path/arch-${arch}.fcm arch.fcm125 ln -s $arch_path/arch-${arch}.fcm ${install_dir}/arch.fcm 104 126 elif test -f $arch_default_path/arch-${arch}.fcm 105 127 then 106 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm128 ln -s $arch_default_path/arch-${arch}.fcm ${install_dir}/arch.fcm 107 129 fi 108 130 109 131 if test -f $arch_path/arch-${arch}.env 110 132 then 111 ln -s $arch_path/arch-${arch}.env arch.env133 ln -s $arch_path/arch-${arch}.env ${install_dir}/arch.env 112 134 elif test -f $arch_default_path/arch-${arch}.env 113 135 then 114 ln -s $arch_default_path/arch-${arch}.env arch.env136 ln -s $arch_default_path/arch-${arch}.env ${install_dir}/arch.env 115 137 else 116 ln -s .void_file arch.env138 ln -s .void_file ${install_dir}/arch.env 117 139 fi 118 source arch.env119 source arch.path140 source ${install_dir}/arch.env 141 source ${install_dir}/arch.path 120 142 else 121 143 echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" … … 225 247 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB" 226 248 227 rm -f config.fcm228 echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> config.fcm229 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm230 echo "%CPP_KEY $XIOS_CPPKEY" >> config.fcm231 232 echo "%CBASE_INC $XIOS_CINCDIR" >> config.fcm233 echo "%FBASE_INC $XIOS_FINCDIR" >> config.fcm234 echo "%ARCH_LD $XIOS_LIB" >> config.fcm249 rm -f ${install_dir}/config.fcm 250 echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> ${install_dir}/config.fcm 251 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> ${install_dir}/config.fcm 252 echo "%CPP_KEY $XIOS_CPPKEY" >> ${install_dir}/config.fcm 253 254 echo "%CBASE_INC $XIOS_CINCDIR" >> ${install_dir}/config.fcm 255 echo "%FBASE_INC $XIOS_FINCDIR" >> ${install_dir}/config.fcm 256 echo "%ARCH_LD $XIOS_LIB" >> ${install_dir}/config.fcm 235 257 236 258 echo "=> Using "$compil_mode" mode for compiling under architecture \""$arch"\" !"
Note: See TracChangeset
for help on using the changeset viewer.