Changeset 25377


Ignore:
Timestamp:
08/11/20 19:12:22 (5 years ago)
Author:
Mathieu Morlighem
Message:

NEW: added maui

File:
1 copied

Legend:

Unmodified
Added
Removed
  • issm/trunk-jpl/src/m/classes/clusters/maui.m

    r25340 r25377  
    1 %PFE class definition
     1%MAUI class definition
    22%
    33%   Usage:
    4 %      cluster=greenplanet();
    5 %      cluster=greenplanet('np',3);
    6 %      cluster=greenplanet('np',3,'login','username');
     4%      cluster=maui();
     5%      cluster=maui('np',3);
     6%      cluster=maui('np',3,'login','username');
    77
    8 classdef greenplanet
     8classdef maui
    99    properties (SetAccess=public) 
    1010                 % {{{
    11                  name          = 'greenplanet'
     11                 name          = 'maui'
    1212                 login         = '';
    1313                 numnodes      = 20;
    1414                 cpuspernode   = 8;
    1515                 port          = 8000;
    16                  queue         = 'c6145';
     16                 projectaccount = '';
     17                 partition     = '';
    1718                 codepath      = '';
    1819                 executionpath = '';
     
    2324         %}}}
    2425         methods
    25                  function cluster=greenplanet(varargin) % {{{
     26                 function cluster=maui(varargin) % {{{
    2627
    2728                         %initialize cluster using default settings if provided
    28                          if (exist('greenplanet_settings')==2), greenplanet_settings; end
     29                         if (exist('maui_settings')==2), maui_settings; end
    2930
    3031                         %use provided options to change fields
     
    4142                         disp(sprintf('    cpuspernode: %i',cluster.cpuspernode));
    4243                         disp(sprintf('    np: %i',cluster.cpuspernode*cluster.numnodes));
    43                          disp(sprintf('    queue: %s',cluster.queue));
     44                         disp(sprintf('    projectaccount: %s',cluster.projectaccount));
     45                         disp(sprintf('    partition: %s',cluster.partition));
    4446                         disp(sprintf('    codepath: %s',cluster.codepath));
    4547                         disp(sprintf('    executionpath: %s',cluster.executionpath));
     
    5658                 function md = checkconsistency(cluster,md,solution,analyses) % {{{
    5759
    58                          available_queues={'c6145','ilg2.3','default'};
    59                          queue_requirements_time=[Inf Inf];
    60                          queue_requirements_np=[80 80];
     60                         available_queues={'large','long','prepost','bigmem','hugemem','gpu'};
     61                         partition_requirements_time=[3*24*60 3*7*24*60 3*60 3*24*60 3*24*60 3*24*60];
     62                         partition_requirements_np=[1024 720 4 72 64 4];
    6163
    62                          QueueRequirements(available_queues,queue_requirements_time,queue_requirements_np,cluster.queue,cluster.np,1)
     64                         QueueRequirements(available_partitions,partition_requirements_time,partition_requirements_np,cluster.partition,cluster.np,1)
    6365
    6466                         %Miscelaneous
     
    6668                         if isempty(cluster.codepath), md = checkmessage(md,'codepath empty'); end
    6769                         if isempty(cluster.executionpath), md = checkmessage(md,'executionpath empty'); end
    68 
    6970                 end
    7071                 %}}}
    7172                 function BuildKrigingQueueScript(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota,isoceancoupling) % {{{
    72 
    73                          if(isvalgrind), disp('valgrind not supported by cluster, ignoring...'); end
    74                          if(isgprof),    disp('gprof not supported by cluster, ignoring...'); end
    75 
    76                          %write queuing script
    77                          fid=fopen([modelname '.queue'],'w');
    78                          fprintf(fid,'#!/bin/bash\n');
    79                          fprintf(fid,'#SBATCH --job-name=%s\n',modelname);
    80                          fprintf(fid,'#SBATCH -p %s \n',cluster.queue);
    81                          fprintf(fid,'#SBATCH -N %i -n %i\n',cluster.numnodes,cluster.cpuspernode);
    82                          fprintf(fid,'#SBATCH --time=%i\n',cluster.time*60); %walltime is in seconds.
    83                          fprintf(fid,'#SBATCH --mem-per-cpu=%igb\n',cluster.memory);
    84                          fprintf(fid,'#SBATCH -o %s.outlog \n',modelname);
    85                          fprintf(fid,'#SBATCH -e %s.errlog \n\n',modelname);
    86                          fprintf(fid,'export ISSM_DIR="%s/../"\n',cluster.codepath); %FIXME
    87                          fprintf(fid,'source $ISSM_DIR/etc/environment.sh\n');       %FIXME
    88                          fprintf(fid,'cd %s/%s\n\n',cluster.executionpath,dirname);
    89                          fprintf(fid,'mpiexec -np %i %s/kriging.exe %s %s\n',cluster.np,cluster.codepath,[cluster.executionpath '/' modelname],modelname);
    90                          if ~io_gather, %concatenate the output files:
    91                                  fprintf(fid,'cat %s.outbin.* > %s.outbin',modelname,modelname);
    92                          end
    93                          fclose(fid);
     73                         error('not implemented yet');
    9474                 end
    9575                 %}}}
     
    10383                         fprintf(fid,'#!/bin/bash\n');
    10484                         fprintf(fid,'#SBATCH --job-name=%s\n',modelname);
    105                          fprintf(fid,'#SBATCH -p %s \n',cluster.queue);
     85                         fprintf(fid,'#SBATCH --account=%s \n',cluster.projectaccount);
    10686                         fprintf(fid,'#SBATCH -N %i -n %i\n',cluster.numnodes,cluster.cpuspernode);
    10787                         fprintf(fid,'#SBATCH --time=%i\n',cluster.time*60); %walltime is in seconds.
Note: See TracChangeset for help on using the changeset viewer.