You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the below code in bash, and I always get the same error : the error:
/usr/local/matlab/bin/matlab: eval: line 1780: unexpected EOF while looking for matching `''
/usr/local/matlab/bin/matlab: eval: line 1781: syntax error: unexpected end of file
the code:
jobs_per_node=8
num_nodes=24
job_counter=0
for input1 in {1..24}; do
for input2 in {1..8}; do
# Increment job counter
job_counter=$((job_counter + 1))
# Break after submitting 2 jobs for testing
if [ "$job_counter" -gt 2 ]; then
break 2 # Exit both loops
fi
# Determine which node the job will be assigned to (1-24)
node=$(( (job_counter - 1) / jobs_per_node + 1 ))
echo "Submitting jobs to node $node"
# PBS script content for this particular job
echo "#!/bin/bash" > run_${input1}${input2}.sh
echo "#PBS -q zeus_comb_short" >> run_${input1}${input2}.sh # Adjust the queue as needed
echo "#PBS -l select=1:ncpus=1:mpiprocs=1:mem=14GB" >> run_${input1}${input2}.sh
echo "#PBS -m abe" >> run_${input1}${input2}.sh
echo "#PBS -M [email protected]" >> run_${input1}${input2}.sh
echo "#PBS -N job${input1}${input2}" >> run_${input1}${input2}.sh
# Change directory to the correct location (handling spaces)
echo "cd '/home/nadeen.ak/CD7 screen code/combined_version_july2024'" >> run_${input1}${input2}.sh
# Add the directory to MATLAB's path and run the main function
echo "matlab -nodesktop -r \"addpath(genpath('/home/nadeen.ak/CD7 screen code/combined_version_july2024')); main(${input1},${input2}); exit;\" " >> run_${input1}${input2}.sh
# Submit the job to the queue
qsub run_${input1}${input2}.sh
# Clean up the script
rm run_${input1}${input2}.sh
done
done
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I have the below code in bash, and I always get the same error :
the error:
/usr/local/matlab/bin/matlab: eval: line 1780: unexpected EOF while looking for matching `''
/usr/local/matlab/bin/matlab: eval: line 1781: syntax error: unexpected end of file
the code:
I will appreciate any help :)
thanks
Beta Was this translation helpful? Give feedback.
All reactions