Changeset 5954


Ignore:
Timestamp:
09/22/10 13:19:26 (14 years ago)
Author:
Eric.Larour
Message:

New framework for launching a job on different clusters, based on the use of classes for each cluster.

Location:
issm/trunk/src/m
Files:
15 added
6 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/model/ismodelselfconsistent.m

    r5919 r5954  
    167167end
    168168%}}}
    169 %SCALAR
     169%SCALAR {{{
    170170if ~isscalar(md.control_type),
    171171        error('model not consistent: md.control_type should be a scalar');
     
    190190%}}}
    191191%PARALLEL{{{1
    192 if ~strcmpi(md.cluster,'none'),
    193 
    194         %NAN VALUES
    195         fields={'time','np'};
    196         checknan(md,fields);
    197 
    198         %FIELD > 0
    199         fields={'time','np'};
    200         checkgreaterstrict(md,fields,0);
    201 
    202 end
     192md.cluster.IsConsistent;
    203193%}}}
    204194
  • issm/trunk/src/m/model/loadresultsfromcluster.m

    r5905 r5954  
    55%      md=loadresultsfromcluster(md,runtimename);
    66
    7 %Get cluster.rc location
    8 cluster_rc_location=which('cluster.rc');
    9 
    107%Figure out parameters for this particular cluster
    11 [codepath,executionpath,login,port]=ClusterParameters(md.cluster,cluster_rc_location);
     8codepath=md.cluster.codepath;
     9executionpath=md.cluster.executionpath;
     10login=md.cluster.login;
     11port=md.cluster.port;
     12clustername=md.cluster.name;
    1213
    1314if nargin==2,
     
    3738
    3839%copy files from cluster to present directory
    39 issmscpin(md.cluster, login, port, directory, packages);
     40issmscpin(clustername, login, port, directory, packages);
    4041
    4142%read log files onto  fields
     
    6263%erase input file if run was carried out on same platform.
    6364hostname=oshostname();
    64 if strcmpi(hostname,md.cluster),
     65if strcmpi(hostname,clustername),
    6566        if md.qmu_analysis,
    6667                delete([['qmu' num2str(GetPId) '/'] md.name '.bin']);
  • issm/trunk/src/m/model/solve.m

    r5904 r5954  
    4747%If running in parallel, we have a different way of launching the solution
    4848%sequences.
    49 if ~strcmpi(md.cluster,'none'),
     49if ~strcmpi(md.cluster.name,'none'),
    5050        md=solveparallel(md,options);
    5151        return;
  • issm/trunk/src/m/model/solveparallel.m

    r5546 r5954  
    1010md.runtimename=sprintf('%s-%i-%i-%i-%i-%i-%i',md.name,GetPId,c(2),c(3),c(1),c(4),c(5));
    1111
    12 %Get cluster.rc location
    13 cluster_rc_location=which('cluster.rc');
    14 
    15 %Figure out parameters for this particular cluster
    16 [codepath,executionpath,login,port]=ClusterParameters(md.cluster,cluster_rc_location);
    17 
    1812%Marshall model data into a binary file.
    1913marshall(md);
     
    2519
    2620%Now, we need to build the queuing script, used by the cluster to launch the job.
    27 BuildQueueingScript(md,executionpath,codepath);
     21BuildQueueScript(md.cluster,md.name,md.analysis_type,md.mem_debug);
    2822
    2923%Now, launch the queueing script
    30 md=LaunchQueueJob(md,executionpath,login,port,options);
     24LaunchQueueJob(md,options);
    3125
    3226%Do we return, or just wait for results?
    3327if (md.waitonlock~=0 &  ~strcmpi(options.batch,'yes')),
    3428        %we wait for the done file
    35         islock=waitonlock(md,executionpath,login,port);
     29        islock=waitonlock(md);
    3630        if islock==0,
    3731                %no results to be loaded
  • issm/trunk/src/m/model/solvers/solversettoasm.m

    r5903 r5954  
    77%md.petscoptions={{'mat_type','aij'},{'ksp_type','cgs'},{'pc_type','asm'},{sub_mat_type','mumps'},{'sub_pc_type','lu'},{'pc_asm_overlap',4},{'pc_factor_shift_positive_definite','true'}};
    88%md.petscoptions={{'mat_type','aij'},{'ksp_type','cgs'},{'pc_type','asm'},{'sub_pc_type','lu'},{'pc_asm_overlap',4}};
    9 md.petscoptions={{'mat_type','aij'},{'ksp_type','gmres'},{'pc_type','asm'},{'sub_pc_type','lu'},{'pc_asm_overlap',4}};
     9md.petscoptions={{'mat_type','aij'},{'ksp_type','gmres'},{'pc_type','asm'},{'sub_pc_type','lu'},{'pc_asm_overlap',3},{'ksp_max_it',100},{'ksp_rtol',1e-30'}};
  • issm/trunk/src/m/model/waitonlock.m

    r5560 r5954  
    99
    1010%Get filename (lock file) and options
     11executionpath=md.cluster.executionpath;
     12cluster=md.cluster.name;
     13login=md.cluster.login;
     14port=md.cluster.port;
     15timelimit=md.waitonlock;
    1116filename=[executionpath '/' md.runtimename '/' md.name '.lock'];
    12 cluster=md.cluster;
    13 timelimit=md.waitonlock;
    1417
    1518%waitonlock will work if the lock is on the same machine only:
Note: See TracChangeset for help on using the changeset viewer.