neuromau wrote:Testing the installation and running job scripts are covered in the reply to this post.
To test the installation of NEURON, we can create the following test program.
1. Move to the WORK file system:
2. Create a directory called test:
3. Move to the test directory:
4. In the test directory, create a file called test0.hoc, and include the following text in the file:
Code: Select all
objref pc
pc = new ParallelContext()
{printf("I am %d of %d\n", pc.id, pc.nhost)}
{pc.runworker()}
{pc.done()}
quit()
2. In the test directory, create a mod file called test.mod, and include the following text in the file:
3. Compile the test mechanism:
Now we want to run the test code. To do this, we must create a job script and submit the job script to the batch queue.
4. Create a file called mytest.sh and include the following lines:
Code: Select all
#!/bin/bash
#$-V
#$-cwd
#$-N myMPItest
#$-j y
#$ -o $JOB_NAME.o$JOB_ID
#$ -pe 16way 32
#$ -q development
#$ -l h_rt=00:05:00
#$ -M youremail@domain.edu
#$ -m e
set -x
ibrun x86_64/special -mpi test0.hoc
5. Now submit this script to the batch queue by entering the following at the command prompt:
The batch queue software will perform a series of checks before assigning our job a run number, adding our job to the queue, and printing a confirmation of submission:
Your job 1926013 ("myMPItest") has been submitted
6. We can check on the status of our job using the following command:
The Ranger User Guide (1) includes much more detail about submitting jobs, including the various options in the job script and other commands for checking the status of our job or the various queues.
7. Once the job is complete, an output file called myMPItest.o1926013 is generated. It concatenated the name we specified in our job script options with a run number generated by the batch queue. When we open this file, we should see some notes from the batch queue, a copy of the job script we submitted, and any output generated by our job (most of the output lines have been omitted in the example below):
TACC: Setting memory limits for job 1924223 to unlimited KB
TACC: Dumping job script:
--------------------------------------------------------------------------------
#!/bin/bash
#$-V
#$-cwd
#$-N myMPItest
#$-j y
#$ -o $JOB_NAME.o$JOB_ID
#$ -pe 16way 32
#$ -q development
#$ -l h_rt=00:05:00
#$ -M
youremail@domain.edu
#$ -m e
set -x
ibrun x86_64/special -mpi test0.hoc
--------------------------------------------------------------------------------
TACC: Done.
+ ibrun x86_64/special -mpi test0.hoc
TACC: Starting up job 1924223
TACC: Setting up parallel environment for MVAPICH ssh-based mpirun.
TACC: Setup complete. Running job script.
TACC: starting parallel tasks...
numprocs=32
NEURON -- VERSION 7.2 (436:cbc0331180f8) 2010-04-05
Duke, Yale, and the BlueBrain Project -- Copyright 1984-2008
See
http://www.neuron.yale.edu/credits.html
Additional mechanisms from files
test.mod
I am 13 of 32
I am 0 of 32
...
I am 20 of 32
I am 31 of 32
TACC: Shutting down parallel environment.
TACC: Shutdown complete. Exiting.
TACC: Cleaning up after job: 1924223
TACC: Done.
Note: If we wish to add any command line arguments (using Michael Hines' default_var function), we can add them to the ibrun line as follows:
Code: Select all
ibrun x86_64/special -mpi -c mytstop=20 test0.hoc
However, if we want to include a command line argument that uses quotes, we must put it in a different file type and have the ibrun reference that other file. In that case, the 'ibrun' line of our job script looks like:
And another file called mytestrun.sh must be created, which will actually contain the call to NEURON and the command line arguments:
Code: Select all
#!/bin/csh
x86_64/special -mpi -c 'strdef RunName' -c 'RunName="bigrun"' -c mytstop=20 test0.hoc
When we submit the job, we will still submit the main sh file, which will in turn reference the mytestrun.sh csh file
Links
1. Ranger User Guide:
http://services.tacc.utexas.edu/index.p ... user-guide
~ Marianne Case