Changeset 1450
- Timestamp:
- 03/08/18 17:30:28 (7 years ago)
- Location:
- XIOS
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
XIOS/dev/XIOS_DEV_CMIP6/make_xios
r1449 r1450 10 10 netcdf_lib="netcdf4_par" 11 11 compil_mode="prod" 12 12 arch_path="arch" 13 arch_default_path="arch" 14 arch_defined="FALSE" 15 arch_path_defined="FALSE" 13 16 14 17 # Traitement de la ligne de commande … … 26 29 echo " [--avail] : to know available target architectures " 27 30 echo " [--full] : to generate dependencies and recompile from scratch" 28 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler" 31 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"i 29 32 echo " [--use_extern_boost : to use external boost library" 30 33 echo " [--doc] : to generate Doxygen documentation (not available yet)" … … 38 41 "--dev") compil_mode="dev" ; shift ;; 39 42 "--debug") compil_mode="debug" ; shift ;; 40 "--arch") arch=$2 ; shift ; shift ;; 43 "--arch") arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 44 "--arch_path") arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 41 45 "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 42 46 "--full") compil_full="true" ; shift ;; … … 46 50 "--job") job=$2 ; shift ; shift ;; 47 51 "--netcdf_lib") netcdf_lib=$2 ; shift ; shift ;; 48 "--memtrack") use_memtrack="true"; shift ;;52 "--memtrack") use_memtrack="true" memtrack=$2 ; shift ; shift ;; 49 53 *) code="$1" ; shift ;; 50 54 esac … … 74 78 mkdir .void_dir 75 79 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 80 if [[ "$arch_defined" == "TRUE" ]] 81 then 82 rm -f arch.path 83 rm -f arch.fcm 84 rm -f arch.env 85 86 if test -f $arch_path/arch-${arch}.path 87 then 88 ln -s $arch_path/arch-${arch}.path arch.path 89 elif test -f $arch_default_path/arch-${arch}.path 90 then 91 ln -s $arch_default_path/arch-${arch}.path arch.path 92 fi 93 94 if test -f $arch_path/arch-${arch}.fcm 95 then 96 ln -s $arch_path/arch-${arch}.fcm arch.fcm 97 elif test -f $arch_default_path/arch-${arch}.fcm 98 then 99 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 100 fi 101 102 if test -f $arch_path/arch-${arch}.env 103 then 104 ln -s $arch_path/arch-${arch}.env arch.env 105 elif test -f $arch_default_path/arch-${arch}.env 106 then 107 ln -s $arch_default_path/arch-${arch}.env arch.env 93 108 else 109 ln -s .void_file arch.env 110 fi 111 source arch.env 112 source arch.path 113 else 94 114 echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" 95 115 exit 1 … … 151 171 XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR" 152 172 XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB" 153 fi 173 fi 154 174 155 175 # Setting path for boost … … 158 178 ln -s $PWD/.void_dir $PWD/extern/boost 159 179 else 160 ln -s $PWD/extern/boost $PWD/extern/boost161 180 export BOOST_INCDIR="-I${PWD}/extern/boost" 162 181 export BOOST_LIBDIR="" … … 164 183 fi 165 184 166 167 185 if [[ "$use_memtrack" == "true" ]] 168 186 then 169 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"170 187 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 188 189 if [[ "$memtrack" == "light" ]] 190 then 191 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 192 elif [[ "$memtrack" == "FULL" ]] 193 then 194 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 195 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 196 else 197 echo "Bad choice for --memtrack argument : choose between 'light','full'" 198 exit 199 fi 171 200 fi 172 201 173 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR"174 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR"202 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR" 203 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR" 175 204 176 205 XIOS_LIB="$XIOS_LIB $NETCDF_LIBDIR $HDF5_LIBDIR $MPI_LIBDIR $NETCDF_LIB $HDF5_LIB $MPI_LIB" -
XIOS/trunk/make_xios
r1448 r1450 10 10 netcdf_lib="netcdf4_par" 11 11 compil_mode="prod" 12 12 arch_path="arch" 13 arch_default_path="arch" 14 arch_defined="FALSE" 15 arch_path_defined="FALSE" 13 16 14 17 # Traitement de la ligne de commande … … 26 29 echo " [--avail] : to know available target architectures " 27 30 echo " [--full] : to generate dependencies and recompile from scratch" 28 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler" 31 echo " [--use_oasis 'oasis3' 'oasis3_mct' : default oasis3_mct] : to use Oasis coupler"i 29 32 echo " [--use_extern_boost : to use external boost library" 30 33 echo " [--doc] : to generate Doxygen documentation (not available yet)" … … 38 41 "--dev") compil_mode="dev" ; shift ;; 39 42 "--debug") compil_mode="debug" ; shift ;; 40 "--arch") arch=$2 ; shift ; shift ;; 43 "--arch") arch=$2 ; arch_defined="TRUE"; shift ; shift ;; 44 "--arch_path") arch_path=$2 ; arch_path_defined="TRUE"; shift ; shift ;; 41 45 "--avail") ls arch/*.fcm | cut -d"-" -f2 | cut -d"." -f1 ; exit ;; 42 46 "--full") compil_full="true" ; shift ;; … … 46 50 "--job") job=$2 ; shift ; shift ;; 47 51 "--netcdf_lib") netcdf_lib=$2 ; shift ; shift ;; 48 "--memtrack") use_memtrack="true"; shift ;;52 "--memtrack") use_memtrack="true" memtrack=$2 ; shift ; shift ;; 49 53 *) code="$1" ; shift ;; 50 54 esac … … 74 78 mkdir .void_dir 75 79 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 80 if [[ "$arch_defined" == "TRUE" ]] 81 then 82 rm -f arch.path 83 rm -f arch.fcm 84 rm -f arch.env 85 86 if test -f $arch_path/arch-${arch}.path 87 then 88 ln -s $arch_path/arch-${arch}.path arch.path 89 elif test -f $arch_default_path/arch-${arch}.path 90 then 91 ln -s $arch_default_path/arch-${arch}.path arch.path 92 fi 93 94 if test -f $arch_path/arch-${arch}.fcm 95 then 96 ln -s $arch_path/arch-${arch}.fcm arch.fcm 97 elif test -f $arch_default_path/arch-${arch}.fcm 98 then 99 ln -s $arch_default_path/arch-${arch}.fcm arch.fcm 100 fi 101 102 if test -f $arch_path/arch-${arch}.env 103 then 104 ln -s $arch_path/arch-${arch}.env arch.env 105 elif test -f $arch_default_path/arch-${arch}.env 106 then 107 ln -s $arch_default_path/arch-${arch}.env arch.env 93 108 else 109 ln -s .void_file arch.env 110 fi 111 source arch.env 112 source arch.path 113 else 94 114 echo "Please choose a target achitecture --> list all available architecture using make_xios --avail!" 95 115 exit 1 … … 151 171 XIOS_FINCDIR="$OASIS_INCDIR $XIOS_FINCDIR" 152 172 XIOS_LIB="$OASIS_LIBDIR $OASIS_LIB $XIOS_LIB" 153 fi 173 fi 154 174 155 175 # Setting path for boost … … 158 178 ln -s $PWD/.void_dir $PWD/extern/boost 159 179 else 160 ln -s $PWD/extern/boost $PWD/extern/boost161 180 export BOOST_INCDIR="-I${PWD}/extern/boost" 162 181 export BOOST_LIBDIR="" … … 164 183 fi 165 184 166 167 185 if [[ "$use_memtrack" == "true" ]] 168 186 then 169 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB"170 187 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK" 188 189 if [[ "$memtrack" == "light" ]] 190 then 191 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_LIGHT" 192 elif [[ "$memtrack" == "FULL" ]] 193 then 194 XIOS_LIB="$ADDR2LINE_LIBDIR $ADDR2LINE_LIB $XIOS_LIB" 195 XIOS_CPPKEY="$XIOS_CPPKEY XIOS_MEMTRACK_FULL" 196 else 197 echo "Bad choice for --memtrack argument : choose between 'light','full'" 198 exit 199 fi 171 200 fi 172 201 173 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR $BOOST_INCDIR"174 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR $BOOST_INCDIR"202 XIOS_CINCDIR="$NETCDF_INCDIR $HDF5_INCDIR $MPI_INCDIR" 203 XIOS_FINCDIR="$NETCDF_INCDIR $XIOS_FINCDIR $MPI_INCDIR" 175 204 176 205 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.