You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
to my knowledge you can not determine from the INSTALL_DIR, which environment was used to compile the code. I would like to suggest to store the environment file in the install-directory during installation.
INSTALL_DIR can be set to include environment info, e.g. ${ROOT_DIR}/${INSTALL_DIR}=tsmp2_jurecadc_intel_stg2023.
Standardize the folder structure of ${ROOT_DIR} such that compiler info can be deduced from the path. The $EBROOT* shell variables, which are automatically set whenever a module is loaded, work this way.
Log the build process with tee:
INSTALL_DIR="/p/project/cslts/software/$STAGE/${SYSTEMNAME}/${MODEL_ID}"
BUILD_LOG="${INSTALL_DIR}/$(date +%Y.%m.%d_%H.%M).log"# Load environmentsource${TSMP2_DIR}/env/jsc.2023_Intel.sh |& tee ${BUILD_LOG}# Configure, build, and install
cmake -S ${TSMP2} -B ${BUILD_DIR} \
-DCMAKE_BUILD_TYPE="${BUILD_CONFIG}" \
-DOASIS_SRC=${OASIS_SRC} \
-DeCLM_SRC=${eCLM_SRC} \
-DICON_SRC=${ICON_SRC} \
-DCMAKE_INSTALL_PREFIX="$INSTALL_DIR" \
|& tee -a ${BUILD_LOG}
cmake --build ${BUILD_DIR}|& tee -a ${BUILD_LOG}
cmake --install ${BUILD_DIR}|& tee -a ${BUILD_LOG}
Modify the CMake scripts to automatically generate a tsmp2.settings file. [example]
I prefer the last option which is like what you've suggested @s-poll. Alternatively the other options could provide a quick way to store the environment information.
Hi all
to my knowledge you can not determine from the
INSTALL_DIR
, which environment was used to compile the code. I would like to suggest to store the environment file in the install-directory during installation.e.g.
Step 2
and that while
a copy of the environment file is done to the installation directory.
What are your thoughts? Are there any other/better solutions to know the environment, which was used for compilation?
Best
The text was updated successfully, but these errors were encountered: