diff --git a/powr/dummychain/coli_test b/powr/dummychain/coli_test index dd8153b..144b303 100755 --- a/powr/dummychain/coli_test +++ b/powr/dummychain/coli_test @@ -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 diff --git a/powr/dummychain/wrstart_wrh_gen b/powr/dummychain/wrstart_wrh_gen index d2a2bc6..6ba6507 100755 --- a/powr/dummychain/wrstart_wrh_gen +++ b/powr/dummychain/wrstart_wrh_gen @@ -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 @@ -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 @@ -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 ---------------------------- diff --git a/powr/dummychain/wruniq_wrh_gen b/powr/dummychain/wruniq_wrh_gen index 3beec8c..7ac6a1e 100755 --- a/powr/dummychain/wruniq_wrh_gen +++ b/powr/dummychain/wruniq_wrh_gen @@ -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 @@ -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 @@ -147,12 +153,16 @@ 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 @@ -160,6 +170,15 @@ if [ "$dbx" == 'true' ] ; then 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: diff --git a/powr/proc.dir/submit.com b/powr/proc.dir/submit.com index e1309f3..5e2208c 100755 --- a/powr/proc.dir/submit.com +++ b/powr/proc.dir/submit.com @@ -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 ################################################### diff --git a/test/test_wrstart.py b/test/test_wrstart.py index 3514350..9630013 100644 --- a/test/test_wrstart.py +++ b/test/test_wrstart.py @@ -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", @@ -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")