0001 function BuildQueueingScriptGeneric(md,solutiontype,executionpath,codepath)
0002
0003
0004
0005
0006
0007
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);