Changeset 1638 for XIOS/dev/branch_openmp/make_xios
- Timestamp:
- 01/22/19 16:15:03 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/branch_openmp/make_xios
r1157 r1638 5 5 use_oasis="false" 6 6 oasis="oasis3_mct" 7 build_path="./" 8 build_dir="./" 9 build_suffixed="false" 10 use_extern_boost="false" 11 use_extern_blitz="false" 7 12 use_memtrack="false" 8 13 job="1" 9 14 netcdf_lib="netcdf4_par" 10 15 compil_mode="prod" 11 arch_path= "arch"12 arch_default_path= "arch"16 arch_path=$PWD/"arch" 17 arch_default_path=$PWD/"arch" 13 18 arch_defined="FALSE" 14 19 arch_path_defined="FALSE" … … 29 34 echo " [--full] : to generate dependencies and recompile from scratch" 30 35 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler" 36 echo " [--build_path : absolute 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)" 39 echo " [--use_extern_boost : to use external boost library" 40 echo " [--use_extern_blitz : to use external blitz library" 31 41 echo " [--doc] : to generate Doxygen documentation (not available yet)" 32 42 echo " [--job ntasks] : to use parallel compilation with ntasks" … … 44 54 "--full") compil_full="true" ; shift ;; 45 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 ;; 59 "--use_extern_boost") use_extern_boost="true" ; shift ;; 60 "--use_extern_blitz") use_extern_blitz="true" ; shift ;; 46 61 "--doc") doc="true" ; shift ;; 47 62 "--job") job=$2 ; shift ; shift ;; 48 63 "--netcdf_lib") netcdf_lib=$2 ; shift ; shift ;; 49 64 "--memtrack") use_memtrack="true" memtrack=$2 ; shift ; shift ;; 50 51 52 65 *) code="$1" ; shift ;; 66 esac 67 done 53 68 54 69 # Installation des sources … … 58 73 echo -e "- uncompress archives ..." 59 74 for tarname in `ls $install_dir/tools/archive/*.tar.gz` ; do 75 if ( [[ ${tarname} == "${install_dir}/tools/archive/boost.tar.gz" ]] && [[ "$use_extern_boost" == "true" ]] ) || ( [[ ${tarname} == "${install_dir}/tools/archive/blitz.tar.gz" ]] && [[ "$use_extern_blitz" == "true" ]] ) 76 then 77 continue 78 fi 60 79 gunzip -f "$tarname" 61 80 tar -xf ${tarname%.gz} 62 81 done 63 82 fi 83 84 # Definition of the root directory of the build 85 86 if [[ "$build_path" == "./" ]]; then 87 install_dir=$PWD 88 else 89 install_dir=${build_path} 90 fi 91 92 if [[ "$build_suffixed" == "true" ]]; then 93 install_dir="${install_dir}/config_${arch}_${compil_mode}" 94 else 95 install_dir="${install_dir}/${build_dir}" 96 fi 97 98 mkdir -p $install_dir 99 100 rm -f ${PWD}/bld_dir.cfg 101 echo "inc ${install_dir}/arch.fcm" >> ${PWD}/bld_dir.cfg 102 echo "inc ${install_dir}/config.fcm" >> ${PWD}/bld_dir.cfg 103 echo "dir::root ${install_dir}" >> ${PWD}/bld_dir.cfg 64 104 65 105 # Vérification de la présence d'un identifiant d'architecture. … … 77 117 if [[ "$arch_defined" == "TRUE" ]] 78 118 then 79 rm -f arch.path80 rm -f arch.fcm81 rm -f arch.env119 rm -f ${install_dir}/arch.path 120 rm -f ${install_dir}/arch.fcm 121 rm -f ${install_dir}/arch.env 82 122 83 123 if test -f $arch_path/arch-${arch}.path 84 124 then 85 ln -s $arch_path/arch-${arch}.path arch.path125 ln -s $arch_path/arch-${arch}.path ${install_dir}/arch.path 86 126 elif test -f $arch_default_path/arch-${arch}.path 87 127 then 88 ln -s $arch_default_path/arch-${arch}.path arch.path128 ln -s $arch_default_path/arch-${arch}.path ${install_dir}/arch.path 89 129 fi 90 130 91 131 if test -f $arch_path/arch-${arch}.fcm 92 132 then 93 ln -s $arch_path/arch-${arch}.fcm arch.fcm133 ln -s $arch_path/arch-${arch}.fcm ${install_dir}/arch.fcm 94 134 elif test -f $arch_default_path/arch-${arch}.fcm 95 135 then 96 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm136 ln -s $arch_default_path/arch-${arch}.fcm ${install_dir}/arch.fcm 97 137 fi 98 138 99 139 if test -f $arch_path/arch-${arch}.env 100 140 then 101 ln -s $arch_path/arch-${arch}.env arch.env141 ln -s $arch_path/arch-${arch}.env ${install_dir}/arch.env 102 142 elif test -f $arch_default_path/arch-${arch}.env 103 143 then 104 ln -s $arch_default_path/arch-${arch}.env arch.env144 ln -s $arch_default_path/arch-${arch}.env ${install_dir}/arch.env 105 145 else 106 ln -s .void_file arch.env146 ln -s .void_file ${install_dir}/arch.env 107 147 fi 108 source arch.env109 source arch.path148 source ${install_dir}/arch.env 149 source ${install_dir}/arch.path 110 150 else 111 151 echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" … … 170 210 fi 171 211 212 # Setting path for boost 213 if [[ "$use_extern_boost" == "true" ]] 214 then 215 rm -r $PWD/extern/boost 216 ln -s $PWD/.void_dir $PWD/extern/boost 217 else 218 export BOOST_INCDIR="-I${PWD}/extern/boost" 219 export BOOST_LIBDIR="" 220 export BOOST_LIB="" 221 fi 222 223 # Setting path for blitz 224 if [[ "$use_extern_blitz" == "true" ]] 225 then 226 rm -r $PWD/extern/blitz 227 ln -s $PWD/.void_dir $PWD/extern/blitz 228 else 229 echo "src::blitz $PWD/extern/blitz/src" >> ${PWD}/bld_dir.cfg 230 export BLITZ_INCDIR="-I${PWD}/extern/blitz" 231 export BLITZ_LIBDIR="" 232 export BLITZ_LIB="" 233 fi 234 235 172 236 if [[ "$use_memtrack" == "true" ]] 173 237 then 174 238 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 175 if [[ "$memtrack" == "light" ]] 176 then 177 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 239 240 if [[ "$memtrack" == "light" ]] 241 then 242 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 178 243 elif [[ "$memtrack" == "FULL" ]] 179 244 then … … 186 251 fi 187 252 188 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR "189 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR "253 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR" 254 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR $BLITZ_INCDIR" 190 255 191 256 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB" 192 257 193 rm -f config.fcm194 echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> config.fcm195 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> config.fcm196 echo "%CPP_KEY $XIOS_CPPKEY" >> config.fcm197 198 echo "%CBASE_INC $XIOS_CINCDIR" >> config.fcm199 echo "%FBASE_INC $XIOS_FINCDIR" >> config.fcm200 echo "%ARCH_LD $XIOS_LIB" >> config.fcm258 rm -f ${install_dir}/config.fcm 259 echo "%COMPIL_CFLAGS $COMPIL_CFLAGS" >> ${install_dir}/config.fcm 260 echo "%COMPIL_FFLAGS $COMPIL_FFLAGS" >> ${install_dir}/config.fcm 261 echo "%CPP_KEY $XIOS_CPPKEY" >> ${install_dir}/config.fcm 262 263 echo "%CBASE_INC $XIOS_CINCDIR" >> ${install_dir}/config.fcm 264 echo "%FBASE_INC $XIOS_FINCDIR" >> ${install_dir}/config.fcm 265 echo "%ARCH_LD $XIOS_LIB" >> ${install_dir}/config.fcm 201 266 202 267 echo "=> Using "$compil_mode" mode for compiling under architecture \""$arch"\" !"
Note: See TracChangeset
for help on using the changeset viewer.