@@ -156,17 +156,22 @@ else
156156 # set EESSI_ACCELERATOR_TARGET and the if-condition later in this script which checks if EESSI_ACCELERATOR_TARGET
157157 # is equal to EESSI_ACCELERATOR_TARGET_OVERRIDE will fail
158158 # See https://github.com/EESSI/software-layer-scripts/pull/59#issuecomment-3173593882
159- if [ -z $EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE ]; then
160- mkdir -p ${EESSI_PREFIX} /software/${EESSI_OS_TYPE} /${EESSI_SOFTWARE_SUBDIR_OVERRIDE} /${EESSI_ACCELERATOR_TARGET_OVERRIDE} /modules/all
161- else
162- # At runtime, one might want to use a different CPU subdir for a given accelerator. E.g. one could use
163- # a zen2 CPU subdir on a zen4 node if the required GPU software isn't available in the zen4 tree.
164- # At build time, this doesn't make a lot of sense: we'd probably build in a CPU prefix that is different
165- # from what the code will be optimized for, and we wouldn't want that
166- msg=" When building the software subdirectory for the CPU should almost certainly be that of the host."
167- msg=" $msg If you think this is incorrect, please implement behaviour that makes sense in "
168- msg=" $msg EESSI-software-installation.sh, essentially replacing this error."
169- fatal_error " $msg "
159+ if [ -n $EESSI_ACCELERATOR_TARGET_OVERRIDE ]; then
160+ # Note that ${EESSI_PREFIX}/software/${EESSI_OS_TYPE}/${EESSI_SOFTWARE_SUBDIR_OVERRIDE}/${EESSI_ACCELERATOR_TARGET_OVERRIDE}/modules/all
161+ # is only the correct path if EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE is not set
162+ if [ -z $EESSI_ACCEL_SOFTWARE_SUBDIR_OVERRIDE ]; then
163+ mkdir -p ${EESSI_PREFIX} /software/${EESSI_OS_TYPE} /${EESSI_SOFTWARE_SUBDIR_OVERRIDE} /${EESSI_ACCELERATOR_TARGET_OVERRIDE} /modules/all
164+ else
165+ # At runtime, one might want to use a different CPU subdir for a given accelerator. E.g. one could use
166+ # a zen2 CPU subdir on a zen4 node if the required GPU software isn't available in the zen4 tree.
167+ # At build time, this doesn't make a lot of sense: we'd probably build in a CPU prefix that is different
168+ # from what the code will be optimized for, and we wouldn't want that
169+ # So this message _should_ never be printed...
170+ msg=" When building the software subdirectory for the CPU should almost certainly be that of the host."
171+ msg=" $msg If you think this is incorrect, please implement behaviour that makes sense in "
172+ msg=" $msg EESSI-software-installation.sh, essentially replacing this error."
173+ fatal_error " $msg "
174+ fi
170175 fi
171176 )
172177fi
0 commit comments