Skip to content

Commit

Permalink
Merge pull request #119 from vincentcasseau/main
Browse files Browse the repository at this point in the history
KCore: edits to accommodate prods ending in _DBG (DEBUG) - for ld & juno
  • Loading branch information
vincentcasseau authored Jul 31, 2024
2 parents b711799 + 03a1408 commit 1738c93
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 6 deletions.
6 changes: 3 additions & 3 deletions Cassiopee/Converter/Converter/kpython
Original file line number Diff line number Diff line change
Expand Up @@ -148,7 +148,7 @@ else
mpirun $ARGS -n $NPROCS -genv OMP_NUM_THREADS=$NTHREADS -l $PYTHONEXE $SCRIPT
set +x
[ $? != 0 ] && exit 1;
elif [ "$ELSAPROD" = 'ld' ] || [ "$ELSAPROD" = 'ld_i8' ] # ld
elif [ "$ELSAPROD" = 'ld' ] || [ "$ELSAPROD" = 'ld_i8' ] || [ "$ELSAPROD" = 'ld_DBG' ] || [ "$ELSAPROD" = 'ld_i8_DBG' ] # ld
then
# openMpi
if [ $SANITIZE = '1' ]
Expand Down Expand Up @@ -197,14 +197,14 @@ else
mpirun $ARGS -n $NPROCS -genv OMP_NUM_THREADS=$NTHREADS -l -ordered-output $PYTHONEXE $SCRIPT
set +x
[ $? != 0 ] && exit 1;
elif [ "$ELSAPROD" = 'juno' ] || [ "$ELSAPROD" = 'juno_i8' ] # juno
elif [ "$ELSAPROD" = 'juno' ] || [ "$ELSAPROD" = 'juno_i8' ] || [ "$ELSAPROD" = 'juno_DBG' ] || [ "$ELSAPROD" = 'juno_i8_DBG' ] # juno
then
set -x
# intelMpi
mpirun $ARGS -n $NPROCS -genv OMP_NUM_THREADS=$NTHREADS -l -ordered-output $PYTHONEXE $SCRIPT
set +x
[ $? != 0 ] && exit 1;
elif [ "$ELSAPROD" = 'juno_gcc' ] || [ "$ELSAPROD" = 'juno_gcc_i8' ] # juno gcc
elif [ "$ELSAPROD" = 'juno_gcc' ] || [ "$ELSAPROD" = 'juno_gcc_i8' ] || [ "$ELSAPROD" = 'juno_gcc_DBG' ] || [ "$ELSAPROD" = 'juno_gcc_i8_DBG' ] # juno gcc
then
# openMpi
if [ $SANITIZE = '1' ]
Expand Down
5 changes: 4 additions & 1 deletion Cassiopee/KCore/Dist.py
Original file line number Diff line number Diff line change
Expand Up @@ -83,9 +83,12 @@ def getenv(name):
def getDataFolderName(name='Data'):
elsaprod = os.getenv("ELSAPROD")
if elsaprod is not None:
if not elsaprod.endswith('_i8') and EDOUBLEINT:
if not '_i8' in elsaprod and EDOUBLEINT:
print("Warning: ELSAPROD {} compiled in i8 but recommended suffix "
"'_i8' is missing".format(elsaprod))
if not elsaprod.endswith('_DBG') and DEBUG:
print("Warning: ELSAPROD {} compiled in DEBUG but recommended "
"suffix '_DBG' is missing".format(elsaprod))
name += '_' + elsaprod
else:
name += '_xx'
Expand Down
1 change: 1 addition & 0 deletions Cassiopee/KCore/config.py
Original file line number Diff line number Diff line change
Expand Up @@ -29,6 +29,7 @@
key = ''
# prod est tout d'abord cherche dans le dictionnaire
if prod is not None:
if prod.endswith('_DBG'): prod = prod[:-4]
if prod.endswith('_i8'): prod = prod[:-3]
for i in dict:
if re.compile(i).search(prod) is not None:
Expand Down
9 changes: 7 additions & 2 deletions Cassiopee/KCore/switchIntSize.py
Original file line number Diff line number Diff line change
Expand Up @@ -77,9 +77,14 @@ def check_elsaprod(intSize):
elsaprod = os.getenv("ELSAPROD")
if elsaprod is not None:
if intSize == 4 and "_i8" in elsaprod:
print("Remove '_i8' suffix from $ELSAPROD: {}".format(elsaprod[:-3]))
print("Remove '_i8' suffix from $ELSAPROD: {}".format(
elsaprod.replace('_i8', '')))
elif intSize == 8 and "_i8" not in elsaprod:
print("Add '_i8' suffix to $ELSAPROD: {}_i8".format(elsaprod))
if elsaprod.endswith('_DBG'):
print("Add '_i8_DBG' suffix to $ELSAPROD: {}_i8_DBG".format(
elsaprod[:-4]))
else:
print("Add '_i8' suffix to $ELSAPROD: {}_i8".format(elsaprod))
return

if __name__ == '__main__':
Expand Down

0 comments on commit 1738c93

Please sign in to comment.