Changeset 19670
- Timestamp:
- 10/21/15 15:06:14 (9 years ago)
- Location:
- issm/trunk-jpl/src/m
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk-jpl/src/m/classes/clusters/lonestar.m
r19642 r19670 21 21 time = 24*60*60; 22 22 end 23 properties (SetAccess=private)24 np=20*8;25 % }}}26 end27 23 methods 28 24 function cluster=lonestar(varargin) % {{{ … … 33 29 %use provided options to change fields 34 30 cluster=AssignObjectFields(pairoptions(varargin{:}),cluster); 31 35 32 end 36 33 %}}} … … 44 41 disp(sprintf(' numnodes: %i',cluster.numnodes)); 45 42 disp(sprintf(' cpuspernode: %i',cluster.cpuspernode)); 46 disp(sprintf(' np: %i',cluster. cpuspernode*cluster.numnodes));43 disp(sprintf(' np: %i',cluster.np)); 47 44 disp(sprintf(' queue: %s',cluster.queue)); 48 45 disp(sprintf(' codepath: %s',cluster.codepath)); … … 50 47 disp(sprintf(' interactive: %i',cluster.interactive)); 51 48 disp(sprintf(' time: %i',cluster.time)); 49 end 50 %}}} 51 function numprocs=np(cluster) % {{{ 52 %compute number of processors 53 numprocs=cluster.numnodes*cluster.cpuspernode; 52 54 end 53 55 %}}} … … 70 72 if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end 71 73 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 72 73 %compute number of processors74 cluster.np=cluster.numnodes*cluster.cpuspernode;75 74 76 75 %write queuing script … … 99 98 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 100 99 101 %compute number of processors 102 cluster.np=cluster.numnodes*cluster.cpuspernode; 100 executable='issm.exe'; 101 if isdakota, 102 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3)); 103 if (version>=6), 104 executable='issm_dakota.exe'; 105 end 106 end 103 107 104 108 %write queuing script … … 122 126 fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n'); %FIXME 123 127 fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname); 124 fprintf(fid,'mpiexec -np %i %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);128 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 125 129 if ~io_gather, %concatenate the output files: 126 130 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname); … … 131 135 if cluster.interactive, 132 136 fid=fopen([modelname '.run'],'w'); 133 fprintf(fid,'mpiexec -np %i %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);137 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,executable,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 134 138 if ~io_gather, %concatenate the output files: 135 139 fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname); -
issm/trunk-jpl/src/m/classes/clusters/pfe.m
r19638 r19670 26 26 hyperthreading = 0; 27 27 end 28 properties (SetAccess=private)29 np=20*8;30 % }}}31 end32 28 methods 33 29 function cluster=pfe(varargin) % {{{ … … 60 56 end 61 57 %}}} 58 function numprocs=np(cluster) % {{{ 59 %compute number of processors 60 numprocs=cluster.numnodes*cluster.cpuspernode; 61 end 62 %}}} 62 63 function md = checkconsistency(cluster,md,solution,analyses) % {{{ 63 64 … … 116 117 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 117 118 118 %compute number of processors 119 cluster.np=cluster.numnodes*cluster.cpuspernode; 119 executable='issm.exe'; 120 if isdakota, 121 version=IssmConfig('_DAKOTA_VERSION_'); version=str2num(version(1:3)); 122 if (version>=6), 123 executable='issm_dakota.exe'; 124 end 125 end 120 126 121 127 %write queuing script … … 139 145 fprintf(fid,'cd %s/%s/\n\n',cluster.executionpath,dirname); 140 146 if ~isvalgrind, 141 fprintf(fid,'mpiexec -np %i %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);142 else 143 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/' dirname],modelname);147 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 148 else 149 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/' dirname],modelname); 144 150 end 145 151 if ~io_gather, %concatenate the output files: … … 153 159 if cluster.interactive==10, 154 160 fprintf(fid,'module unload mpi-mvapich2/1.4.1/gcc\n'); 155 fprintf(fid,'mpiexec -np %i %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[pwd() '/run'],modelname);161 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[pwd() '/run'],modelname); 156 162 else 157 163 if ~isvalgrind, 158 fprintf(fid,'mpiexec -np %i %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);164 fprintf(fid,'mpiexec -np %i %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname); 159 165 else 160 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/ issm.exe %s %s %s\n',cluster.np,cluster.codepath,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname);166 fprintf(fid,'mpiexec -np %i valgrind --leak-check=full %s/%s %s %s %s\n',cluster.np,cluster.codepath,executable,EnumToString(solution),[cluster.executionpath '/Interactive' num2str(cluster.interactive)],modelname); 161 167 end 162 168 end … … 174 180 175 181 if(isgprof), disp('gprof not supported by cluster, ignoring...'); end 176 177 %compute number of processors178 cluster.np=cluster.numnodes*cluster.cpuspernode;179 182 180 183 %write queuing script -
issm/trunk-jpl/src/m/qmu/dakota_in_write.m
r19656 r19670 85 85 if IssmConfig('_DAKOTA_VERSION_') < 6, 86 86 strategy_write(fidi,params); 87 else 88 environment_write(fidi,params); 87 89 end 88 90 … … 119 121 120 122 fprintf(fidi,'strategy,\n'); 121 fprintf(fidi,'\tsingle_method\n ');123 fprintf(fidi,'\tsingle_method\n\n'); 122 124 param_write(fidi,'\t ','graphics','','\n',params); 123 125 param_write(fidi,'\t ','tabular_graphics_data','','\n',params); 124 126 param_write(fidi,'\t ','tabular_graphics_file',' ''','''\n',params); 125 127 fprintf(fidi,'\n'); 128 129 end 130 131 %% function to write the environment section of the file 132 133 function []=environment_write(fidi,params) 134 135 display('Writing environment section of Dakota input file.'); 136 137 fprintf(fidi,'environment,\n'); 138 param_write(fidi,'\t ','graphics','','\n',params); 139 param_write(fidi,'\t ','tabular_graphics_data','','\n',params); 140 param_write(fidi,'\t ','tabular_graphics_file',' ''','''\n',params); 141 fprintf(fidi,'\n'); 126 142 127 143 end
Note:
See TracChangeset
for help on using the changeset viewer.