QUICK_START  neurosys/solve

The files in this directory can be used to build a program that will
solve a system of ODE's modelling a network of biological neurons on
a parallel computer or cluster of workstations.

A. MPI
You'll need an implementation of MPI installed on your system.  If you
don't already have one, there are free implementations that can be
downloaded from

    http://www.mcs.anl.gov/mpi/mpich and
    http://www.mpi.nd.edu/lam

B. Equations files and Input
Copy the following files from either the sample1 or sample2 subdirectory
into this directory.

    sample?/equations.c
    sample?/equations.h
    sample?/constant_list
    sample?/constants
    sample?/solver_infile

Sample1 consists of a network of 64 neurons with a randomly generated
interconnection network and initial conditions.  All the neurons use 
the same model, which is based on the model presented in J White,
et al, J. Computational Neurosc. 5, 5-16 (1998).  For further details
see the paper, P. Pacheco, et al., Parallel Neurosys, which is available
at http://www.cs.usfca.edu/neurosys.

Sample 2 consists of a network of 21 neurons.  The first 20 are
"excitatory" and the 21st is "inhibitory".  Each neuron receives
synaptic input from the inhibitory neuron, and the inhibitory neuron
receives synaptic input from all of the neurons.  The neuron models are
based on those presented in G.B. Ermentrout and N. Kopell, Proc. Nat.
Acad. Sci. 95, 1259-1264 (1998).

C. Compilation
   1. Define the macros in Makefile
      a) CC:  you can usually omit this
      b) CFLAGS:  choose optimization and warning levels.  Unless
         you know what you're doing, don't use the -DDEBUG or
         -DDIST_OUTPUT flags.
      c) PROF, PROFLIB:  Use either no profiling or "totals only"
         profiling.
      d) LDFLAGS:  any special flags you want passed to the linker
      e) INCLUDE:  directories in which to search for include files
      f) LIB:  paths for the MPI libraries and other libraries that need to
         be linked with the program.
   2.  make

D. Running
   1.  Startup depends on your system and MPI implementation.  For
       mpich

           mpirun -np X solve

       and for lam

           mpirun n0-Y solve

       should work.  For lam you will first need to start the lam
       lam daemon.  Something like

           lamboot

       should work.  Here X is the number of processes and Y is X-1.  
       X should divide the number of neurons.  So use 1, 2, 4, 8 or
       64 for sample1 and 1, 3, or 7 for sample2.  
   2.  When the program prompts for the constants file, type 
       "constants" (no quotes).  When the program prompts for a datafile
       or standard in, type "d" (no quotes), and when it prompts for
       a filename, type "solver_infile" (no quotes).
       
E. Output
   Unless you used the DIST_OUTPUT flag for compilation, the output
   will be in a single ascii file called "outfile".  One line of
   the file gives the time in seconds (starting from 0) and the
   membrane voltages for each of the neurons.  The program neurondiz
   or any graphing program can be used to aid in visualizing the
   output.
