Communism (version 1.0, 22 July 2004)
index
http://sepwww.stanford.edu/data/media/public/sep/antoine/Research/communism/Communism.py

 -- Communism with PYTHON
 
Program performing coarse grain parallelization
 
Specs:
------
 
 Simple script performing a window of the input files
 listed in the .politburo file and then sending order
 to the nodes listed in .comrades file.
 
 Plus:
  -resistant to thread failures
  -accept multiple input/output files
 
 Minus:
  -nfs should run on every node
  -automount should run on every node
 
 A log file .communism_log contains a full report 
 
Files needed:
-------------
 
 >>.politburo<<
 
   overlap
   order
   winaxis
   cataxis
   inpufile
   outputfile
   auxilliary files
 
   Example:
 
   overlap=0
   order=Agc
   winaxis=3
   cataxis=3
   inputfile=cmp.H
   outputfile=out.H
   outputfile2=out2.H out  # tagname=filename type (o,ou,out,output,0 are valid answers)
   inputfile2=in2.H in     # tagname=filename type (i,in,input,1 are valid answers)
 
 >>.comrades<<
 
   box name/speed/#cpus
 
   Example:
 
   sep210 2 2
   sep211 2 1
   sep101 1 2
 
System requirements:
--------------------
 
 -nfs/autofs should be running on the nodes

 
Modules
            
anarchy
os
re
string
 
Classes
            
auxilliary_file
machine
process
used_command
 
class auxilliary_file
      Class Auxilliary file
 
   Methods defined here:
__init__(self, flag, name, type, tmpn, ncpus)
Auxilliary files
 
flag=tag name
name=file name for the tag
type=input or output file
tmpn=name of the tmp file for the output auxilliary files
ncpus=number of processors

Data and non-method functions defined here:
__doc__ = 'Class Auxilliary file'
__module__ = 'Communism'
 
class machine
      Class Machine
 
   Methods defined here:
__init__(self, name, speed, cpu)
Machine
 
name=machine name
speed=relative speed
cpu=number of cpus to use per machine

Data and non-method functions defined here:
__doc__ = 'Class Machine'
__module__ = 'Communism'
 
class process
      Class Process
 
   Methods defined here:
__init__(self, name, start, share, done, overlap, ndone, nerr, nin, nout)
Process
 
name=name of the machine for the current process
start=starting point of the Window
share=number of gathers per process
done=check if the node is done or not
overlap=number of gathers overlaping
ndone=name of the temp file when the process is done
nerr=name of the temp file when the process has died
nin=name of the temp input file
nout=name of the temp output file

Data and non-method functions defined here:
__doc__ = 'Class Process'
__module__ = 'Communism'
 
class used_command
      Class Used Command
 
   Methods defined here:
__init__(self, rm, seprm, sepcp, cat, rsh, win, touch)
Commands to be ran by processors
 
rm=remove
seprm=sep remove
sepcp=sep sp
cat=sep cat
rsh=remote shell command
win=sep window
touch=touch command

Data and non-method functions defined here:
__doc__ = 'Class Used Command'
__module__ = 'Communism'
 
Functions
            
main()
Communism with python
 
1-Read .comrades
2-Read .politburo
3-Share the work
4-Collect and cat the results
 
Check the log file .communism_log
 
Data
             __author__ = 'Antoine Guitton'
__credits__ = 'James Rickett for the previous Communism.c'
__date__ = '22 July 2004'
__file__ = './Communism.pyc'
__name__ = 'Communism'
__version__ = '1.0'
 
Author
             Antoine Guitton
 
Credits
             James Rickett for the previous Communism.c