Run array of kobs

Moderators: cyao, michael_borland

Post Reply
simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Run array of kobs

Post by simona.bettoni » 22 Jan 2018, 07:59

Hi,
I am trying to do some jitter studies using Elegant. I would like to submit an array of jobs to run them in parallel. The result I get is that one of the output files (.cen or .twi, or any other) is locked for writing. This is an example of the error message I get:

Error:
unable to open file Aramis.cen for writing--file is locked (SDDS_InitializeOutput)

If I remove the output from these files I have the same kind of error in the coordinate and parameter outputs.

Maybe there is a setting I have to change to have the simulations run? Is there a setting of the cluster have I to modify (we recently migrated to a new one)?.

I uploaded the files.

Many thanks in advance for any feed-back.
Kind regards.
Attachments
Elegant_array_job.7z
(34.42 MiB) Downloaded 154 times

michael_borland
Posts: 1933
Joined: 19 May 2008, 09:33
Location: Argonne National Laboratory
Contact:

Re: Run array of kobs

Post by michael_borland » 22 Jan 2018, 09:35

Simona,

The problem is that your jobs all use the same destination for the output data. Each job needs to have different filenames. You can do this using the macro-substitution feature. E.g., in your .ele file, use

Code: Select all

rootname = Aramis_<index>
then on the commandline use

Code: Select all

for index in $(seq 1 10) ; do 
 submit elegant Aramis_ok.ele -macro=index=$index
done
where "submit" is a script that submits a command to the batch queue. You'll end up with output files called Aramis_1.*, Aramis_2.*, ..., Aramis_10.*

--Michael

simona.bettoni
Posts: 45
Joined: 06 Jul 2011, 03:14

Re: Run array of kobs

Post by simona.bettoni » 24 Jan 2018, 05:34

Hi,
thanks for your answer. I tried but I was generating files named NAME_FILE_<INDEX>, where index was really the word "index". I asked to the expert of the cluster I am using, and he changed the script I use to submit the job:

CMD="elegant"
ARGS="Aramis_ok.ele "$@

in

CMD="elegant"
ARGS="Aramis_ok.ele "

In this case Elegant generates different files with the names NAME_FILE_1_*, NAME_FILE_2_*, NAME_FILE_3_*, ...
I tried to plot some files, and they look the same.

Many thanks for your help as usual.

Post Reply