* ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * * ORNL PVM * -------------------------------------------------------------------------- | This directory contains a mixed C/Fortran example for PVM | The SPMD program creates a distributed 3D matrix and calls | a Fortran subroutine to carry out a tranpose operation across | the processors. This code also demonstrates the use of the | utility routine xpvm_connect() to connect this process to | an XPVM monitoring console, if one is running, and a simple | timer for measuring elapsed wall-clock time. -------------------------------------------------------------------------- | | Filename: Style Description | -------- ----- ----------- | setup.c SPMD Sets up 3D matrix and calls tranpose routine | | Support routines: | -------- ----------- | transp.f Performs a 3D matrix transposition across | two of the dimensions | transpold.f Performs a 3D matrix transposition across | two of the dimensions (naive implementation) | realtime.c Simple timer routine | user.cleanup Script used to copy back trace and log files | from batch session. | xpvmconnect.c Utility subroutine for connecting a traced | pvm program with the XPVM monitoring console. | -------------------------------------------------------------------------- | Please direct any questions, comments or suggestions | to karin@cam.nist.gov. -------------------------------------------------------------------------- This directory includes the following files: README.pvm (this file) * ORNL PVM * make.pvm realtime.c setup.c transp.f transpold.f user.cleanup xpvmconnect.c ------------------ BATCH use of XPVM: ------------------ To run the sample program in batch under ** ORNL PVM ** , making use of the batch job preparation utility xllcreate: Set up your environment for xllcreate and copy the PVM example (if not already done): 1) a) Add the following lines to your .cshrc file: setenv LLC_ROOT /usr/local/apps/LLCREATE alias llcreate ${LLC_ROOT}/bin/llcreate alias xllcreate ${LLC_ROOT}/bin/xllcreate b) Remove from your .cshrc any old references to XL_ROOT and (x)loadlgen c) Source your .cshrc file so these settings take effect (* Don't forget this step ! *) 2) Copy the sample directory to your own area: /usr/bin/cp -r /usr/local/doc/Examples/transp ~/ This will create a subdirectory under your home directory called . 3) Set your DISPLAY environment variable if not already set. Build and submit the example: 4) In the directory ~/, type: make -f make.pvm 5) Call up the xllcreate program: xllcreate 6) Experiment with the entry panel, using the Help button to get started. You may use "Help" throughout xllcreate as needed. For the program to properly execute, you will need to enter the following information: The program is PVM, and SPMD. The program generates trace data (see pvm_spawn call in setup.c) and calls a routine to connect to XPVM if possible. To use XPVM, select the appropriate button, and make sure of the following BEFORE you submit your program: a) Your DISPLAY variable should be set within your .cshrc file, so all batch processes know where to display the XPVM console. b) Your console must allow the grand nodes permission to display. Use 'xhosts +' to allow all node permission. The main executable is "setup" (no secondary program). The program takes two arguments, the first giving the dimension of the 3D matrix (it is assumed all dimensions are equal) and the second giving the number of processes to use. THE SECOND ARGUMENT MUST EVENLY DIVIDE THE FIRST, and BOTH ARGUMENTS MUST DIVISBLE BY 2. (The latter requirement is due to the implemented transpose algorithm which performs simultaneous pairwise exchanges. To get around this requirement, you may substitute transpold.f, which uses a less efficient (but less restrictive) communication algorithm.) The program does not explicitly open any input files. The user.cleanup script is optional, but user.cleanup will copy back the pvm log file and the xpvm trace file. *------------------------------------------------------------* * NOTE: A short postscript document describing X-llcreate * * is available. See $LLC_ROOT/doc/LLC-doc.ps. * *------------------------------------------------------------* 7) Create the command file with "Create *.cmd File" 8) Submit the job! ---------------------------------- XPVM on the interactive node pool: ---------------------------------- To use XPVM on the interactive node pool, first follow the intructions for setting up an interactive PVM session. It is probably easiest to start XPVM *after* you've successfully started PVM. To proceed with XPVM: 1) Open TWO shell sessions (windows) running on one of the interactive nodes. 2) Check to ensure your DISPLAY is set and that the interactive grand node has permission to open on your console. 3) Then, in one of the interactive shell sessions (windows), execute /usr/local/bin/xpvm. After it successfully starts, and you've selected a tracefile (or accepted the default tracefile), switch to the second window. 4) In the second interactive shell session (window), execute your program as you normally would. The included call to xpvm_connect() will cause its trace information to be displayed in the XPVM display area. When the program finished, you may switch to "playback" mode, and replay the trace file and examine various "views" of the collected information. 5) When finished, you may choose to "quit" XPVM, which leaves the PVM virtual machine intact, or "halt" XPVM, which "halts" the PVM daemon as XPVM is exited. You should choose "quit" if you intend to continue using PVM after leaving XPVM, and "halt" if you are finished with your PVM session. * * * * * * * Comments and suggestions will be greatly appreciated. Feel free to call ext. 5119 or send e-mail to karin@cam.nist.gov.