BuildQueueingScriptcosmos

PURPOSE ^

BUILDQUEUEINGSCRIPTCOSMOS - ...

SYNOPSIS ^

function BuildQueueingScriptcosmos(md,solutiontype,executionpath,codepath)

DESCRIPTION ^

BUILDQUEUEINGSCRIPTCOSMOS - ...

   Usage:
      BuildQueueingScriptcosmos(md,executionpath,codepath)

CROSS-REFERENCE INFORMATION ^

This function calls: This function is called by:

SOURCE CODE ^

0001 function BuildQueueingScriptcosmos(md,solutiontype,executionpath,codepath)
0002 %BUILDQUEUEINGSCRIPTCOSMOS - ...
0003 %
0004 %   Usage:
0005 %      BuildQueueingScriptcosmos(md,executionpath,codepath)
0006 
0007 scriptname=[md.name '.queue'];
0008 
0009 fid=fopen(scriptname,'w');
0010 if fid==-1,
0011     error(['BuildQueueingScriptcosmoserror message: could not open ' scriptname ' file for ascii writing']);
0012 end
0013 
0014 fprintf(fid,'#!/bin/sh\n');
0015 fprintf(fid,'#BSUB -n %i -W %i\n',md.np,md.time);
0016 if md.exclusive,
0017     fprintf(fid,'#BSUB -x\n');
0018 end
0019 fprintf(fid,'#BSUB -a mpich_gm\n');
0020 fprintf(fid,'#BSUB -J %s\n',md.name);
0021 fprintf(fid,'#BSUB -o %s.outlog -e %s.errlog\n',md.name,md.name);
0022 fprintf(fid,'cd %s\n',executionpath);
0023 fprintf(fid,'rm -rf %s.outlog %s.errlog %s.lock\n',md.name,md.name,md.name);
0024 if md.alloc_cleanup,
0025     fprintf(fid,'mpirun.lsf /home/larour/bin/alloc_cleanup.exe\n');
0026 end
0027 if strcmpi(solutiontype,'diagnostic_horiz') |  strcmpi(solutiontype,'diagnostic'),
0028     fprintf(fid,'mpirun.lsf %s/cielodiagnostic.exe %s %s.bin %s.outbin %s.lock',codepath,executionpath,md.name,md.name,md.name);
0029 elseif strcmpi(solutiontype,'control') ,
0030     fprintf(fid,'mpirun.lsf %s/cielocontrol.exe %s %s.bin %s.outbin %s.lock',codepath,executionpath,md.name,md.name,md.name);
0031 elseif strcmpi(solutiontype,'thermalsteady') ,
0032     fprintf(fid,'mpirun.lsf %s/cielothermalsteady.exe %s %s.bin %s.outbin %s.lock',codepath,executionpath,md.name,md.name,md.name);
0033 else
0034     error('BuildQueueingScriptcosmso error message: unsupported solution type!');
0035 end
0036 fclose(fid);

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