Changeset 4999


Ignore:
Timestamp:
08/05/10 14:55:55 (15 years ago)
Author:
Mathieu Morlighem
Message:

Added New nightly runs

Location:
issm/trunk
Files:
3 added
10 edited

Legend:

Unmodified
Added
Removed
  • issm/trunk/test/NightlyRun/runme.m

    r4950 r4999  
    5454end
    5555
     56%Get RANK and NUMPROCS for mutlithreaded runs
     57rank=getfieldvalue(options,'rank',1);
     58numprocs=getfieldvalue(options,'numprocs',1);
     59if (numprocs<rank), numprocs=1; end
     60
    5661%GET ids
    5762list=dir;%use dir, as it seems to act OS independent
     
    6166                        strncmpi(fliplr(list(i).name),fliplr('.m'),2)&...           %File name must end by '.m'
    6267                        ~strncmpi(fliplr(list(i).name),fliplr('_nightly.m'),10)),   %File name end should be different that '_nightly.m'
    63                 list_ids(end+1)=eval(list(i).name(end-4:end-2));             %Keep test id only (3 digits)
     68                list_ids(end+1)=eval(list(i).name(end-4:end-2));               %Keep test id only (3 digits)
    6469        end
    6570end
     71[i1,i2]=parallelrange(rank,numprocs,length(list_ids));               %Get tests for this cpu only
     72list_ids=list_ids(i1:i2);
     73
    6674test_ids=getfieldvalue(options,'id',list_ids);
    6775test_ids=intersect(test_ids,list_ids);
     
    94102                        for k=1:length(field_names),
    95103
    96                                 %Get field and tolerance
    97                                 field=field_values{k};
    98                                 fieldname=field_names{k};
    99                                 tolerance=field_tolerances{k};
     104                                try,
     105                                        %Get field and tolerance
     106                                        field=field_values{k};
     107                                        fieldname=field_names{k};
     108                                        tolerance=field_tolerances{k};
    100109
    101                                 %compare to archive
    102                                 eval(['archive=' archive_name '_field' num2str(k) ';']);
    103                                 error_diff=full(max(abs(archive-field))/(max(abs(archive))+eps));
     110                                        %compare to archive
     111                                        eval(['archive=' archive_name '_field' num2str(k) ';']);
     112                                        error_diff=full(max(abs(archive-field))/(max(abs(archive))+eps));
    104113
    105                                 %disp test result
    106                                 if (error_diff>tolerance);
    107                                         disp(sprintf(['ERROR   difference: %-7.2g > %7.2g test id: %i test name: %s field: %s'],...
    108                                                 error_diff,tolerance,id,Id2Name(id),fieldname));
    109                                 else
    110                                         disp(sprintf(['SUCCESS difference: %-7.2g < %7.2g test id: %i test name: %s field: %s'],...
    111                                                 error_diff,tolerance,id,Id2Name(id),fieldname));
     114                                        %disp test result
     115                                        if (error_diff>tolerance);
     116                                                disp(sprintf(['ERROR   difference: %-7.2g > %7.2g test id: %i test name: %s field: %s'],...
     117                                                        error_diff,tolerance,id,Id2Name(id),fieldname));
     118                                        else
     119                                                disp(sprintf(['SUCCESS difference: %-7.2g < %7.2g test id: %i test name: %s field: %s'],...
     120                                                        error_diff,tolerance,id,Id2Name(id),fieldname));
     121                                        end
     122
     123                                catch me2
     124
     125                                        %something went wrong, print failure message:
     126                                        directory=strsplit(pwd,'/');
     127                                        message=getReport(me2)
     128                                        fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
     129                                        fprintf(fid,'%s',message);
     130                                        fprintf(fid,'\n--------------------------------------------\n');
     131                                        fclose(fid);
     132                                        disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: %s'],id,Id2Name(id),fieldname));
     133
    112134                                end
    113135                        end
     
    119141                directory=strsplit(pwd,'/');
    120142                message=getReport(me)
    121                 fid=fopen([ISSM_DIR '/test/Verification/NightlyRun/matlaberror.log'], 'at');
    122                 fprintf(fid,'\n\nMatlab error occured in: %s\n\n',directory{end});
     143                fid=fopen([ISSM_DIR '/TEMP/matlaberror.log'], 'at');
    123144                fprintf(fid,'%s',message);
     145                fprintf(fid,'\n--------------------------------------------\n');
    124146                fclose(fid);
    125                 %disp(sprintf(['\nFAILURE test: %s analysis_type: %s sub_analysis_type: %s qmu: %i control: %i control_fit: %s parallel: %i\n'],...
    126                         %testname,EnumAsString(analysis_type),EnumAsString(sub_analysis_type),qmu,control,control_fit,parallel));
     147                disp(sprintf(['FAILURE difference: N/A test id: %i test name: %s field: N/A'],id,Id2Name(id)));
    127148        end
    128149end
  • issm/trunk/test/NightlyRun/test101.m

    r4963 r4999  
    22md=geography(md,'all','');
    33md=parameterize(md,'../Par/SquareShelfConstrained.par');
     4return
    45md=setelementstype(md,'macayeal','all');
    56md.cluster='none';
  • issm/trunk/test/NightlyRun/test111.m

    r4963 r4999  
    55md=setelementstype(md,'macayeal','all');
    66md.cluster='none';
    7 md.prognostic_DG=1
     7md.prognostic_DG=1;
    88md=solve(md,'analysis_type',PrognosticSolutionEnum);
  • issm/trunk/test/NightlyRun/test112.m

    r4963 r4999  
    55md=setelementstype(md,'macayeal','all');
    66md.cluster=oshostname;
    7 md.prognostic_DG=1
     7md.prognostic_DG=1;
    88md=solve(md,'analysis_type',PrognosticSolutionEnum);
  • issm/trunk/test/Par/79North.par

    r4991 r4999  
    4646md.spcthickness(pos,1)=1;
    4747md.spcthickness(pos,2)=md.thickness(pos);
     48
     49%Change name so that no test have the same name
     50A=dbstack;
     51if (length(A)>2), md.name=A(3).file(1:end-2); end
  • issm/trunk/test/Par/Pig.par

    r4996 r4999  
    4242%Boundary conditions:
    4343md=SetMarineIceSheetBC(md);
     44
     45%Change name so that no test have the same name
     46A=dbstack;
     47if (length(A)==3), md.name=A(3).file(1:end-2); end
  • issm/trunk/test/Par/SquareSheetConstrained.par

    r4975 r4999  
    4646%Boundary conditions:
    4747md=SetIceSheetBC(md);
     48
     49%Change name so that no test have the same name
     50A=dbstack;
     51if (length(A)>2), md.name=A(3).file(1:end-2); end
  • issm/trunk/test/Par/SquareSheetShelf.par

    r4996 r4999  
    5353%Deal with boundary conditions:
    5454md=SetMarineIceSheetBC(md,'./../Exp/SquareFront.exp');
     55
     56%Change name so that no test have the same name
     57A=dbstack;
     58if (length(A)>2), md.name=A(3).file(1:end-2); end
  • issm/trunk/test/Par/SquareShelf.par

    r4961 r4999  
    4646%Boundary conditions:
    4747md=SetIceShelfBC(md,'./../Exp/SquareFront.exp');
     48
     49%Change name so that no test have the same name
     50A=dbstack;
     51if (length(A)>2), md.name=A(3).file(1:end-2); end
  • issm/trunk/test/Par/SquareShelfConstrained.par

    r4975 r4999  
    5050%Deal with boundary conditions:
    5151md=SetIceShelfBC(md);
     52
     53%Change name so that no test have the same name
     54A=dbstack;
     55if (length(A)>2), md.name=A(3).file(1:end-2); end
Note: See TracChangeset for help on using the changeset viewer.