Beispiel #1
0
'''
Created on Apr 4, 2014

@author: tpmaxwel
'''


import ClusterCommunicator
from DistributedApplication import ConfigFileParser
import sys
         
app = ClusterCommunicator.getNodeApp( )
task_metadata = {}
config_file = "./config/ParallelCDMS.nasa-desktop-merge.txt"

if len(sys.argv)>2 and sys.argv[1] == '-c':
    config_file = sys.argv[2] 
    
print "Running PCDMS with config file ", config_file  
config_parser = ConfigFileParser( config_file )
task_metadata = config_parser.data()     
        
app.execute( task_metadata )
   

        else:
            self.current_cat = {}
            self.cats[ cat_name ] = self.current_cat
        self.current_cat_name = cat_name
            
    def addField( self, name, value ):
        if self.current_cat == None: self.addCategory( 'global' )
#        vlist = value.split(',')
        self.current_cat[ name ] = value 
#        print "Add field: %s %s %s " % ( self.current_cat_name, name, value )
        
    def data(self): 
        return self.cats     

if __name__ == "__main__":
    app = QtGui.QApplication( ['Hyperwall Data Browser'] )
    hcomm = ClusterCommunicator.getHComm()
    
    if hcomm.rank == 0:
        window = SliceWidgetWindow( hcomm )
        if len(sys.argv)>2 and sys.argv[1] == '-c':
            config = ConfigFileParser( sys.argv[2] )
            window.wizard.processConfig( config.data() )
        app.connect( app, QtCore.SIGNAL("aboutToQuit()"), window.terminate ) 
        window.show()
    else:
        window = CellPlotWidgetWindow( hcomm )
        app.connect( app, QtCore.SIGNAL("aboutToQuit()"), window.terminate ) 
        window.showFullScreen()
    
    app.exec_()