Changeset 265 for trunk/src


Ignore:
Timestamp:
Nov 3, 2011, 5:26:12 PM (12 years ago)
Author:
gostiaux
Message:

Jobs sent by packets of 6 to the LEGI cluster

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/civ.m

    r263 r265  
    15611561                    'SelectionMode','single',...
    15621562                    'ListString',str,'ListSize',[200 100],'Name','job priority','InitialValue',3);
     1563                pvalue=num2str((1-ind_answer)*500); %
     1564               
    15631565                if isequal(v,0) % to handle Cancel button and figure close,
    15641566                    errormsg='job cancelled';
     
    16331635    case 'Matlab'
    16341636        if batch
    1635             %% vérifier Mtlab installé sur le cluster
     1637            %% vï¿œrifier Mtlab installï¿œ sur le cluster
    16361638        end         
    16371639end
     
    17381740%% MAIN LOOP
    17391741time=get(handles.RootName,'UserData'); %get the set of times
     1742
    17401743super_cmd=[];
    1741 
     1744   
    17421745for ifile=1:nbfield
    17431746    for j=1:nbslice
     
    19361939        end
    19371940        if box_test(4)==1 || box_test(5)==1 || box_test(6)==1
    1938             filename_cmx=filecell.nc.civ2{ifile,j};%output netcdf file
     1941 %                 pvalue=num2str((1-ind_answer)*500);
     1942           filename_cmx=filecell.nc.civ2{ifile,j};%output netcdf file
    19391943            filename_cmx(end-1:end+1)='cmx';%name of cmx file
    19401944        end
     
    21222126                if batch
    21232127                    switch batch_mode
    2124                         case 'sge'
    2125                             pvalue=num2str((1-ind_answer)*500);
     2128                        case 'sge'                           
    21262129                            display(['!qsub -p ' pvalue ' -q civ.q -e ' flname '.errors -o ' flname '.log' ' ' filename_bat]);
    21272130                            eval(  ['!qsub -p ' pvalue ' -q civ.q -e ' flname '.errors -o ' flname '.log' ' ' filename_bat]);
    21282131                        case 'oar'
    2129                             eval(  ['!chmod +x ' filename_bat]);
    2130                             eval(  ['!oarsub -n CIVX -l /core=1,walltime=00:10:00  ' filename_bat]);
     2132%                             eval(  ['!chmod +x ' filename_bat]);
     2133%                             %eval(  ['!oarsub -n CIVX -l /core=1,walltime=00:10:00  ' filename_bat]);                   
     2134%                             eval(  ['!oarsub -n CIVX -l "/core=1+{type = ''smalljob''}/licence=1,walltime=00:10:00"   ' filename_bat]);
     2135
     2136                    cmd_str=['. ' filename_bat];
     2137                    super_cmd{length(super_cmd)+1}=cmd_str;
     2138                           
    21312139                    end
    21322140                else
     
    22232231end
    22242232
     2233if batch
     2234    switch batch_mode
     2235        case 'oar'
     2236            l=length(super_cmd)
     2237            for p=0:floor(l/6);
     2238               
     2239                filename_superbat=fullfile(Rootbat,['job_list_' num2str(p) '.bat']);
     2240                fid=fopen(filename_superbat,'w');
     2241                if fid==-1
     2242                    msgbox_uvmat('ERROR',['cannot create the command file ' filename_superbat])
     2243                    return
     2244                end
     2245                if p==floor(l/6)
     2246                    kmax=mod(l,6);
     2247                else
     2248                    kmax=6;
     2249                end
     2250                for k=1:kmax
     2251                    fprintf(fid,[super_cmd{p*6+k} '\n']);
     2252                end
     2253                fclose(fid);
     2254                if(isunix)
     2255                    system(['chmod +x ' filename_superbat]);
     2256                end
     2257               
     2258                eval(  ['!oarsub -n CIVX -l "/core=1+{type = ''smalljob''}/licence=1,walltime=00:10:00"   ' filename_superbat]);
     2259            end
     2260    end
     2261end
     2262           
     2263
    22252264if ~batch && ~isequal(CivMode,'Matlab')
    22262265    [Rootbat,Filebat,extbat]=fileparts(filename_bat);
Note: See TracChangeset for help on using the changeset viewer.