Changeset 1111


Ignore:
Timestamp:
06/25/09 17:51:18 (15 years ago)
Author:
Eric.Larour
Message:

Some gemini cluster management + new geography2 for envelopped diagnostic runs

Location:
issm/trunk/src/m/classes/public
Files:
1 added
12 edited

Legend:

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

    r465 r1111  
    99%First try and figure out if there is a special script for thie particular cluster
    1010function_name=['BuildQueueingScript' md.cluster];
     11
     12%some specific treatment of identical cluster, gemini, castor and pollux
     13if strcmpi(md.cluster,'castor') || strcmpi(md.cluster,'pollux'),
     14        function_name='BuildQueueingScriptgemini';
     15end
     16
    1117if exist(function_name,'file'),
     18
     19       
    1220        %Call this function:
    1321        eval([function_name '(md,executionpath,codepath);']);
  • issm/trunk/src/m/classes/public/BuildQueueingScriptGeneric.m

    r961 r1111  
    1515fprintf(fid,'#!/bin/sh\n');
    1616fprintf(fid,'rm -rf %s/%s.lock\n',executionpath,md.name);
    17 fprintf(fid,'mpirun -np %i ',md.np);
    18 
    19 if strcmpi(md.analysis_type,'diagnostic'),
    20         fprintf(fid,'%s/diagnostic.exe',codepath);
    21 elseif strcmpi(md.analysis_type,'control'),
    22         fprintf(fid,'%s/control.exe',codepath);
    23 elseif strcmpi(md.analysis_type,'thermal'),
    24         fprintf(fid,'%s/thermal.exe',codepath);
    25 elseif strcmpi(md.analysis_type,'prognostic'),
    26         fprintf(fid,'%s/prognostic.exe',codepath);
    27 elseif strcmpi(md.analysis_type,'transient'),
    28         fprintf(fid,'%s/transient.exe',codepath);
    29 else
    30         error('BuildQueueingScriptGeneric error message: unsupported solution type!');
    31 end
    32 
    33 fprintf(fid,' %s %s.bin %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',executionpath,md.name,md.name,md.name,md.name,md.name);
     17fprintf(fid,'mpirun -np %i %s/%s.exe %s %s.bin %s.outbin %s.lock  2> %s.errlog >%s.outlog & ',md.np,codepath,md.analysis_type,executionpath,md.name,md.name,md.name,md.name,md.name);
    3418fclose(fid);
  • issm/trunk/src/m/classes/public/BuildQueueingScriptgemini.m

    r465 r1111  
    1 function BuildQueueingScriptgemini(md,solutiontype,executionpath,codepath)
     1function BuildQueueingScriptgemini(md,executionpath,codepath)
    22%BUILDQUEUEINGSCRIPTGEMINI - ...
    33%
     
    1212end
    1313
    14 fprintf(fid,'#!/bin/sh\n');
    15 fprintf(fid,'#BSUB -n %i -W %i\n',md.np,md.time);
    16 fprintf(fid,'#BSUB -J %s\n',md.name);
     14fprintf(fid,'#!/bin/csh\n');
     15fprintf(fid,'#PBS -l walltime=%i\n',md.time);
     16fprintf(fid,'#PBS -l ncpus=%i\n',md.np);
    1717if ~isempty(md.queue),
    18         fprintf(fid,'#BSUB -q %s\n',md.queue);
     18        fprintf(fid,'#PBS -q %s\n',md.queue);
    1919end
    20 fprintf(fid,'#BSUB -o %s.outlog -e %s.errlog\n',md.name,md.name);
    21 fprintf(fid,'cd %s\n',executionpath);
    22 fprintf(fid,'rm -rf %s.outlog %s.errlog %s.lock\n',md.name,md.name,md.name);
     20fprintf(fid,'#PBS -o %s.outlog \n',md.name);
     21fprintf(fid,'#PBS -e %s.errlog \n',md.name);
    2322
    24 if strcmpi(solutiontype,'diagnostic') ,
    25         fprintf(fid,'mpirun -np %i %s/diagnostic.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name);
    26 elseif strcmpi(solutiontype,'control') ,
    27         fprintf(fid,'mpirun -np %i %s/control.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name);
    28 elseif strcmpi(solutiontype,'thermal') ,
    29         fprintf(fid,'mpirun -np %i %s/thermal.exe %s %s.bin %s.outbin %s.lock',md.np,codepath,executionpath,md.name,md.name,md.name);
    30 else
    31         error('BuildQueueingScriptgemini error message: unsupported solution type!');
    32 end
     23fprintf(fid,'setenv PBS_O_WORKDIR %s\n',executionpath);
     24fprintf(fid,'cd $PBS_O_WORKDIR\n');
     25fprintf(fid,'setenv OMP_NUM_THREADS 1\n');
     26fprintf(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);
     27
    3328fclose(fid);
  • issm/trunk/src/m/classes/public/LaunchQueueJob.m

    r1 r1111  
    77%First try and figure out if there is a special script for thie particular cluster
    88function_name=['LaunchQueueJob' md.cluster];
     9
     10%some specific treatment of identical cluster, gemini, castor and pollux
     11if strcmpi(md.cluster,'castor') || strcmpi(md.cluster,'pollux'),
     12        function_name='LaunchQueueJobgemini';
     13end
     14
     15
     16
    917if exist(function_name,'file'),
    1018        %Call this function:
  • issm/trunk/src/m/classes/public/LaunchQueueJobgemini.m

    r1 r1111  
    1616%jpload both files to cluster
    1717disp('uploading input file,  queueing script and variables script');
    18 eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
     18if md.qmu_analysis,
     19        eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.name '.qmu.in ' md.cluster ':' executionpath]);
     20else
     21        eval(['!scp ' md.name '.bin' ' ' md.name '.queue '  md.cluster ':' executionpath]);
     22end
     23
     24%new gemini cannot launch across cluster using ssh
     25disp(['launch solution sequence on remote cluster by logging into it and typing qsub < ' md.name '.queue']);
     26return;
    1927
    2028disp('launching solution sequence on remote cluster');
     29
    2130%now call the queuing script to launch the job.
    22 system(['ssh  ' md.cluster ' ''cd ' executionpath ' && bsub <  ' md.name '.queue ''']);
     31system(['ssh  ' md.cluster ' ''cd ' executionpath ' && qsub <  ' md.name '.queue ''']);
     32
  • issm/trunk/src/m/classes/public/ThicknessCorrection.m

    r856 r1111  
    3434%modify thickness
    3535for i=1:length(pos_shelf)
     36
     37        if mod(i,100)==0,
     38                fprintf('\b\b\b\b\b\b\b')
     39                fprintf('%5.2f%s',i/length(pos_shelf)*100,' %');
     40        end
     41
    3642        %search the grid on ice sheet the closest to i
    3743        [d posd]=min(sqrt((md.x(pos_shelf(i))-md.x(pos_GL)).^2+(md.y(pos_shelf(i))-md.y(pos_GL)).^2));
  • issm/trunk/src/m/classes/public/displayqmu.m

    r965 r1111  
    8989        if isempty(md.dakotadat), disp(sprintf('         dakotadat: N/A')); else disp(sprintf('         dakotadat:    [%ix%i]    (can be accessed by typing md.dakotadat)',size(md.dakotadat)));end
    9090        disp(sprintf('         npart   : %i (number of partitions for semi-descrete qmu)',md.npart));
     91        disp(sprintf('         part    : [%i] (user provided mesh partition, defaults to metis if not specified)',length(md.part)));
     92
    9193end
  • issm/trunk/src/m/classes/public/ismodelselfconsistent.m

    r966 r1111  
    162162                disp(['concurrency should be set to 1 when running dakota in library mode']);
    163163                bool=0;return;
     164        end
     165        if ~isempty(md.part),
     166                if numel(md.part)~=md.numberofgrids,
     167                        disp(['user supplied partition for qmu analysis should have size md.numberofgrids x 1 ']);
     168                        bool=0;return;
     169                end
     170                if find(md.part)>=md.numberofgrids,
     171                        disp(['user supplied partition should be indexed from 0 (c-convention)']);
     172                        bool=0;return;
     173                end
     174                if md.npart~=md.numberofgrids,
     175                        disp(['user supplied partition should have same size as md.npart']);
     176                        bool=0;return;
     177                end
     178
    164179        end
    165180end
  • issm/trunk/src/m/classes/public/loadresultsfromcluster.m

    r804 r1111  
    2424else
    2525        if md.qmu_analysis,
    26                 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ' executionpath '/' md.name '.qmu.err ' executionpath '/' md.name '.qmu.out ' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files
     26                system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ' md.cluster ':' executionpath '/' md.name '.qmu.err ' md.cluster ':' executionpath '/' md.name '.qmu.out ' md.cluster ':' executionpath '/dakota_tabular.dat ./']); %get outlog, errlog and outbin files
    2727        else
    28                 system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' executionpath '/' md.name '.errlog ' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files
     28                system(['scp ' md.cluster ':' executionpath '/' md.name '.outlog ' md.cluster ':' executionpath '/' md.name '.errlog ' md.cluster ':' executionpath '/' md.name '.outbin ./']); %get outlog, errlog and outbin files
    2929        end
    3030end
  • issm/trunk/src/m/classes/public/marshall.m

    r961 r1111  
    7373
    7474WriteData(fid,md.elementoniceshelf,'Mat','elementoniceshelf');
     75WriteData(fid,md.elementonwater,'Mat','elementonwater');
    7576WriteData(fid,md.gridonicesheet,'Mat','gridonicesheet');
    7677WriteData(fid,md.gridoniceshelf,'Mat','gridoniceshelf');
  • issm/trunk/src/m/classes/public/mesh.m

    r1 r1111  
    7777md.elementonsurface=ones(md.numberofelements,1);
    7878
     79%Now, build the connectivity tables for this mesh.
     80md.nodeconnectivity=NodeConnectivity(md.elements,md.numberofgrids);
     81md.elementconnectivity=ElementConnectivity(md.elements,md.nodeconnectivity);
     82
    7983%outline names
    8084md.domainoutline=readfile(domainname);
  • issm/trunk/src/m/classes/public/setelementstype.m

    r387 r1111  
    127127
    128128%icefront for stokes
    129 md.segmentonneumann_diag_stokes=md.segmentonneumann_diag(find(md.elements_type(md.segmentonneumann_diag(:,end),2)),:);
     129if ~isnan(md.segmentonneumann_diag),
     130        md.segmentonneumann_diag_stokes=md.segmentonneumann_diag(find(md.elements_type(md.segmentonneumann_diag(:,end),2)),:);
     131end
    130132
    131133%figure out solution types
Note: See TracChangeset for help on using the changeset viewer.