0001 function md=solveparallel(md,solutiontype,varargin)
0002
0003
0004
0005
0006
0007
0008 if nargin==2,
0009 package='Ice';
0010 else
0011 package=varargin{1};
0012 end
0013
0014 if ~ischar(package),
0015 error('Package specified in varargin can only be ''ice'', or ''cielo''');
0016 end
0017
0018 if ~(strcmpi(package,'ice') || strcmpi(package,'cielo') || strcmpi(package,'macayeal'))
0019 error('Package specified in varargin can only be ''ice'', ''macayeal'', or ''cielo''');
0020 end
0021
0022
0023 cielo_rc_location=which('cielo.rc');
0024
0025
0026 [codepath,executionpath]=ProcessParallelParametersFromCieloRc(md.cluster,cielo_rc_location);
0027
0028
0029 marshall(md,solutiontype,package);
0030
0031
0032 BuildQueueingScript(md,solutiontype,executionpath,codepath);
0033
0034
0035 LaunchQueueJob(md,executionpath);
0036
0037
0038 if md.waitonlock,
0039
0040 waitonlock([executionpath '/' md.name '.lock']);
0041
0042 md=loadresultsfromcluster(md,solutiontype);
0043 else
0044 return;
0045 end