Interactive Multi-CPU


The next step in scaling up your program is to increase the number of processors that are devoted to the simulation. This is particularly simple if you are working with an n-way decomposition. Because there will be multiple PGENESIS nodes (i.e., processes) running simultaneously, errors related to timing or insufficient "barrier" commands will frequently be encountered at this stage. Also, some speedup estimates can be made by comparing the performance on n nodes with that on 1 node.

As an example, you can try the orient2 example, which is an n-way decomposition of the serial Genesis Orient_tut example.  Here we will be running the demo.g script, which sets n_slices to 5, meaning that each of the neural populations is divided into 5 similarly-sized slices.  There will be one PGENESIS node for each slice, one PGENESIS node for controlling the simulation, and one PGENESIS node for displaying the results, making for a total of 7 nodes.

  1. Let us assume that you want to run this PGENESIS simulation on 4 processors.  (We assume here that PGENESIS has already been installed on the systems you plan to use.)  Since we have 7 nodes, 3 processors will be responsible for running 2 nodes each, and 1 processor will be responsible for running the remaining node. Login to the host from which you can start parallel jobs.  In some cases this will be one of the 4 processors to be used for computation, but on other systems, there is a distinct front-end host.

  2. Make sure you have given rights to each of the processors to use your X-Windows screen, (e.g. type "xhost +host", etc., on your local console) and that the $DISPLAY environment variable is set correctly in your  shell to the host name of your X-Windows screen. (On some platforms this may not be necessary.) If there is an Internet firewall between you and the machines on which you are running PGENESIS, you may need to talk to your system administrator to enable you to use X-Windows remotely.

  3. cd into the  ~pgenesis/Scripts/orient2 directory.

  4. For MPI-based PGENESIS, run "pgenesis -nodes 7 demo.g".  This will start up 7 PGENESIS processes and each will run the demo.g script.

    For PVM-based PGENESIS, first create a file in your home directory called "hosts" and put the names of the other hosts which you wish to use in it, e.g.:
         host1
         host2
         host3
    These names tell PVM where it may spawn other nodes. Let us assume that we are running on host0. Since the demo.g script spawns 6 nodes, and we have 4 total machines (host0, host1, host2, and host3) for running 7 processes, each CPU will be assigned 1 or 2 nodes. For production runs, it is a good idea to have the number of CPUs equal the number of nodes so that each node has its own CPU, but for testing this is not necessary. To start the run, enter "pgenesis -config ~/hosts demo.g".
  5. PGENESIS should display all 3 neural populations in a single window (the chart graphs of Orient_tut are omitted for simplicity). Use the control panel to run the simulation, by clicking on either the "sweep_horiz" or "sweep_vert" buttons.

  6. When you are finished, click on the "quit" button and all processes should exit.