mailr14440 - /1.3/multi/mpi4py_processor.py


Others Months | Index by Date | Thread Index
>>   [Date Prev] [Date Next] [Thread Prev] [Thread Next]

Header


Content

Posted by edward on August 25, 2011 - 12:22:
Author: bugman
Date: Thu Aug 25 12:22:17 2011
New Revision: 14440

URL: http://svn.gna.org/viewcvs/relax?rev=14440&view=rev
Log:
Some cleaning up of the mpi4py processor module.


Modified:
    1.3/multi/mpi4py_processor.py

Modified: 1.3/multi/mpi4py_processor.py
URL: 
http://svn.gna.org/viewcvs/relax/1.3/multi/mpi4py_processor.py?rev=14440&r1=14439&r2=14440&view=diff
==============================================================================
--- 1.3/multi/mpi4py_processor.py (original)
+++ 1.3/multi/mpi4py_processor.py Thu Aug 25 12:22:17 2011
@@ -57,9 +57,12 @@
                     break
 
 
-# wrapper sys.exit function
-# CHECKME is status ok
 def exit(status=None):
+    """Wrapper for the sys.exit function."""
+
+    # CHECKME is status ok
+
+    # Execution on the slave.
     if MPI.COMM_WORLD.rank != 0:
         if in_main_loop:
             raise Exception('sys.exit unexpectedley called on slave!')
@@ -72,10 +75,10 @@
             
sys.__stderr__.write('***********************************************\n')
             sys.__stderr__.write('\n')
             MPI.COMM_WORLD.Abort()
+
+    # Execution on the master.
     else:
-        #print 'here'
         exit_mpi()
-        #MPI.COMM_WORLD.Abort(1)
         sys.exit(status)
 
 
@@ -83,6 +86,7 @@
     if MPI.Is_initialized() and not MPI.Is_finalized() and 
MPI.COMM_WORLD.rank == 0:
         broadcast_command(Exit_command())
         ditch_all_results()
+
 
 
 class Mpi4py_processor(Multi_processor):




Related Messages


Powered by MHonArc, Updated Thu Aug 25 12:40:02 2011