BuildQueueingScriptGeneric

PURPOSE ^

BUILDQUEUEINGSCRIPTGENERIC - ...

SYNOPSIS ^

function BuildQueueingScriptGeneric(md,solutiontype,executionpath,codepath)

DESCRIPTION ^

BUILDQUEUEINGSCRIPTGENERIC - ...

   Usage:
      BuildQueueingScriptGeneric(md,executionpath,codepath)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function BuildQueueingScriptGeneric(md,solutiontype,executionpath,codepath)
0002 %BUILDQUEUEINGSCRIPTGENERIC - ...
0003 %
0004 %   Usage:
0005 %      BuildQueueingScriptGeneric(md,executionpath,codepath)
0006 
0007 %Open queuing script file
0008 scriptname=[md.name '.queue'];
0009 
0010 fid=fopen(scriptname,'w');
0011 if fid==-1,
0012     error(['BuildQueueingScriptGenericerror message: could not open ' scriptname ' file for ascii writing']);
0013 end
0014 
0015 fprintf(fid,'#!/bin/sh\n');
0016 fprintf(fid,'rm -rf %s/%s.lock\n',executionpath,md.name);
0017 fprintf(fid,'mpirun -np %i ',md.np);
0018 
0019 if strcmpi(solutiontype,'diagnostic_horiz') |  strcmpi(solutiontype,'diagnostic'),
0020     fprintf(fid,'%s/cielodiagnostic.exe',codepath);
0021 elseif strcmpi(solutiontype,'control'),
0022     fprintf(fid,'%s/cielocontrol.exe',codepath);
0023 elseif strcmpi(solutiontype,'thermalsteady'),
0024     fprintf(fid,'%s/cielothermalsteady.exe',codepath);
0025 else
0026     error('BuildQueueingScriptGeneric error message: unsupported solution type!');
0027 end
0028 
0029 
0030 fprintf(fid,' %s %s.bin %s.outbin %s.lock 2> %s.errlog >%s.outlog & ',executionpath,md.name,md.name,md.name,md.name,md.name);
0031 fclose(fid);

Generated on Sun 29-Mar-2009 20:22:55 by m2html © 2003