Changeset 1268


Ignore:
Timestamp:
07/08/09 20:06:39 (16 years ago)
Author:
Eric.Larour
Message:

Better handling of queuing on gemini altix clusters using PBS

Location:
issm/trunk/src/m/classes/public
Files:
7 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/src/m/classes/public/BuildQueueingScriptgemini.m

    r1111 r1268  
    1212end
    1313
    14 fprintf(fid,'#!/bin/csh\n');
    15 fprintf(fid,'#PBS -l walltime=%i\n',md.time);
     14fprintf(fid,'#!/bin/sh\n');
     15fprintf(fid,'#PBS -l walltime=%i\n',md.time*60); %walltime is in seconds.
    1616fprintf(fid,'#PBS -l ncpus=%i\n',md.np);
    1717if ~isempty(md.queue),
     
    2121fprintf(fid,'#PBS -e %s.errlog \n',md.name);
    2222
    23 fprintf(fid,'setenv PBS_O_WORKDIR %s\n',executionpath);
     23fprintf(fid,'export PBS_O_WORKDIR=%s\n',executionpath);
    2424fprintf(fid,'cd $PBS_O_WORKDIR\n');
    25 fprintf(fid,'setenv OMP_NUM_THREADS 1\n');
     25fprintf(fid,'export OMP_NUM_THREADS=1\n');
    2626fprintf(fid,'mpirun -np %i %s/%s.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,md.analysis_type,executionpath,md.name,md.name,md.name);
    2727
  • issm/trunk/src/m/classes/public/LaunchQueueJob.m

    r1111 r1268  
    1 function LaunchQueueJob(md,executionpath)
     1function md=LaunchQueueJob(md,executionpath,options)
    22%LAUNCHQUEUEJOB - ...
    33%
     
    1717if exist(function_name,'file'),
    1818        %Call this function:
    19         eval([function_name '(md,executionpath);']);
     19        eval(['md=' function_name '(md,executionpath,options);']);
    2020else
    2121        %Call the generic LaunchQueueJob:
    22         LaunchQueueJobGeneric(md,executionpath);
     22        md=LaunchQueueJobGeneric(md,executionpath,options);
    2323end
  • issm/trunk/src/m/classes/public/LaunchQueueJobGeneric.m

    r804 r1268  
    1 function LaunchQueueJobGeneric(md,executionpath)
     1function md=LaunchQueueJobGeneric(md,executionpath,options)
    22%LAUNCHQUEUEJOBGENERIC - ...
    33%
  • issm/trunk/src/m/classes/public/LaunchQueueJobcosmos.m

    r1 r1268  
    1 function LaunchQueueJobcosmos(md,executionpath)
     1function md=LaunchQueueJobcosmos(md,executionpath,options)
    22%LAUNCHQUEUEJOBCOSMOS - ...
    33%
  • issm/trunk/src/m/classes/public/LaunchQueueJobgemini.m

    r1111 r1268  
    1 function LaunchQueueJobgemini(md,executionpath)
     1function md=LaunchQueueJobgemini(md,executionpath,options)
    22%LAUNCHQUEUEJOBGEMINI - ...
    33%
     
    1515
    1616%jpload both files to cluster
    17 disp('uploading input file,  queueing script and variables script');
    18 if md.qmu_analysis,
    19         eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
     17if ~strcmpi(options.batch,'yes'),
     18        disp('uploading input file,  queueing script and variables script');
     19        if md.qmu_analysis,
     20                eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
     21        else
     22                eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
     23        end
    2024else
    21         eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
     25        disp('batch mode requested: not launching job interactively');
    2226end
    2327
    2428%new gemini cannot launch across cluster using ssh
    2529disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
    26 return;
    27 
    28 disp('launching solution sequence on remote cluster');
    29 
    30 %now call the queuing script to launch the job.
    31 system(['ssh  ' md.cluster ' ''cd ' executionpath ' && qsub <  ' md.name '.queue ''']);
    32 
     30md.waitonlock=0;
  • issm/trunk/src/m/classes/public/process_solve_options.m

    r961 r1268  
    5353        end
    5454end
     55
     56%batch mode for launching jobs.
     57found=0;
     58for i=1:size(options,1),
     59        if strcmpi(options{i,1},'batch'),
     60                batch=options{i,2};
     61                found=1;
     62        end
     63end
     64if ~found
     65        batch='no';
     66end
     67
    5568
    5669%check solution type is supported
     
    131144outoptions.iparams=iparams;
    132145outoptions.runmpi=runmpi;
     146outoptions.batch=batch;
  • issm/trunk/src/m/classes/public/solveparallel.m

    r965 r1268  
    2323
    2424%Now, launch the queueing script
    25 LaunchQueueJob(md,executionpath);
     25md=LaunchQueueJob(md,executionpath,options);
    2626
    2727%Do we return, or just wait for results?
Note: See TracChangeset for help on using the changeset viewer.