Changeset 1497
- Timestamp:
- 05/03/18 14:05:28 (6 years ago)
- Location:
- XIOS/dev/XIOS_DEV_CMIP6
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/bld.cfg
r1449 r1497 8 8 # ------------------------------------------------------------------------------ 9 9 10 inc arch.fcm 11 inc config.fcm10 # Specifying the build directory 11 inc bld_dir.cfg 12 12 13 13 %CFLAGS %BASE_CFLAGS %COMPIL_CFLAGS … … 15 15 %LD_FLAGS %ARCH_LD %BASE_LD 16 16 17 18 dest::root $PWD19 20 17 bld::infile_ext::cpp C::SOURCE 21 18 bld::infile_ext::conf CPP::INCLUDE 22 19 bld::infile_ext::hpp CPP::INCLUDE 23 20 21 # IMPORTANT: as the build directory may not necessarily coincide with the source directory, 22 # each source subfolder should be declared individually 23 search_src false 24 src::xios $PWD/src 25 src::xios::config $PWD/src/config 26 src::xios::date $PWD/src/date 27 src::xios::filter $PWD/src/filter 28 src::xios::functor $PWD/src/functor 29 src::xios::interface::c $PWD/src/interface/c 30 src::xios::interface::c_attr $PWD/src/interface/c_attr 31 src::xios::interface::fortran $PWD/src/interface/fortran 32 src::xios::interface::fortran_attr $PWD/src/interface/fortran_attr 33 src::xios::io $PWD/src/io 34 src::xios::node $PWD/src/node 35 src::xios::parse_expr $PWD/src/parse_expr 36 src::xios::test $PWD/src/test 37 src::xios::transformation $PWD/src/transformation 38 src::xios::transformation::Functions $PWD/src/transformation/Functions 39 src::xios::type $PWD/src/type 24 40 25 search_src true 26 src::zzz . 41 27 42 #src::date $PWD/extern/boost/src/date_time 28 43 src::blitz $PWD/extern/blitz/src … … 60 75 # Pre-process code before analysing dependencies 61 76 bld::pp false 62 bld::pp:: interface/fortran true63 bld::pp:: interface/fortran_attr true77 bld::pp::xios::interface::fortran true 78 bld::pp::xios::interface::fortran_attr true 64 79 bld::excl_dep use::mod_prism_get_comm 65 80 bld::excl_dep use::mod_prism_get_localcomm_proto -
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.