source:
issm/oecreview/Archive/24307-24683/ISSM-24599-24600.diff@
24684
Last change on this file since 24684 was 24684, checked in by , 5 years ago | |
---|---|
File size: 3.6 KB |
-
../trunk-jpl/src/m/classes/clusters/generic.py
9 9 from issmscpin import issmscpin 10 10 from issmscpout import issmscpout 11 11 import MatlabFuncs as m 12 try: 13 from generic_settings import generic_settings 14 except ImportError: 15 print('Warning generic_settings.py not found, default will be used') 12 16 13 17 14 18 class generic(object): … … 29 33 self.codepath = IssmConfig('ISSM_PREFIX')[0] + '/bin' 30 34 self.executionpath = issmdir() + '/execution' 31 35 self.valgrind = issmdir() + '/externalpackages/valgrind/install/bin/valgrind' 32 self.valgrindlib = '/usr/lib/x86_64-linux-gnu/openmpi/lib/libmpi.so.20.10.1'36 self.valgrindlib = issmdir() + '/externalpackages/valgrind/install/lib/libmpidebug.so' 33 37 self.valgrindsup = [issmdir() + '/externalpackages/valgrind/issm.supp'] # add any .supp in list form as needed 34 38 self.verbose = 1 35 39 self.shell = '/bin/sh' … … 41 45 self.name = socket.gethostname() 42 46 43 47 #initialize cluster using user settings if provided 48 44 49 try: 45 50 self = generic_settings(self) 46 51 except NameError: 47 52 print("generic_settings.py not found, using default settings") 48 else:49 raise53 # else: 54 # raise 50 55 51 52 56 #OK get other fields 53 57 self = options.AssignObjectFields(self) 54 58 # }}} 59 55 60 def __repr__(self): # {{{ 56 61 # display the object 57 62 s = "class '%s' object '%s' = \n" % (type(self), 'self') … … 68 73 s += " shell: %s\n" % self.shell 69 74 return s 70 75 # }}} 76 71 77 def checkconsistency(self, md, solution, analyses): # {{{ 72 78 if self.np < 1: 73 79 md = checkmessage(md, 'number of processors should be at least 1') … … 76 82 77 83 return md 78 84 # }}} 85 79 86 def BuildQueueScript(self, dirname, modelname, solution, io_gather, isvalgrind, isgprof, isdakota, isoceancoupling): # {{{ 80 87 # Which executable are we calling? 81 executable = 'issm.exe' # default88 executable = 'issm.exe' # default 82 89 83 90 if isdakota: 84 91 version = IssmConfig('_DAKOTA_VERSION_') … … 142 149 fid = open(modelname + '.outlog', 'w') 143 150 fid.close() 144 151 # }}} 152 145 153 def BuildKrigingQueueScript(self, modelname, solution, io_gather, isvalgrind, isgprof): # {{{ 146 154 #write queuing script 147 155 if not m.ispc(): … … 179 187 fid = open(modelname + '.outlog', 'w') 180 188 fid.close() 181 189 # }}} 190 182 191 def UploadQueueJob(self, modelname, dirname, filelist): # {{{ 183 192 #compress the files into one zip. 184 193 compressstring = 'tar -zcf {}.tar.gz '.format(dirname) … … 192 201 issmscpout(self.name, self.executionpath, self.login, self.port, [dirname + '.tar.gz']) 193 202 194 203 # }}} 204 195 205 def LaunchQueueJob(self, modelname, dirname, filelist, restart, batch): # {{{ 196 206 print('launching solution sequence on remote cluster') 197 207 if restart: … … 203 213 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) 204 214 issmssh(self.name, self.login, self.port, launchcommand) 205 215 # }}} 216 206 217 def Download(self, dirname, filelist): # {{{ 207 218 if m.ispc(): 208 219 #do nothing
Note:
See TracBrowser
for help on using the repository browser.