Passing arguments to a PBS script

General issues of interest both for network and
individual cell parallelization.

Moderator: hines

Post Reply
biswa
Posts: 11
Joined: Tue Jun 07, 2005 4:29 pm

Passing arguments to a PBS script

Post by biswa »

I am using a PBS script to initiate Montecarlo runs on 100s of processors. Can anyone please suggest me the best way to pass arguments to a hoc file in a PBS script i.e.,

instead of executing:

Code: Select all

aprun -n 320 x86_64/special -mpi foo
which works well, I would like to execute something like the following:

Code: Select all

aprun -n 320 x86_64/special -mpi foo arg1 arg2 arg3
whereby, arg1...n can be variables such as reversal potentials, densities, etc. This will enable me to use job arrays present in PBS to submit large Monte Carlo runs. Is there any other solution to this issue apart from (viewtopic.php?f=28&t=1747)?
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Passing arguments to a PBS script

Post by ted »

biswa wrote:Is there any other solution to this issue apart from (viewtopic.php?f=28&t=1747)?
What aspect of that approach are you trying to avoid? Does it help to know that you can pass a compound statement, e.g. like this
nrngui foo.hoc -c "{a=PI b=exp(1) c=sin(0.01)}"
An alternative strategy to using PBS is to take advantage of NEURON's bulletin-board style parallelization, which may give you more flexibility--read about "embarrassingly parallel" simulations with NEURON in the Programmer's Reference http://www.neuron.yale.edu/neuron/stati ... arcon.html, and here's an exercise from the NEURON summer course that might help you get started:
http://www.neuron.yale.edu/ftp/ted/neur ... zation.zip
This requires compiling NEURON from source code, using the --with-paranrn switch.
biswa
Posts: 11
Joined: Tue Jun 07, 2005 4:29 pm

Re: Passing arguments to a PBS script

Post by biswa »

Thanks Ted. My code presently runs on Crays, although I and Michael had to go through a tenuous iterative process to get it working. The aspect that I would really like to avoid is passing 20s of parameters in a compound statement -- what I had in my mind was something like a XML file that can be piped to the hoc file for my "embarrassingly parallel" simulations. Certainly, if this is not possible I will try to programmatically produce the compound statement using a script and pipe it to Neuron.
ted
Site Admin
Posts: 6299
Joined: Wed May 18, 2005 4:50 pm
Location: Yale University School of Medicine
Contact:

Re: Passing arguments to a PBS script

Post by ted »

With NEURON's bulletin board style parallelization, there would be no need for PBS to pipe parameters to anything. All parameter set construction would be done by the master host, which posts each "task's" set of parameters to the bulletin board either as individual arguments or as a Vector via pc.submit. When a worker host takes a task from the board, it assigns these values to the appropriate parameters, executes a run, and finally posts its return value(s) to the bulletin board, from which the master host then gathers and assembles the results.
Post Reply