Changeset 12380


Ignore:
Timestamp:
06/07/12 08:05:49 (13 years ago)
Author:
Mathieu Morlighem
Message:

Added BuildKrigingQueueScript (temporary)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/generic.m

    r12371 r12380  
    105105                 end
    106106                 %}}}
     107                 function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
     108
     109                         %write queuing script
     110                         if ~ispc,
     111
     112                                 fid=fopen([modelname '.queue'],'w');
     113                                 fprintf(fid,'#!/bin/sh\n');
     114                                 if ~isvalgrind,
     115                                         if cluster.interactive
     116                                                 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s ',cluster.np,cluster.codepath,cluster.executionpath,modelname);
     117                                         else
     118                                                 fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',cluster.np,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
     119                                         end
     120                                 elseif isgprof,
     121                                         fprintf(fid,'\n gprof %s/kriging.exe gmon.out > %s.performance',cluster.codepath,modelname);
     122                                 else
     123                                         %Add --gen-suppressions=all to get suppression lines
     124                                         fprintf(fid,'LD_PRELOAD=%s \\\n',cluster.valgrindlib);
     125                                         fprintf(fid,'mpiexec -np %i %s --leak-check=full --suppressions=%s %s/kriging.exe %s %s 2> %s.errlog >%s.outlog ',...
     126                                                 cluster.np,cluster.valgrind,cluster.valgrindsup,cluster.codepath,cluster.executionpath,modelname,modelname,modelname);
     127                                 end
     128                                 if ~io_gather, %concatenate the output files:
     129                                         fprintf(fid,'\ncat %s.outbin.* > %s.outbin',modelname,modelname);
     130                                 end
     131                                 fclose(fid);
     132
     133                         else % Windows
     134
     135                                 fid=fopen([modelname '.bat'],'w');
     136                                 fprintf(fid,'@echo off\n');
     137                                 if cluster.interactive
     138                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s ',cluster.codepath,EnumToString(solution),cluster.executionpath,modelname);
     139                                 else
     140                                         fprintf(fid,'"%s/issm.exe" %s "%s" %s 2> %s.errlog >%s.outlog',...
     141                                                 cluster.codepath,EnumToString(solution),cluster.executionpath,modelname,modelname,modelname);
     142                                 end
     143                                 fclose(fid);
     144                         end
     145
     146                         %in interactive mode, create a run file, and errlog and outlog file
     147                         if cluster.interactive,
     148                                 fid=fopen([modelname '.errlog'],'w'); fclose(fid);
     149                                 fid=fopen([modelname '.outlog'],'w'); fclose(fid);
     150                         end
     151                 end
     152                 %}}}
    107153                 function LaunchQueueJob(cluster,modelname,dirname,filelist)% {{{
    108154
Note: See TracChangeset for help on using the changeset viewer.