From a9aa222961193c7c0140c4446556880e40db7716 Mon Sep 17 00:00:00 2001 From: Martin Diehl Date: Sat, 10 Sep 2022 12:40:39 +0200 Subject: [PATCH] ignore whitespaces in diff use diff -ub to get nice patch --- .../2022.1/Marc_tools/run_damask_hmp.patch | 275 +++------------- .../2022.1/Marc_tools/run_damask_lmp.patch | 275 +++------------- .../2022.1/Marc_tools/run_damask_mp.patch | 295 +++--------------- 3 files changed, 105 insertions(+), 740 deletions(-) diff --git a/install/MarcMentat/2022.1/Marc_tools/run_damask_hmp.patch b/install/MarcMentat/2022.1/Marc_tools/run_damask_hmp.patch index e3a364e00..7a0fce208 100644 --- a/install/MarcMentat/2022.1/Marc_tools/run_damask_hmp.patch +++ b/install/MarcMentat/2022.1/Marc_tools/run_damask_hmp.patch @@ -1,6 +1,6 @@ ---- -+++ -@@ -302,7 +302,23 @@ fi +--- run_damask_hmp.orig 2022-09-10 12:21:10.390110879 +0200 ++++ run_damask_hmp 2022-09-10 12:32:42.804232871 +0200 +@@ -302,7 +302,23 @@ . "$DIR/getarch" @@ -24,7 +24,7 @@ # # -@@ -405,7 +421,7 @@ sid= +@@ -405,7 +421,7 @@ did= vid= user= @@ -33,16 +33,7 @@ objs= qid=background cpu= -@@ -573,7 +589,7 @@ do - justlist=yes - ;; - -fe* | -FE*) -- feature=$value -+ feature=$value - - ;; - -pr* | -PR*) -@@ -676,50 +692,19 @@ do +@@ -676,50 +692,19 @@ esac ;; -u* | -U*) @@ -99,39 +90,7 @@ ;; -obj | -OBJ) objs="$value" -@@ -739,19 +724,19 @@ do - ;; - esac - ;; -- -dl | -DL) -- case $value in -- y* | Y*) -- deletelog=yes -- ;; -- n* | N*) -- deletelog=no -- ;; -- *) -- ;; -- esac -+ -dl | -DL) -+ case $value in -+ y* | Y*) -+ deletelog=yes -+ ;; -+ n* | N*) -+ deletelog=no -+ ;; -+ *) -+ ;; -+ esac - -- ;; -+ ;; - -at | -AT) - att=$value - ;; -@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible +@@ -1207,12 +1192,12 @@ fi fi fi @@ -147,16 +106,7 @@ fi fi if test "$objs" -@@ -1386,7 +1371,7 @@ else - else - error="$error - job id required" -- fi -+fi - fi - - case $qid in -@@ -1531,7 +1516,7 @@ Program name : $prog +@@ -1531,7 +1516,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -165,7 +115,7 @@ User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1564,7 +1549,7 @@ Program name : $prog +@@ -1564,7 +1549,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -174,7 +124,7 @@ User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT" +@@ -1687,7 +1672,7 @@ ;; esac fi @@ -183,7 +133,7 @@ read value if test "$value" then -@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT" +@@ -1696,50 +1681,19 @@ user= ;; *) @@ -209,16 +159,13 @@ - fi + user=$value case $user in -- \/*) -- ;; -- *) -+ \/*) -+ ;; -+ *) + \/*) + ;; + *) user=`pwd`/$user - usersubname=`pwd`/$usersubname -- ;; -- esac + ;; + esac - if test ! -f $usersubname - then - if test -f $usersubname.f @@ -235,8 +182,6 @@ - usersubname=$usersubname.F90 - fi - fi -+ ;; -+ esac + usernoext=$user + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` @@ -245,7 +190,7 @@ ;; esac fi -@@ -2274,11 +2228,12 @@ fi +@@ -2274,11 +2228,12 @@ # # user subroutine used # @@ -260,7 +205,7 @@ case $program in \/* | \.\/*) bd= -@@ -2391,7 +2346,7 @@ fi +@@ -2391,7 +2346,7 @@ fi if test "$user" then @@ -269,7 +214,7 @@ usersub=1 fi export execpath -@@ -3274,44 +3229,27 @@ then +@@ -3274,44 +3229,27 @@ echo if test "$user" then @@ -319,21 +264,15 @@ fi -@@ -3331,10 +3269,11 @@ then +@@ -3331,6 +3269,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -3344,6 +3283,9 @@ else +@@ -3344,6 +3283,9 @@ prgsav=yes fi /bin/rm $userobj 2>/dev/null @@ -343,7 +282,7 @@ # # run marc -@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then +@@ -3390,7 +3332,7 @@ fi else if test $cpdll = yes; then @@ -352,7 +291,7 @@ /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes -@@ -3556,7 +3498,7 @@ then +@@ -3556,7 +3498,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -361,7 +300,7 @@ fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3569,21 +3511,21 @@ then +@@ -3569,21 +3511,21 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -386,7 +325,7 @@ fi fi fi -@@ -3593,39 +3535,27 @@ then +@@ -3593,39 +3535,27 @@ if test "$userhost" then echo @@ -432,21 +371,15 @@ fi # if test $user -@@ -3645,10 +3575,11 @@ then +@@ -3645,6 +3575,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" -@@ -3686,6 +3617,9 @@ else # if test $link +@@ -3686,6 +3617,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -456,69 +389,7 @@ # # run marc -@@ -3744,42 +3678,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -3779,7 +3713,7 @@ else #dllrun >0 if test $cpdll = yes; then @@ -527,7 +398,7 @@ /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes;then -@@ -3904,7 +3838,7 @@ then +@@ -3904,7 +3838,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -536,7 +407,7 @@ fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3917,20 +3851,20 @@ then +@@ -3917,20 +3851,20 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -560,7 +431,7 @@ fi fi fi -@@ -3940,37 +3874,25 @@ then +@@ -3940,37 +3874,25 @@ if test "$userhost" then echo @@ -604,7 +475,7 @@ fi # if test $user -@@ -3990,10 +3912,11 @@ then +@@ -3990,6 +3912,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ @@ -612,12 +483,7 @@ $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -4030,7 +3953,9 @@ else # if test $link +@@ -4030,7 +3953,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -628,78 +494,7 @@ # done if no job id given if test -z "$jid" then -@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then - RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc " - fi - --$RUN_JOB -+ $RUN_JOB - - if test $nprocd -gt 1 - then -@@ -4114,42 +4039,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -4149,7 +4074,7 @@ else #dllrun >0 if test $cpdll = yes; then diff --git a/install/MarcMentat/2022.1/Marc_tools/run_damask_lmp.patch b/install/MarcMentat/2022.1/Marc_tools/run_damask_lmp.patch index a5989bfca..ec2bccb77 100644 --- a/install/MarcMentat/2022.1/Marc_tools/run_damask_lmp.patch +++ b/install/MarcMentat/2022.1/Marc_tools/run_damask_lmp.patch @@ -1,6 +1,6 @@ ---- -+++ -@@ -302,7 +302,23 @@ fi +--- run_damask_lmp.orig 2022-09-10 12:21:10.760114849 +0200 ++++ run_damask_lmp 2022-09-10 12:31:51.623680675 +0200 +@@ -302,7 +302,23 @@ . "$DIR/getarch" @@ -24,7 +24,7 @@ # # -@@ -405,7 +421,7 @@ sid= +@@ -405,7 +421,7 @@ did= vid= user= @@ -33,16 +33,7 @@ objs= qid=background cpu= -@@ -573,7 +589,7 @@ do - justlist=yes - ;; - -fe* | -FE*) -- feature=$value -+ feature=$value - - ;; - -pr* | -PR*) -@@ -676,50 +692,19 @@ do +@@ -676,50 +692,19 @@ esac ;; -u* | -U*) @@ -99,39 +90,7 @@ ;; -obj | -OBJ) objs="$value" -@@ -739,19 +724,19 @@ do - ;; - esac - ;; -- -dl | -DL) -- case $value in -- y* | Y*) -- deletelog=yes -- ;; -- n* | N*) -- deletelog=no -- ;; -- *) -- ;; -- esac -+ -dl | -DL) -+ case $value in -+ y* | Y*) -+ deletelog=yes -+ ;; -+ n* | N*) -+ deletelog=no -+ ;; -+ *) -+ ;; -+ esac - -- ;; -+ ;; - -at | -AT) - att=$value - ;; -@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible +@@ -1207,12 +1192,12 @@ fi fi fi @@ -147,16 +106,7 @@ fi fi if test "$objs" -@@ -1386,7 +1371,7 @@ else - else - error="$error - job id required" -- fi -+fi - fi - - case $qid in -@@ -1531,7 +1516,7 @@ Program name : $prog +@@ -1531,7 +1516,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -165,7 +115,7 @@ User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1564,7 +1549,7 @@ Program name : $prog +@@ -1564,7 +1549,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -174,7 +124,7 @@ User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT" +@@ -1687,7 +1672,7 @@ ;; esac fi @@ -183,7 +133,7 @@ read value if test "$value" then -@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT" +@@ -1696,50 +1681,19 @@ user= ;; *) @@ -209,16 +159,13 @@ - fi + user=$value case $user in -- \/*) -- ;; -- *) -+ \/*) -+ ;; -+ *) + \/*) + ;; + *) user=`pwd`/$user - usersubname=`pwd`/$usersubname -- ;; -- esac + ;; + esac - if test ! -f $usersubname - then - if test -f $usersubname.f @@ -235,8 +182,6 @@ - usersubname=$usersubname.F90 - fi - fi -+ ;; -+ esac + usernoext=$user + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` @@ -245,7 +190,7 @@ ;; esac fi -@@ -2274,11 +2228,12 @@ fi +@@ -2274,11 +2228,12 @@ # # user subroutine used # @@ -260,7 +205,7 @@ case $program in \/* | \.\/*) bd= -@@ -2391,7 +2346,7 @@ fi +@@ -2391,7 +2346,7 @@ fi if test "$user" then @@ -269,7 +214,7 @@ usersub=1 fi export execpath -@@ -3274,44 +3229,27 @@ then +@@ -3274,44 +3229,27 @@ echo if test "$user" then @@ -319,21 +264,15 @@ fi -@@ -3331,10 +3269,11 @@ then +@@ -3331,6 +3269,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -3344,6 +3283,9 @@ else +@@ -3344,6 +3283,9 @@ prgsav=yes fi /bin/rm $userobj 2>/dev/null @@ -343,7 +282,7 @@ # # run marc -@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then +@@ -3390,7 +3332,7 @@ fi else if test $cpdll = yes; then @@ -352,7 +291,7 @@ /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes -@@ -3556,7 +3498,7 @@ then +@@ -3556,7 +3498,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -361,7 +300,7 @@ fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3569,21 +3511,21 @@ then +@@ -3569,21 +3511,21 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -386,7 +325,7 @@ fi fi fi -@@ -3593,39 +3535,27 @@ then +@@ -3593,39 +3535,27 @@ if test "$userhost" then echo @@ -432,21 +371,15 @@ fi # if test $user -@@ -3645,10 +3575,11 @@ then +@@ -3645,6 +3575,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" -@@ -3686,6 +3617,9 @@ else # if test $link +@@ -3686,6 +3617,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -456,69 +389,7 @@ # # run marc -@@ -3744,42 +3678,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -3779,7 +3713,7 @@ else #dllrun >0 if test $cpdll = yes; then @@ -527,7 +398,7 @@ /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes;then -@@ -3904,7 +3838,7 @@ then +@@ -3904,7 +3838,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -536,7 +407,7 @@ fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3917,20 +3851,20 @@ then +@@ -3917,20 +3851,20 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -560,7 +431,7 @@ fi fi fi -@@ -3940,37 +3874,25 @@ then +@@ -3940,37 +3874,25 @@ if test "$userhost" then echo @@ -604,7 +475,7 @@ fi # if test $user -@@ -3990,10 +3912,11 @@ then +@@ -3990,6 +3912,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ @@ -612,12 +483,7 @@ $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -4030,7 +3953,9 @@ else # if test $link +@@ -4030,7 +3953,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -628,78 +494,7 @@ # done if no job id given if test -z "$jid" then -@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then - RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc " - fi - --$RUN_JOB -+ $RUN_JOB - - if test $nprocd -gt 1 - then -@@ -4114,42 +4039,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -4149,7 +4074,7 @@ else #dllrun >0 if test $cpdll = yes; then diff --git a/install/MarcMentat/2022.1/Marc_tools/run_damask_mp.patch b/install/MarcMentat/2022.1/Marc_tools/run_damask_mp.patch index 924af6fbd..2e3e543b3 100644 --- a/install/MarcMentat/2022.1/Marc_tools/run_damask_mp.patch +++ b/install/MarcMentat/2022.1/Marc_tools/run_damask_mp.patch @@ -1,8 +1,6 @@ -diff --git "a/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_marc.original" "b/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_damask_mp" -index 88a3027..85beabe 100644 ---- "a/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_marc.original" -+++ "b/C:\\Users\\f.roters\\Documents\\Forschung\\FEM\\Kristallplastizit\303\244t\\Programme\\Userroutinen\\Marc\\Marc_mods\\2022.1\\Marc_tools\\run_damask_mp" -@@ -302,7 +302,23 @@ fi +--- run_damask_mp.orig 2022-09-10 12:21:11.130118821 +0200 ++++ run_damask_mp 2022-09-10 12:32:23.577358746 +0200 +@@ -302,7 +302,23 @@ . "$DIR/getarch" @@ -26,7 +24,7 @@ index 88a3027..85beabe 100644 # # -@@ -405,7 +421,7 @@ sid= +@@ -405,7 +421,7 @@ did= vid= user= @@ -35,16 +33,7 @@ index 88a3027..85beabe 100644 objs= qid=background cpu= -@@ -573,7 +589,7 @@ do - justlist=yes - ;; - -fe* | -FE*) -- feature=$value -+ feature=$value - - ;; - -pr* | -PR*) -@@ -676,50 +692,19 @@ do +@@ -676,50 +692,19 @@ esac ;; -u* | -U*) @@ -101,39 +90,7 @@ index 88a3027..85beabe 100644 ;; -obj | -OBJ) objs="$value" -@@ -739,19 +724,19 @@ do - ;; - esac - ;; -- -dl | -DL) -- case $value in -- y* | Y*) -- deletelog=yes -- ;; -- n* | N*) -- deletelog=no -- ;; -- *) -- ;; -- esac -+ -dl | -DL) -+ case $value in -+ y* | Y*) -+ deletelog=yes -+ ;; -+ n* | N*) -+ deletelog=no -+ ;; -+ *) -+ ;; -+ esac - -- ;; -+ ;; - -at | -AT) - att=$value - ;; -@@ -1207,12 +1192,12 @@ post file $DIRPID/$pid.t16 or $DIRPID/$pid.t19 or $DIRPID/$pid.h5 not accessible +@@ -1207,12 +1192,12 @@ fi fi fi @@ -149,16 +106,7 @@ index 88a3027..85beabe 100644 fi fi if test "$objs" -@@ -1386,7 +1371,7 @@ else - else - error="$error - job id required" -- fi -+fi - fi - - case $qid in -@@ -1531,7 +1516,7 @@ Program name : $prog +@@ -1531,7 +1516,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -167,16 +115,7 @@ index 88a3027..85beabe 100644 User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1548,8 +1533,6 @@ GPGPU option : $gpuids - Host file name : $host" > $jid.log - if test "$iprintsimufact" = true ; then - echo "DDM with ARC Mapper : $ddm_arc" >> $jid.log -- echo "Mapper directory : $MESHERDIR" >> $jid.log -- echo "Meshing directory : $MESHERDIR" >> $jid.log - fi - echo \ - "Message passing type : $itree -@@ -1564,7 +1547,7 @@ Program name : $prog +@@ -1564,7 +1549,7 @@ Marc shared lib : $progdll Version type : $mode Job ID : $DIRJID/$jid$extra_job_info @@ -185,16 +124,7 @@ index 88a3027..85beabe 100644 User objects/libs : $objs Restart file job ID : $rid Substructure file ID : $sid -@@ -1579,6 +1562,8 @@ Solver processes : $nsolverprint - Solver threads : $ntsprint" - if test "$iprintsimufact" = true ; then - echo "DDM with ARC Mapper : $ddm_arc" -+ echo "Mapper directory : $MESHERDIR" >> $jid.log -+ echo "Meshing directory : $MESHERDIR" >> $jid.log - fi - echo \ - "GPGPU option : $gpuids -@@ -1687,7 +1672,7 @@ Program name ($prog)? $ECHOTXT" +@@ -1689,7 +1674,7 @@ ;; esac fi @@ -203,7 +133,7 @@ index 88a3027..85beabe 100644 read value if test "$value" then -@@ -1696,50 +1681,19 @@ Program name ($prog)? $ECHOTXT" +@@ -1698,50 +1683,19 @@ user= ;; *) @@ -229,16 +159,13 @@ index 88a3027..85beabe 100644 - fi + user=$value case $user in -- \/*) -- ;; -- *) -+ \/*) -+ ;; -+ *) + \/*) + ;; + *) user=`pwd`/$user - usersubname=`pwd`/$usersubname -- ;; -- esac + ;; + esac - if test ! -f $usersubname - then - if test -f $usersubname.f @@ -255,8 +182,6 @@ index 88a3027..85beabe 100644 - usersubname=$usersubname.F90 - fi - fi -+ ;; -+ esac + usernoext=$user + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .f` + usernoext=`dirname $usernoext`/`$BASENAME $usernoext .F` @@ -265,7 +190,7 @@ index 88a3027..85beabe 100644 ;; esac fi -@@ -2274,11 +2228,12 @@ fi +@@ -2276,11 +2230,12 @@ # # user subroutine used # @@ -280,7 +205,7 @@ index 88a3027..85beabe 100644 case $program in \/* | \.\/*) bd= -@@ -2391,7 +2346,7 @@ fi +@@ -2393,7 +2348,7 @@ fi if test "$user" then @@ -289,7 +214,7 @@ index 88a3027..85beabe 100644 usersub=1 fi export execpath -@@ -3274,44 +3229,27 @@ then +@@ -3276,44 +3231,27 @@ echo if test "$user" then @@ -339,21 +264,15 @@ index 88a3027..85beabe 100644 fi -@@ -3331,10 +3269,11 @@ then +@@ -3333,6 +3271,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -3344,6 +3283,9 @@ else +@@ -3346,6 +3285,9 @@ prgsav=yes fi /bin/rm $userobj 2>/dev/null @@ -363,7 +282,7 @@ index 88a3027..85beabe 100644 # # run marc -@@ -3390,7 +3332,7 @@ if test $dllrun -eq 0; then +@@ -3392,7 +3334,7 @@ fi else if test $cpdll = yes; then @@ -372,7 +291,7 @@ index 88a3027..85beabe 100644 /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes -@@ -3556,7 +3498,7 @@ then +@@ -3558,7 +3500,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -381,7 +300,7 @@ index 88a3027..85beabe 100644 fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3569,21 +3511,21 @@ then +@@ -3571,21 +3513,21 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -406,7 +325,7 @@ index 88a3027..85beabe 100644 fi fi fi -@@ -3593,39 +3535,27 @@ then +@@ -3595,39 +3537,27 @@ if test "$userhost" then echo @@ -452,21 +371,15 @@ index 88a3027..85beabe 100644 fi # if test $user -@@ -3645,10 +3575,11 @@ then +@@ -3647,6 +3577,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ -- $SFLIB \ + $DAMASK \ -+ $SFLIB \ + $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - echo " $PRODUCT Exit number 3" -@@ -3686,6 +3617,9 @@ else # if test $link +@@ -3688,6 +3619,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -476,69 +389,7 @@ index 88a3027..85beabe 100644 # # run marc -@@ -3744,42 +3678,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -3781,7 +3715,7 @@ else #dllrun >0 if test $cpdll = yes; then @@ -547,7 +398,7 @@ index 88a3027..85beabe 100644 /bin/cp $DIRJOB/$marcdll $DIRJOB/${filename}_$marcdll 2>/dev/null fi if test $rmdll = yes;then -@@ -3904,7 +3838,7 @@ then +@@ -3906,7 +3840,7 @@ # first copy over the user sub if local directories if test ${dirstatus[$counter]} = "local" then @@ -556,7 +407,7 @@ index 88a3027..85beabe 100644 fi # do the compilation on the other machine if test ${dirstatus[$counter]} = "shared" -@@ -3917,20 +3851,20 @@ then +@@ -3919,20 +3853,20 @@ remoteuser=$DIR1/`$BASENAME $user` $RSH $i /bin/rm $remoteprog 2> /dev/null echo @@ -580,7 +431,7 @@ index 88a3027..85beabe 100644 fi fi fi -@@ -3940,37 +3874,25 @@ then +@@ -3942,37 +3876,25 @@ if test "$userhost" then echo @@ -624,7 +475,7 @@ index 88a3027..85beabe 100644 fi # if test $user -@@ -3990,10 +3912,11 @@ then +@@ -3992,6 +3914,7 @@ $TKLIBS \ $MRCLIBS \ $METISLIBS \ @@ -632,12 +483,7 @@ index 88a3027..85beabe 100644 $SFLIB \ $OPENSSL_LIB \ $SYSLIBS \ -- $SECLIBS || \ -+ $SECLIBS || \ - { - echo "$0: link failed for ${user:+$userobj }$objs" - exit 1 -@@ -4030,7 +3953,9 @@ else # if test $link +@@ -4032,7 +3955,9 @@ prgsav=yes fi # if test $link /bin/rm $userobj 2>/dev/null @@ -648,78 +494,7 @@ index 88a3027..85beabe 100644 # done if no job id given if test -z "$jid" then -@@ -4070,7 +3995,7 @@ if test $ddm_arc -gt 0; then - RUN_JOB="$BINDIR/exeddm $RUN_JOB -ddm $ddm_arc " - fi - --$RUN_JOB -+ $RUN_JOB - - if test $nprocd -gt 1 - then -@@ -4114,42 +4039,42 @@ then - counter=0 - if test -f "$host_filt" - then -- for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -- do -- ibase=${i%%.*} -- if test $ibase != $thishost -+ for i in `$AWK -v n=$numfield '{print $n}' $host_filt` -+ do -+ ibase=${i%%.*} -+ if test $ibase != $thishost -+ then -+ counter=$((counter+1)) -+ DIR1=$DIRJOB -+ line=`grep -v '^#' $userhost | grep "^$ibase "` -+ workdir=`echo $line | $AWK '{print $3}'` -+ if test -n "$workdir" - then -- counter=$((counter+1)) -- DIR1=$DIRJOB -- line=`grep -v '^#' $userhost | grep "^$ibase "` -- workdir=`echo $line | $AWK '{print $3}'` -- if test -n "$workdir" -- then -- DIR1=$workdir -- fi -- # if an incompatible host uses shared directory, -- # then the root machine deletes the executable -- if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -- then -- hname=_$ibase -- /bin/rm ${execname}$hname -- fi -- # if local directory used, the remote machine -- # deletes the executable -- if test ${dirstatus[$counter]} = "local" -- then -- $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -- fi -+ DIR1=$workdir - fi -- done -- fi -+ # if an incompatible host uses shared directory, -+ # then the root machine deletes the executable -+ if test ${dirstatus[$counter]} = "shared" -a ${compstatus[$counter]} = "no" -+ then -+ hname=_$ibase -+ /bin/rm ${execname}$hname -+ fi -+ # if local directory used, the remote machine -+ # deletes the executable -+ if test ${dirstatus[$counter]} = "local" -+ then -+ $RSH $i /bin/rm $DIR1/${execname} 2>/dev/null -+ fi -+ fi -+ done - fi - fi - fi -+fi +@@ -4151,7 +4076,7 @@ else #dllrun >0 if test $cpdll = yes; then