Changeset 1448 for XIOS/trunk/make_xios
- Timestamp:
- 03/08/18 16:46:40 (6 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/trunk/make_xios
r1137 r1448 5 5 use_oasis="false" 6 6 oasis="oasis3_mct" 7 use_extern_boost="false" 7 8 use_memtrack="false" 8 9 job="1" 9 10 netcdf_lib="netcdf4_par" 10 11 compil_mode="prod" 11 arch_path="arch" 12 arch_default_path="arch" 13 arch_defined="FALSE" 14 arch_path_defined="FALSE" 12 15 13 16 14 # Traitement de la ligne de commande … … 29 27 echo " [--full] : to generate dependencies and recompile from scratch" 30 28 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler" 29 echo " [--use_extern_boost : to use external boost library" 31 30 echo " [--doc] : to generate Doxygen documentation (not available yet)" 32 31 echo " [--job ntasks] : to use parallel compilation with ntasks" … … 39 38 "--dev") compil_mode="dev" ; shift ;; 40 39 "--debug") compil_mode="debug" ; shift ;; 41 "--arch") arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 42 "--arch_path") arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 40 "--arch") arch=$2 ; shift ; shift ;; 43 41 "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 44 42 "--full") compil_full="true" ; shift ;; 45 43 "--use_oasis") use_oasis="true" oasis=$2 ; shift ; shift ;; 44 "--use_extern_boost") use_extern_boost="true" ; shift ;; 46 45 "--doc") doc="true" ; shift ;; 47 46 "--job") job=$2 ; shift ; shift ;; 48 47 "--netcdf_lib") netcdf_lib=$2 ; shift ; shift ;; 49 "--memtrack") use_memtrack="true" memtrack=$2 ; shift; shift ;;48 "--memtrack") use_memtrack="true" ; shift ;; 50 49 *) code="$1" ; shift ;; 51 50 esac … … 75 74 mkdir .void_dir 76 75 77 if [[ "$arch_defined" == "TRUE" ]] 78 then 79 rm -f arch.path 80 rm -f arch.fcm 81 rm -f arch.env 82 83 if test -f $arch_path/arch-${arch}.path 84 then 85 ln -s $arch_path/arch-${arch}.path arch.path 86 elif test -f $arch_default_path/arch-${arch}.path 87 then 88 ln -s $arch_default_path/arch-${arch}.path arch.path 89 fi 90 91 if test -f $arch_path/arch-${arch}.fcm 92 then 93 ln -s $arch_path/arch-${arch}.fcm arch.fcm 94 elif test -f $arch_default_path/arch-${arch}.fcm 95 then 96 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 97 fi 98 99 if test -f $arch_path/arch-${arch}.env 100 then 101 ln -s $arch_path/arch-${arch}.env arch.env 102 elif test -f $arch_default_path/arch-${arch}.env 103 then 104 ln -s $arch_default_path/arch-${arch}.env arch.env 76 if [[ !(-z $arch) ]] 77 then 78 rm -f $install_dir/arch.path 79 rm -f $install_dir/arch.fcm 80 rm -f $install_dir/arch.env 81 ln -s $install_dir/arch/arch-${arch}.path $install_dir/arch.path 82 ln -s $install_dir/arch/arch-${arch}.fcm $install_dir/arch.fcm 83 84 if test -f $install_dir/arch/arch-${arch}.env 85 then 86 ln -s $install_dir/arch/arch-${arch}.env arch.env 87 else 88 ln -s $install_dir/.void_file arch.env 89 fi 90 91 source $install_dir/arch.env 92 source $install_dir/arch.path 105 93 else 106 ln -s .void_file arch.env107 fi108 source arch.env109 source arch.path110 else111 94 echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" 112 95 exit 1 … … 168 151 XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR" 169 152 XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB" 153 fi 154 155 # Setting path for boost 156 if [[ "$use_extern_boost" == "true" ]] 157 then 158 ln -s $PWD/.void_dir $PWD/extern/boost 159 else 160 ln -s $PWD/extern/boost $PWD/extern/boost 161 export BOOST_INCDIR="-I${PWD}/extern/boost" 162 export BOOST_LIBDIR="" 163 export BOOST_LIB="" 164 fi 165 166 167 if [[ "$use_memtrack" == "true" ]] 168 then 169 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 170 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 170 171 fi 171 172 172 if [[ "$use_memtrack" == "true" ]] 173 then 174 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 175 176 if [[ "$memtrack" == "light" ]] 177 then 178 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 179 elif [[ "$memtrack" == "FULL" ]] 180 then 181 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 182 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 183 else 184 echo "Bad choice for --memtrack argument : choose between 'light','full'" 185 exit 186 fi 187 fi 188 189 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR" 190 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR" 173 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR" 174 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR" 191 175 192 176 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB"
Note: See TracChangeset
for help on using the changeset viewer.