[cig-commits] r7600 - mc/3D/CitcomS/trunk/CitcomS

hlin at geodynamics.org hlin at geodynamics.org
Tue Jul 3 17:02:42 PDT 2007


Author: hlin
Date: 2007-07-03 17:02:42 -0700 (Tue, 03 Jul 2007)
New Revision: 7600

Added:
   mc/3D/CitcomS/trunk/CitcomS/MultiCoupledApp.py
Log:
a draft for multicoupled application


Added: mc/3D/CitcomS/trunk/CitcomS/MultiCoupledApp.py
===================================================================
--- mc/3D/CitcomS/trunk/CitcomS/MultiCoupledApp.py	2007-07-03 04:37:40 UTC (rev 7599)
+++ mc/3D/CitcomS/trunk/CitcomS/MultiCoupledApp.py	2007-07-04 00:02:42 UTC (rev 7600)
@@ -0,0 +1,90 @@
+#! usr/bin/env python
+#
+#
+#
+#
+#
+#
+#
+#
+#
+#
+
+from BasApplication import Base Application
+import journal
+
+class CoupledA(BaseApplication):
+
+
+    def __init__(self, name="MultiCoupledCitcomS"):
+        BaseApplication.__init__(self, name)
+        '''
+        self.solver = None
+        self.solverCommunicator = None 
+        self.myPlus = [] 
+        self.remotePlus = [] 
+
+        self.comm = None 
+        self.rank = 0
+        self.nodes = 0
+        '''
+
+        
+        return
+
+    def getNodes(self):
+        # csolver requires nproc1 CPUs to run
+
+        # esolver1 requires nproc2 CPUs to run
+
+        # esolver2 requires nproc3 CPUs to run
+
+        return nproc1 + nproc2 + nproc3
+
+    def initialize(self):
+        '''
+        layout = self.inventory.layout
+        layout.initialize(self)
+
+        seelf.findLayout(layout)
+
+        self.comtroller.initialize(self)
+        '''
+
+        return
+
+    def findLayout(self, layout):
+
+        if layout.ccomm:
+        #This process belongs to the containing solver
+
+        if layout.ecomm1:
+        #This process belongs to the embedded solver1
+        
+        if layout.ecomm2:
+        #This process belongs to the embedded solver2
+
+        self.comm = layout.comm
+        self.rank = layout.rank
+        self.nodes = layout.nodes
+
+        return
+
+    
+    def report Configuration(self):
+
+        return
+
+    class Invertory(BaseApplication.Inventory):
+
+        import pyre.inventory
+
+        import Controller
+        import Solver
+        import Coupler
+        import Layout
+
+        ## pyre.inventory stuff
+
+# End of file
+        



More information about the cig-commits mailing list