|
bcMPI - TutorialintroductionThis tutorial demonstrates the process of creating and running a bcMPI application. applicationThe value of pi is to be calculated by finding the area of a circle (or, 4 times the area of a quarter circle). Each node will approximate a portion of the area by summing up the area of many small rectangles. The final answer will be found by collectively summing the individual portions. implementationContents of file matpi.m:
batch system job scriptTo test the above program (matpi.m), user has to create a batch system job script. The generator tool is $INSTALL_DIR/bin/create_job_file.py. To generate a job file, this tool reads information from installation, queue and job specific configuration files and command line options. Following configuration files set values for a pbs job script matpi.pbs, in an smp machine named "kodos" where processors per node is two, using "octave" as interpreter and "openmpi" as mpi library. Batch system queue name is "matlab" and the total number of processes requested for this job is four. configuration files:Default installation configuration file - $INSTALL_DIR/etc/ParaM.pjc. Make sure the following values are set in this file:
Queue configuration file - queue.pjc. Copy the example file queue.pjc from $INSTALL_DIR/share/example. Set the following values for the variables.
Job configuration file - job.pjc. Create job.pjc file. This file follows the same format as queue configuration file and contains values for a specific job.
generating batch system job script:Be sure to change INSTALL_DIR to match your installation directory.
Contents of generated file matpi.pbs:
run the applicationCreate the program file matpi.m by copying or typing the file contents listed under implementation. Be sure to change INSTALL_DIR to match your installation directory. To submit the tests using PBS: % qsub matpi.pbs
To submit the tests using LSF: % bsub matpi.lsf
To run the tests without a scheduler: % sh matpi.pbs
outputThe interpreters will usually display a bunch of startup messages, somewhere near the end the application output should appear:
Next: Documentation |
