None of the steps you describe would fix that error, unless having the additional directory in your PATH caused the script to call a different version of a command.
The error "BASH: floating point exception " are outputed at the lines of
case 2 and 3.
And AutoRandom, lp_solve, lpsolve, combine are executable files compiled by myself.
The full error message:
+ ./lp_solve -time -sp secure.lp
./ExpScriptOld: line 55: 7304 Floating point exception./lp_solve -time -sp secure.lp >$lpfilename 2>&1
What is '@'?
@ is typed by myself. Sorry, just means AT.
The script is pasted here:
++++++++++++++++++++++++++++++++++++++++++++
#!/bin/bash -xv
#This script is written for collecting time cost of lp_solve and a pruning algorithm.
#input: group_number, MAX_group_number, servicenumberforecahgroup,MAX_sn,task number,MAX_tn
# 3 loops
for ((gni=$1 ; gni<=$2 ;gni=gni+1))
do
for ((sni=$3;sni<=$4;sni=sni+1))
do
for ((tni=$5;tni<=$6;tni=tni+1))
do
#init commandstr
unset commandstr filestr
commandstr="AutoRandom $gni"
for ((ci=1;ci<=$gni;ci=ci+1))
do
commandstr="$commandstr $sni"
done
commandstr="$commandstr $tni"
#call AutoRandom,output secure.lp, tests_inputs.txt
./$commandstr
#init file name
unset lpfilename cbfilename
filestr="G_"$gni"S_"$sni"T_"$tni
lpfilename=lp$filestr
cbfilename=combine$filestr
echo $lpfilename $cbfilename
#call combine
./combine tests_inputs.txt > $cbfilename
#grep the time cost
lptotalcost=` more $lpfilename | grep "solving" | sed 's/^.*(//g' | sed 's/s.*)$//g'`
lpParsingcost=` more $lpfilename | grep "Parsing" | sed 's/^.*input://g' | sed 's/s.*)$//g'`
cbtimecostL=`more $cbfilename | grep "^the.*linear" | sed 's/^.*takes//g' | sed 's/ milisecond$//g'`
cbtimecostA=`more $cbfilename | grep "advanced" | sed 's/^.*takes//g' | sed 's/ miliseconds$//g'`
outputline="$filestr The cost time for LP_Parsing, LP_Total, L_Combine and A_Combine are: $lpParsingcost, $lptotalcost, $
cbtimecostL, $cbtimecostA"
echo $outputline >> Data.txt
done
done
done
++++++++++++++++++++++++++++++++++++++++++++
[quote=cfajohnson;302225783]
What is in that script?
What line causes that error?
What is the full error message?
What is '@'?
None of the steps you describe would fix that error, unless having the additional directory in your PATH caused the script to call a different version of a command.