Changeset 22666


Ignore:
Timestamp:
04/03/18 14:20:05 (7 years ago)
Author:
seroussi
Message:

NEW: added functions in generic cluster for ice/ocean coupling

File:
1 edited

Legend:

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

    r22618 r22666  
    1111                login         = '';
    1212                np            = 1;
     13                npocean       = 1;
    1314                port          = 0;
    1415                interactive   = 1;
     
    5253                        disp(sprintf('    login: %s',cluster.login));
    5354                        disp(sprintf('    np: %i',cluster.np));
     55                        disp(sprintf('    npocean: %i',cluster.npocean));
    5456                        disp(sprintf('    port: %i',cluster.port));
    5557                        disp(sprintf('    codepath: %s',cluster.codepath));
     
    209211                end
    210212                %}}}
     213                function BuildQueueScriptIceOcean(cluster,dirname,modelname,solution,io_gather,isvalgrind,isgprof,isdakota) % {{{
     214
     215                        %write queuing script
     216                        %what is the executable being called?
     217                        executable='issm_ocean.exe';
     218
     219                        fid=fopen([modelname '.queue'],'w');
     220                        fprintf(fid,'#!%s\n',cluster.shell);
     221                        fprintf(fid,'mpiexec -np %i %s/%s %s %s %s : -np %i ./mitgcmuv\n',cluster.np,cluster.codepath,executable,solution,cluster.executionpath,modelname,cluster.npocean);
     222                        fclose(fid);
     223
     224                        %in interactive mode, create a run file, and errlog and outlog file
     225                        if cluster.interactive,
     226                                fid=fopen([modelname '.errlog'],'w'); fclose(fid);
     227                                fid=fopen([modelname '.outlog'],'w'); fclose(fid);
     228                        end
     229                end
     230                %}}}
    211231                function BuildKrigingQueueScript(cluster,modelname,solution,io_gather,isvalgrind,isgprof) % {{{
    212232
     
    295315                                        launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
    296316                                                ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
     317                                        else
     318                                        launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
     319                                                ' && cd ' dirname ' && mv ../' dirname '.tar.gz ./ && tar -zxf ' dirname '.tar.gz '];
     320                                        end
     321                                end
     322                                issmssh(cluster.name,cluster.login,cluster.port,launchcommand);
     323                        else
     324                                system([modelname '.bat']);
     325                        end
     326
     327                end %}}}
     328                function LaunchQueueJobIceOcean(cluster,modelname,dirname,filelist,restart,batch)% {{{
     329
     330                        if ~ispc,
     331
     332                                %figure out what shell extension we will use:
     333                                if isempty(strfind(cluster.shell,'csh')),
     334                                        shellext='sh';
     335                                else
     336                                        shellext='csh';
     337                                end
     338
     339                                if cluster.verbose, disp('launching solution sequence on remote cluster'); end
     340
     341                                if ~isempty(restart)
     342                                        launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && cd ' dirname ' && source ' modelname '.queue '];
     343                                else
     344                                        if ~batch,
     345                                        launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && tar -zxf ' dirname '.tar.gz  && source  ' modelname '.queue '];
    297346                                        else
    298347                                        launchcommand=['source ' cluster.etcpath '/environment.' shellext ' && cd ' cluster.executionpath ' && rm -rf ./' dirname ' && mkdir ' dirname ...
Note: See TracChangeset for help on using the changeset viewer.