Skip to content

Commit

Permalink
run wrstart with nonopt and opt
Browse files Browse the repository at this point in the history
  • Loading branch information
iulusoy committed Nov 15, 2023
1 parent 9236eea commit 3c135ed
Show file tree
Hide file tree
Showing 5 changed files with 57 additions and 17 deletions.
2 changes: 1 addition & 1 deletion powr/dummychain/coli_test
Original file line number Diff line number Diff line change
Expand Up @@ -181,7 +181,7 @@ fi
# Debugger dbx -- provide here the non-optimized exe file to be debugged!
if [ "$dbx" == 'true' ] ; then
echo '-------- Debugger dbx is on'
# cp $DBXPATH/steal.exe "${kn}"_steal.exe
cp $DBXPATH/steal.exe "${kn}"_steal.exe
fi

# use nonoptimized binaries for computing
Expand Down
25 changes: 21 additions & 4 deletions powr/dummychain/wrstart_wrh_gen
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,7 @@ path=$POWR_WORK/wrdata$kn
# and path where the non-optimized version has been linked (for debugger!)
if [[ $HOSTTYPE == *x86_64* ]] ; then
exepath=${POWREXEPATH:-$POWR_WORK/exe.dir}
exedevpath=${POWREXEDEBUGPATH:-$POWR_WORK/exe_dev.dir}
if [ _$POWR_INSTTYPE == _local ] ; then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${POWR_WORK}/intellibs
elif [ _$POWR_INSTTYPE == _potsdam ] ; then
Expand Down Expand Up @@ -73,15 +74,20 @@ fi
wait=false
vstop=false
dbx=false
nonopt=false
if [ $# -eq 2 ] ; then
if [ "_$2" == '_dbx' ] ; then
dbx=true
elif [ "_$2" == '_nonopt' ] ; then
nonopt=true
echo "Job wruniq${kn} in DEBUG NONOPT mode !!!!!"
else
echo "$0: Abort: unknown option: $2" >> $POWR_WORK/output/wrstart$kn.cpr
exit
fi
else
dbx=false
nonopt=false
fi

mkdir -p $path1
Expand Down Expand Up @@ -168,15 +174,26 @@ chmod u+w $pathscratch/*
echo '... all files have been fetched' >> $POWR_WORK/output/wrstart"$kn".cpr

# exe files
cp $exepath/wrstart.exe.opt "$kn"_wrstart.exe
cp $exepath/steal.exe.opt "$kn"_steal.exe
cp $exepath/adapter.exe.opt "$kn"_adapter.exe

if [ "$dbx" == 'false' ] ; then
if [ "$nonopt" == 'false' ] ; then
cp $exepath/wrstart.exe.opt "$kn"_wrstart.exe
cp $exepath/steal.exe.opt "$kn"_steal.exe
cp $exepath/adapter.exe.opt "$kn"_adapter.exe
fi
fi
# Debugger dbx -- provide here the non-optimized exe file to be debugged!
if [ "$dbx" == 'true' ] ; then
echo '-------- Debugger dbx is on'
cp $DBXPATH/wrstart.exe "$kn"_wrstart.exe
fi
# use nonoptimized binaries for computing
if [ "$nonopt" == 'true' ] ; then
echo '-------- Debugger nonopt is on'
cp ${exedevpath}/wrcont.exe "${kn}"_wrcont.exe
cp ${exedevpath}/como.exe "${kn}"_como.exe
cp ${exedevpath}/coli.exe "${kn}"_coli.exe
cp ${exedevpath}/steal.exe "${kn}"_steal.exe
fi

#
# ------- EXECUTION OF PROGRAMS ----------------------------
Expand Down
31 changes: 25 additions & 6 deletions powr/dummychain/wruniq_wrh_gen
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ lom=${lom:-$POWR_WORK/wrjobs/list-of-machines}
# and path where the non-optimized version has been linked (for debugger!)
if [[ $HOSTTYPE == *x86_64* ]] ; then
exepath=${POWREXEPATH:-$POWR_WORK/exe.dir}
exedevpath=${POWREXEDEBUGPATH:-$POWR_WORK/exe_dev.dir}
if [ _$POWR_INSTTYPE == _local ] ; then
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:${POWR_WORK}/intellibs
elif [ _$POWR_INSTTYPE == _potsdam -o _$POWR_INSTTYPE == _niscluster ] ; then
Expand Down Expand Up @@ -71,12 +72,17 @@ fi
#------------- end of settings ----------------------------

dbx=false
nonopt=false
if [ $# -eq 2 ] ; then
if [ "_$2" == '_dbx' ] ; then
dbx=true
echo "Job wruniq${kn} in DEBUG mode !!!!!"
elif [ "_$2" == '_nonopt' ] ; then
nonopt=true
echo "Job wruniq${kn} in DEBUG NONOPT mode !!!!!"
else
dbx=false
nonopt=false
fi
fi

Expand Down Expand Up @@ -147,19 +153,32 @@ chmod u+w ${pathscratch}/*
echo '... all files have been fetched' >> $POWR_WORK/output/wruniq"${kn}".cpr

# optimized exe files
cp ${exepath}/wrcont.exe.opt "${kn}"_wrcont.exe
cp ${exepath}/como.exe.opt "${kn}"_como.exe
cp ${exepath}/coli.exe.opt "${kn}"_coli.exe
cp ${exepath}/steal.exe.opt "${kn}"_steal.exe
cp ${exepath}/extrap.exe.opt "${kn}"_extrap.exe
cp ${exepath}/modify.exe.opt "${kn}"_modify.exe
if [ "$dbx" == 'false' ] ; then
if [ "$nonopt" == 'false' ] ; then
cp ${exepath}/wrcont.exe.opt "${kn}"_wrcont.exe
cp ${exepath}/como.exe.opt "${kn}"_como.exe
cp ${exepath}/coli.exe.opt "${kn}"_coli.exe
cp ${exepath}/steal.exe.opt "${kn}"_steal.exe
cp ${exepath}/extrap.exe.opt "${kn}"_extrap.exe
cp ${exepath}/modify.exe.opt "${kn}"_modify.exe
fi
fi

# Debugger dbx -- provide here the non-optimized exe file to be debugged!
if [ "$dbx" == 'true' ] ; then
echo '-------- Debugger dbx is on'
cp ${DBXPATH}/coli.exe "${kn}"_coli.exe
# cp $DBXPATH/steal.exe "${kn}"_steal.exe
fi
# use nonoptimized binaries for computing
if [ "$nonopt" == 'true' ] ; then
echo '-------- Debugger nonopt is on'
cp ${exedevpath}/wrcont.exe "${kn}"_wrcont.exe
cp ${exedevpath}/como.exe "${kn}"_como.exe
cp ${exedevpath}/coli.exe "${kn}"_coli.exe
cp ${exedevpath}/steal.exe "${kn}"_steal.exe
fi


: ------- CONTENT OF FILE G1 = NAME OF NEXT JOB ---------
# SAFETY CHECK OF ALLOWED CONTENT:
Expand Down
4 changes: 2 additions & 2 deletions powr/proc.dir/submit.com
Original file line number Diff line number Diff line change
Expand Up @@ -51,8 +51,8 @@ if [ $# -ge 2 ]; then
$job dbx
echo $1 with dbx gestartet >> $logfile
exit
elif [ $2 = 'nonopt']
echo 'submit.com: $1 with nonopt exe files'
elif [ $2 = 'nonopt' ]; then
echo 'submit.com: with nonopt exe files'
# ---- to-machine ------------------------------
elif [ `echo $2 | cut -c1-3` = 'to-' ]; then
###################################################
Expand Down
12 changes: 8 additions & 4 deletions test/test_wrstart.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,15 @@
# import numpy as np


@pytest.fixture(scope="module")
def run_wrstart(get_chain):
@pytest.fixture()
def run_wrstart(get_chain, submit_options):
if submit_options is None:
submit_options = ""
submit_path = "${POWR_WORK}/proc.dir/submit.com wrstart1"
submit_command = submit_path + submit_options
# run wrstart
wrstart_command = "${POWR_WORK}/proc.dir/submit.com wrstart1"
temp = subprocess.run(
wrstart_command,
submit_command,
shell=True,
check=True,
executable="/bin/bash",
Expand All @@ -28,5 +31,6 @@ def run_wrstart(get_chain):
return "Cleaned powr tmp data"


@pytest.mark.parametrize("submit_options", ["", " nonopt"])
def test_run_wrstart(run_wrstart):
print("done")

0 comments on commit 3c135ed

Please sign in to comment.