Index: ../trunk-jpl/src/m/classes/clusters/generic.py =================================================================== --- ../trunk-jpl/src/m/classes/clusters/generic.py (revision 24599) +++ ../trunk-jpl/src/m/classes/clusters/generic.py (revision 24600) @@ -9,6 +9,10 @@ from issmscpin import issmscpin from issmscpout import issmscpout import MatlabFuncs as m +try: + from generic_settings import generic_settings +except ImportError: + print('Warning generic_settings.py not found, default will be used') class generic(object): @@ -29,7 +33,7 @@ self.codepath = IssmConfig('ISSM_PREFIX')[0] + '/bin' self.executionpath = issmdir() + '/execution' self.valgrind = issmdir() + '/externalpackages/valgrind/install/bin/valgrind' - self.valgrindlib = '/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.20.10.1' + self.valgrindlib = issmdir() + '/externalpackages/valgrind/install/lib/libmpidebug.so' self.valgrindsup = [issmdir() + '/externalpackages/valgrind/issm.supp'] # add any .supp in list form as needed self.verbose = 1 self.shell = '/bin/sh' @@ -41,17 +45,18 @@ self.name = socket.gethostname() #initialize cluster using user settings if provided + try: self = generic_settings(self) except NameError: print("generic_settings.py not found, using default settings") - else: - raise + # else: + # raise - #OK get other fields self = options.AssignObjectFields(self) # }}} + def __repr__(self): # {{{ # display the object s = "class '%s' object '%s' = \n" % (type(self), 'self') @@ -68,6 +73,7 @@ s += " shell: %s\n" % self.shell return s # }}} + def checkconsistency(self, md, solution, analyses): # {{{ if self.np < 1: md = checkmessage(md, 'number of processors should be at least 1') @@ -76,9 +82,10 @@ return md # }}} + def BuildQueueScript(self, dirname, modelname, solution, io_gather, isvalgrind, isgprof, isdakota, isoceancoupling): # {{{ # Which executable are we calling? - executable = 'issm.exe' # default + executable = 'issm.exe' # default if isdakota: version = IssmConfig('_DAKOTA_VERSION_') @@ -142,6 +149,7 @@ fid = open(modelname + '.outlog', 'w') fid.close() # }}} + def BuildKrigingQueueScript(self, modelname, solution, io_gather, isvalgrind, isgprof): # {{{ #write queuing script if not m.ispc(): @@ -179,6 +187,7 @@ fid = open(modelname + '.outlog', 'w') fid.close() # }}} + def UploadQueueJob(self, modelname, dirname, filelist): # {{{ #compress the files into one zip. compressstring = 'tar -zcf {}.tar.gz '.format(dirname) @@ -192,6 +201,7 @@ issmscpout(self.name, self.executionpath, self.login, self.port, [dirname + '.tar.gz']) # }}} + def LaunchQueueJob(self, modelname, dirname, filelist, restart, batch): # {{{ print('launching solution sequence on remote cluster') if restart: @@ -203,6 +213,7 @@ launchcommand = 'cd {} && rm -rf ./{} && mkdir {} && cd {} && mv ../{}.tar.gz ./&& tar -zxf {}.tar.gz && chmod 755 {}.queue && ./{}.queue'.format(self.executionpath, dirname, dirname, dirname, dirname, dirname, modelname, modelname) issmssh(self.name, self.login, self.port, launchcommand) # }}} + def Download(self, dirname, filelist): # {{{ if m.ispc(): #do nothing