Changeset 25684
- Timestamp:
- 10/13/20 12:04:18 (4 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 1 added
- 5 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/generic.m
r24593 r25684 95 95 if cluster.interactive 96 96 if IssmConfig('_HAVE_MPI_'), 97 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 97 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname); 98 98 else 99 fprintf(fid,'%s/%s %s %s %s 99 fprintf(fid,'%s/%s %s %s %s',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname); 100 100 end 101 101 else 102 102 if IssmConfig('_HAVE_MPI_'), 103 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);103 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.np,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname); 104 104 else 105 fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname);105 fprintf(fid,'%s/%s %s %s %s 2> %s.errlog > %s.outlog &',cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname); 106 106 end 107 107 end … … 113 113 if ismac, 114 114 if IssmConfig('_HAVE_MPI_'), 115 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog ',...115 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --dsymutil=yes --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog ',... 116 116 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname], modelname,modelname,modelname); 117 117 else 118 fprintf(fid,'%s --leak-check=full --dsymutil=yes --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...118 fprintf(fid,'%s --leak-check=full --dsymutil=yes --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',... 119 119 cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname], modelname,modelname,modelname); 120 120 end 121 121 else 122 122 if IssmConfig('_HAVE_MPI_'), 123 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...123 fprintf(fid,'mpiexec -np %i %s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',... 124 124 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname); 125 125 else 126 fprintf(fid,'%s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',...126 fprintf(fid,'%s --leak-check=full --error-limit=no --suppressions=%s %s/%s %s %s %s 2> %s.errlog > %s.outlog',... 127 127 cluster.valgrind,cluster.valgrindsup,cluster.codepath,executable,solution,[cluster.executionpath '/' dirname],modelname,modelname,modelname); 128 128 end -
issm/trunk-jpl/src/m/classes/clusters/generic.py
r25154 r25684 104 104 fid.write('mpiexec -np {} {}/{} {} {}/{} {}'.format(self.np, self.codepath, executable, solution, self.executionpath, dirname, modelname)) 105 105 else: 106 fid.write('{}/{} {} {}/{} {} 106 fid.write('{}/{} {} {}/{} {}'.format(self.codepath, executable, solution, self.executionpath, dirname, modelname)) 107 107 else: 108 108 if IssmConfig('_HAVE_MPI_')[0]: 109 fid.write('mpiexec -np {} {}/{} {} {}/{} {} 2> {}.errlog>{}.outlog'.109 fid.write('mpiexec -np {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog'. 110 110 format(self.np, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname)) 111 111 else: 112 fid.write('{}/{} {} {}/{} {} 2> {}.errlog>{}.outlog '.112 fid.write('{}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '. 113 113 format(self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname)) 114 114 elif isgprof: … … 122 122 123 123 if IssmConfig('_HAVE_MPI_')[0]: 124 fid.write('mpiexec -np {} {} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog>{}.outlog '.124 fid.write('mpiexec -np {} {} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '. 125 125 format(self.np, self.valgrind, supstring, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname)) 126 126 else: 127 fid.write('{} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog>{}.outlog '.127 fid.write('{} --leak-check=full {} {}/{} {} {}/{} {} 2> {}.errlog > {}.outlog '. 128 128 format(self.valgrind, supstring, self.codepath, executable, solution, self.executionpath, dirname, modelname, modelname, modelname)) 129 129 -
issm/trunk-jpl/src/m/classes/clusters/generic_static.py
r24603 r25684 1 import math 2 import os 3 import socket 4 import subprocess 5 1 6 import numpy as np 2 import socket 3 import os 4 import math 5 import subprocess 7 6 8 from IssmConfig import IssmConfig 7 9 from issmdir import issmdir 8 from pairoptions import pairoptions9 10 from issmssh import issmssh 10 11 from issmscpin import issmscpin 11 12 from issmscpout import issmscpout 12 13 import MatlabFuncs as m 14 from pairoptions import pairoptions 13 15 14 16 … … 58 60 def checkconsistency(self, md, solution, analyses): # {{{ 59 61 if self.np < 1: 60 md = checkmessage(md,'number of processors should be at least 1')61 if math.isnan(self.np):62 md = checkmessage(md,'number of processors should not be NaN!')62 md.checkmessage('number of processors should be at least 1') 63 if np.isnan(self.np): 64 md.checkmessage('number of processors should not be NaN!') 63 65 64 66 return md -
issm/trunk-jpl/src/m/dev/devpath.py
r25198 r25684 10 10 if ISSM_DIR is None: 11 11 raise NameError('"ISSM_DIR" environment variable is empty! You should define ISSM_DIR in your .cshrc or .bashrc!') 12 13 # NOTE: Now having user install netcdf4 via pip14 #15 # #Get paths to locally installed Python libraries16 # tpls = [17 # 'cftime', # Needed for netCDF418 # 'netCDF4'19 # ]20 # for tpl in os.listdir(ISSM_DIR + '/externalpackages'):21 # tpl_path = ISSM_DIR + '/externalpackages/' + tpl22 # for dirpath, dirnames, filenames in os.walk(tpl_path):23 # install_lib_path = dirpath + '/install/lib'24 # for dirpath, dirnames, filenames in os.walk(install_lib_path):25 # for dirname in dirnames:26 # if dirname in tpls:27 # dir = dirpath + '/' + dirname28 # for file in os.listdir(dir):29 # if file.find(".py") != -1:30 # if file.find(".pyc") == -1:31 # if dirpath not in sys.path:32 # sys.path.append(dirpath)33 12 34 13 #Go through src/m and append any directory that contains a *.py file to PATH -
issm/trunk-jpl/src/m/mesh/meshintersect3d.py
r25499 r25684 63 63 raise RuntimeError('issue with transition vector having one empty slot') 64 64 65 # Convert results to type 'int' to avoid modifying structures to which they are assigned 65 # Convert results to type 'int' to avoid modifying structures to which 66 # results are assigned 66 67 indices = indices.astype(int) 67 68
Note:
See TracChangeset
for help on using the changeset viewer.