Commit c42044ab authored by Hynek Baran's avatar Hynek Baran

Merge branch 'master' of gitlab.slu.cz:bar0001/JetMachine

parents 2e0bdb89 6b8fa06b
......@@ -105,19 +105,15 @@
</Group>
<Group labelreference="L976" drawlabel="true" applyint="true" applyrational="true" applyexponent="false">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">jets_new_resolve_enable := &quot;../mc&quot;; </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">#jets_new_resolve_enable := &quot;../mc&quot;; </Text-field>
</Input>
<Output>
<Text-field style="2D Output" layout="Maple Output"><Equation executable="false" style="2D Output" display="LUklbXJvd0c2Iy9JK21vZHVsZW5hbWVHNiJJLFR5cGVzZXR0aW5nR0koX3N5c2xpYkdGJzYoLUkjbWlHRiQ2JVE4amV0c19uZXdfcmVzb2x2ZV9lbmFibGVGJy8lJ2l0YWxpY0dRJXRydWVGJy8lLG1hdGh2YXJpYW50R1EnaXRhbGljRictSSNtb0dGJDYtUSM6PUYnL0YzUSdub3JtYWxGJy8lJmZlbmNlR1EmZmFsc2VGJy8lKnNlcGFyYXRvckdGPS8lKXN0cmV0Y2h5R0Y9LyUqc3ltbWV0cmljR0Y9LyUobGFyZ2VvcEdGPS8lLm1vdmFibGVsaW1pdHNHRj0vJSdhY2NlbnRHRj0vJSdsc3BhY2VHUSwwLjI3Nzc3NzhlbUYnLyUncnNwYWNlR0ZMLUkjbXNHRiQ2I1EmLi4vbWNGJy8lK2ZvcmVncm91bmRHUShbMCwwLDBdRicvJSlyZWFkb25seUdGPUY5">USYuLi9tYzYi</Equation></Text-field>
</Output>
</Group>
<Group hide-input="false" hide-output="false" labelreference="L935" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">read(&quot;../mc/Jets.s&quot;);</Text-field>
</Input>
<Output>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.92 test3 as of May 2, 2019 (2019-05-02 10:53:51)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets.newresolve v 0.4 as of Nov 16 2018 (2019-05-02 10:50:15)</Text-field>
<Text-field style="Line Printed Output" layout="Line Printed Output">Jets 5.93 as of May 2, 2019 (2019-05-17 17:50:28)</Text-field>
</Output>
</Group>
<Group hide-output="false" labelreference="L936" drawlabel="true">
......@@ -992,7 +988,8 @@ unknowns(c,b,a):</Text-field>
</Group>
<Group hide-output="false" labelreference="L44" drawlabel="true">
<Input>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">parameter(w): nonlocal(w): dependence(f(x,u));</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">parameter(w): nonlocal(w):
dependence(f(x,u));</Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">T (vfapply(0,f), 0, `vfapply 1`); </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">T (vfapply(A + B, f), 'vfapply(A,f)' + 'vfapply(B,f)', `vfapply 2`); </Text-field>
<Text-field prompt="&gt; " style="Maple Input" layout="Normal">T (vfapply(2*A, f), 2*'vfapply(A, f)', `vfapply 3a`);</Text-field>
......
This diff is collapsed.
......@@ -4,15 +4,16 @@
# $1 job base path
# all additional params are passed to maple
JobBasePath=$1
JobBaseName=`basename ${JobBasePath}`
JobPath=$1
JobName=`basename ${JobPath}`
JobBase=${JobName%.*}
shift
BaseDir=`bin/hostname`
MapleWorkDir="InProgress/${BaseDir}/${JobBasePath}"
MapleWorkDir="InProgress/${BaseDir}/${JobPath}"
ErrorFile=${MapleWorkDir}/${JobBasePath}.err
ErrorFile=${MapleWorkDir}/${JobPath}.err
StopFile="InProgress/${BaseDir}/stop"
QuitFile="InProgress/${BaseDir}/quit"
......@@ -27,25 +28,25 @@ function CleanUpSubDir()
function MoveToErrors()
{
echo "Error: "$1" moving to Errors/${JobBasePath}"
echo "Error: "$1" moving to Errors/${JobPath}"
echo
SuccessFile="${MapleWorkDir}/Results/${JobBasePath}.success"
SuccessFile="${MapleWorkDir}/Results/${JobPath}.success"
if [ -f "${SuccessFile}" ] ; then
echo "Error raised but there is a result ${SuccessFile} !"
cp "${SuccessFile}" "Results/"
fi
if [ -d Errors/${JobBasePath} ] ; then
mv Errors/${JobBasePath} Errors/${JobBasePath}.backup
# mv --backup=numbered Errors/${JobBasePath} Errors/${JobBasePath}.backup
if [ -d Errors/${JobPath} ] ; then
mv Errors/${JobPath} Errors/${JobPath}.backup
# mv --backup=numbered Errors/${JobPath} Errors/${JobPath}.backup
fi
#top -l 1 -n 60 -o vsize > "${ErrorFile}.memusage.txt"
mv "${MapleWorkDir}/" "Errors/${JobBasePath}"
# mv --backup=numbered "${MapleWorkDir}/" "Errors/${JobBasePath}"
mv "${MapleWorkDir}/" "Errors/${JobPath}"
# mv --backup=numbered "${MapleWorkDir}/" "Errors/${JobPath}"
if [[ ${MapleResult} == 0 ]] ; then
MapleResult=100
fi
......@@ -55,7 +56,7 @@ function MoveToErrors()
function FinalEcho()
{
echo "${1}"
echo "(End of ${JobBasePath})"
echo "(End of ${JobPath})"
echo
}
......@@ -87,7 +88,7 @@ if [[ -f ${QuitFile} ]] ; then
### lock job and trap signals
JobLockRootDir="InProgress/locks"
JobLockPath="${JobLockRootDir}/${JobBasePath}"
JobLockPath="${JobLockRootDir}/${JobPath}"
MyTrap() {
local ECODE=$?
......@@ -104,19 +105,19 @@ if mkdir "${JobLockPath}"; then
trap "MyTrap" INT TERM EXIT
###trap 'ECODE=$?; echo "exit(${ECODE}) TRAPped, freeing lock ${JobLockPath}"; rm -r ${JobLockPath}; exit ${ECODE}' INT TERM EXIT
else
echo "Lock of ${JobLockPath} failed, exiting ${JobBasePath} in $PWD directory on host $HOSTNAME pid $$ in ${MapleWorkDir}" >&2
echo "Lock of ${JobLockPath} failed, exiting ${JobPath} in $PWD directory on host $HOSTNAME pid $$ in ${MapleWorkDir}" >&2
exit 0
fi
##################################################
echo
echo "================================================================================"
echo "Computing ${JobBasePath} in $PWD directory on host $HOSTNAME pid $$ in ${MapleWorkDir}"
echo "Computing ${JobPath} in $PWD directory on host $HOSTNAME pid $$ in ${MapleWorkDir}"
echo
# job file existence check
if [ ! -f "Ready/${JobBasePath}.runme" ] ; then
FinalEcho "Warning: Missing job file Ready/${JobBasePath}.runme."
if [ ! -f "Ready/${JobPath}.runme" ] ; then
FinalEcho "Warning: Missing job file Ready/${JobPath}.runme."
exit 0
fi
......@@ -165,22 +166,22 @@ for x in "mc/SingleStep.mc" "mc/CommonProc.mc" "mc/Jets.s" "bin/cmaple"; do
done
# move .runme job file
mv Ready/${JobBasePath}.runme ${MapleWorkDir}/
mv Ready/${JobPath}.runme ${MapleWorkDir}/
if [[ 0 -lt $? ]] ; then
if [ ! -f "Ready/${JobBasePath}.runme" ] ; then
FinalEcho "Warning: Dissmissed job file Ready/${JobBasePath}.runme."
if [ ! -f "Ready/${JobPath}.runme" ] ; then
FinalEcho "Warning: Dissmissed job file Ready/${JobPath}.runme."
exit 0
else
FinalEcho "FATAL ERROR: Cannot move job file to work directory, file ${MapleWorkDir}/${JobBasePath}.runme does not exist."
FinalEcho "FATAL ERROR: Cannot move job file to work directory, file ${MapleWorkDir}/${JobPath}.runme does not exist."
exit 255
fi
fi
if [ ! -f "${MapleWorkDir}/${JobBasePath}.runme" ] ; then
if [ ! -f "Ready/${JobBasePath}.runme" ] ; then
FinalEcho "Warning: Dissmissed job file Ready/${JobBasePath}.runme."
if [ ! -f "${MapleWorkDir}/${JobPath}.runme" ] ; then
if [ ! -f "Ready/${JobPath}.runme" ] ; then
FinalEcho "Warning: Dissmissed job file Ready/${JobPath}.runme."
exit 0
else
FinalEcho "FATAL ERROR: Cannot move job file to work directory, file ${MapleWorkDir}/${JobBasePath}.runme does not exist."
FinalEcho "FATAL ERROR: Cannot move job file to work directory, file ${MapleWorkDir}/${JobPath}.runme does not exist."
exit 255
fi
fi
......@@ -192,17 +193,11 @@ echo "`ls -la`"
# run the computation
global/bin/cmaple \
-c "restart" \
-c "parCD:=convert(\"${MapleWorkDir}\",string)" \
-c "parBaseFileName:=convert(\"${JobBasePath}\",string)" \
-c "parJobPrefix:=convert(\"${JobBaseName/[0-9\{\}]*/}\",string)" \
-c 'parCD:=\"'${MapleWorkDir}'\"' \
-c 'parJobPath:=\"'${JobPath}'\"' \
-c 'parJobName:=\"'${JobName}'\"' \
-c 'parJobBase:=\"'${JobBase}'\"' \
$* < "global/mc/SingleStep.mc"
# Maple is not parsing {} properly but the fix bellow is causing DoOneStep to fail :(
#global/bin/cmaple \
# -c "restart" \
# -c "parCD:=convert(\"\\\"${MapleWorkDir}\\\"\",string)" \
# -c "parBaseFileName:=convert(\"\\\"${JobBasePath}\\\"\",string)" \
# -c "parJobPrefix:=convert(\"\\\"${JobBaseName/[0-9\{\}]*/}\\\"\",string)" \
MapleResult=$?
......@@ -216,12 +211,12 @@ if [[ 50 -lt ${MapleResult} ]] ; then
elif [ -f ${ErrorFile} ] ; then
# maple created an .error file
MoveToErrors " There is an error file ${ErrorFile},"
elif [ ! -f ${MapleWorkDir}/States/${JobBasePath}.state ] ; then
elif [ ! -f ${MapleWorkDir}/States/${JobPath}.state ] ; then
# maple have not created .state file
echo "Error: States/${JobBasePath}.state does not exists." >> ${ErrorFile}
echo "Result of grep -i \"error\" Logs/${JobBasePath}.log :" >> ${ErrorFile}
grep -i "error" Logs/${JobBasePath}.log >> ${ErrorFile}
MoveToErrors " States/${JobBasePath}.state does not exists,"
echo "Error: States/${JobPath}.state does not exists." >> ${ErrorFile}
echo "Result of grep -i \"error\" Logs/${JobPath}.log :" >> ${ErrorFile}
grep -i "error" Logs/${JobPath}.log >> ${ErrorFile}
MoveToErrors " States/${JobPath}.state does not exists,"
else
# successfully done
mv ${MapleWorkDir}/*.* Done/
......
......@@ -56,5 +56,5 @@ else
cp "bin/${StopFile2}" "InProgress/${StopFile2}"
# prepare startup empty but valid maple file:
echo "# Done" >> Ready/$1.runme
echo "# Done" >> "Ready/${1}.1.runme"
fi
\ No newline at end of file
#!/bin/bash
BaseDir=${HOSTNAME//[-+]/_}
if [[ ${BaseDir} != ${BaseDir//local/} ]] ; then
BaseDir=${BaseDir//local/}
echo "Warning: \$HOSTNAME='${HOSTNAME}' contains 'local', network is probably broken." >&2
fi
# if [[ ${BaseDir} != ${BaseDir//local/} ]] ; then
# BaseDir=${BaseDir//local/}
# echo "Warning: \$HOSTNAME='${HOSTNAME}' contains 'local', network is probably broken." >&2
# echo -n "localhost"
# fi
echo -n $BaseDir
lprint("CommonProc.mc v. 0.2.j", __FILE__);
lprint("CommonProc.mc v. 0.3", __FILE__);
# Printing to file
......
......@@ -189,7 +189,7 @@
# * Report macro changed to inlined function
# * New resolve implementation (jets_new_resolve_enable) removed from the Jets.s source file to the Jets.newresolve.s file
#
# v 5.92
# v 5.93
# * testing new nonlinear resolve implementation in file (cat(jets_new_resolve_enable, "/Jets.newresolve.s"))
# * LVar returns NULL on expressions without Vars
# * numerous bug fixes in the computation of coverings (MM 23.4.2019)
......@@ -201,7 +201,7 @@
###########################################################################################
interface(screenwidth=120):
printf("Jets 5.92 test3 as of May 2, 2019 (%s)\n",
printf("Jets 5.93 as of May 2, 2019 (%s)\n",
StringTools[FormatTime]("%Y-%m-%d %T", timestamp=FileTools[Status](__FILE__)[5]));
#
......
This diff is collapsed.
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment