Is there a way to tell MG/ME where to write temp files/folders?
Hi,
I am trying to use MG/ME to automatically calculate the branching ratios for a large number of points in the parameter space of my models (~11k points). The script (pasted below) works, but has two related problems that I'm hoping you have some advice on.
= Script =======
#$ -S /bin/sh
workingdir=
procdir=
cp $workingdir/
for filename in $workingdir/
do
rm -v $procdir/RunWeb
rm -rvf $procdir/Events/*
rm -v $procdir/
rm -v $procdir/
rm -v $procdir/
echo "**** Processing: $filename ****"
cp $filename $procdir/
echo "**** Writing: $filename ****"
cp $procdir/
done
= End script =======
The param_cards all have "auto" set as their width, and the process being run is just "p p > t t~" with all options set as default. In testing, the script runs without issue. It's only once I try to run multiple copies of the script (each in a separate directory) with a large number of param_cards.
The first problem is that when I run the script by submitting through qsub, the temporary files required to do the BR calculations get created in my home directory (in folders called tmpXXXX where the XXXX is a random identifier), which causes slowdowns for the mail server of the department. This is not ideal. If I run multiple copies of the script, then the folders quickly start to pile up.
The other problem is that the temporary folders do not seem to be deleted after each iteration of the loop, only after the script has terminated. This means that I would end up with up to ~11k temporary folders in my home directory, slowing down the mail server and taking up far too much space.
My question is then: is there a way to specify where these temporary files are written? Ideally, I would like to set it the same as $workingdir in the script above. If there is no way to fix the "not deleting until script is finished" part, then at least I could add a line at the end of the loop saying "rm -r $workingdir/tmp*".
Thanks in advance for any help,
Terry
Question information
- Language:
- English Edit question
- Status:
- Answered
- Assignee:
- No assignee Edit question
- Last query:
- Last reply:
Can you help with this problem?
Provide an answer of your own, or ask Terry Pilkington for more information if necessary.