Changeset 4999
- Timestamp:
- 08/05/10 14:55:55 (15 years ago)
- Location:
- issm/trunk
- Files:
-
- 3 added
- 10 edited
Legend:
- Unmodified
- Added
- Removed
-
issm/trunk/test/NightlyRun/runme.m
r4950 r4999 54 54 end 55 55 56 %Get RANK and NUMPROCS for mutlithreaded runs 57 rank=getfieldvalue(options,'rank',1); 58 numprocs=getfieldvalue(options,'numprocs',1); 59 if (numprocs<rank), numprocs=1; end 60 56 61 %GET ids 57 62 list=dir;%use dir, as it seems to act OS independent … … 61 66 strncmpi(fliplr(list(i).name),fliplr('.m'),2)&... %File name must end by '.m' 62 67 ~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) 64 69 end 65 70 end 71 [i1,i2]=parallelrange(rank,numprocs,length(list_ids)); %Get tests for this cpu only 72 list_ids=list_ids(i1:i2); 73 66 74 test_ids=getfieldvalue(options,'id',list_ids); 67 75 test_ids=intersect(test_ids,list_ids); … … 94 102 for k=1:length(field_names), 95 103 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}; 100 109 101 %compare to archive102 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)); 104 113 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 112 134 end 113 135 end … … 119 141 directory=strsplit(pwd,'/'); 120 142 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'); 123 144 fprintf(fid,'%s',message); 145 fprintf(fid,'\n--------------------------------------------\n'); 124 146 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))); 127 148 end 128 149 end -
issm/trunk/test/NightlyRun/test101.m
r4963 r4999 2 2 md=geography(md,'all',''); 3 3 md=parameterize(md,'../Par/SquareShelfConstrained.par'); 4 return 4 5 md=setelementstype(md,'macayeal','all'); 5 6 md.cluster='none'; -
issm/trunk/test/NightlyRun/test111.m
r4963 r4999 5 5 md=setelementstype(md,'macayeal','all'); 6 6 md.cluster='none'; 7 md.prognostic_DG=1 7 md.prognostic_DG=1; 8 8 md=solve(md,'analysis_type',PrognosticSolutionEnum); -
issm/trunk/test/NightlyRun/test112.m
r4963 r4999 5 5 md=setelementstype(md,'macayeal','all'); 6 6 md.cluster=oshostname; 7 md.prognostic_DG=1 7 md.prognostic_DG=1; 8 8 md=solve(md,'analysis_type',PrognosticSolutionEnum); -
issm/trunk/test/Par/79North.par
r4991 r4999 46 46 md.spcthickness(pos,1)=1; 47 47 md.spcthickness(pos,2)=md.thickness(pos); 48 49 %Change name so that no test have the same name 50 A=dbstack; 51 if (length(A)>2), md.name=A(3).file(1:end-2); end -
issm/trunk/test/Par/Pig.par
r4996 r4999 42 42 %Boundary conditions: 43 43 md=SetMarineIceSheetBC(md); 44 45 %Change name so that no test have the same name 46 A=dbstack; 47 if (length(A)==3), md.name=A(3).file(1:end-2); end -
issm/trunk/test/Par/SquareSheetConstrained.par
r4975 r4999 46 46 %Boundary conditions: 47 47 md=SetIceSheetBC(md); 48 49 %Change name so that no test have the same name 50 A=dbstack; 51 if (length(A)>2), md.name=A(3).file(1:end-2); end -
issm/trunk/test/Par/SquareSheetShelf.par
r4996 r4999 53 53 %Deal with boundary conditions: 54 54 md=SetMarineIceSheetBC(md,'./../Exp/SquareFront.exp'); 55 56 %Change name so that no test have the same name 57 A=dbstack; 58 if (length(A)>2), md.name=A(3).file(1:end-2); end -
issm/trunk/test/Par/SquareShelf.par
r4961 r4999 46 46 %Boundary conditions: 47 47 md=SetIceShelfBC(md,'./../Exp/SquareFront.exp'); 48 49 %Change name so that no test have the same name 50 A=dbstack; 51 if (length(A)>2), md.name=A(3).file(1:end-2); end -
issm/trunk/test/Par/SquareShelfConstrained.par
r4975 r4999 50 50 %Deal with boundary conditions: 51 51 md=SetIceShelfBC(md); 52 53 %Change name so that no test have the same name 54 A=dbstack; 55 if (length(A)>2), md.name=A(3).file(1:end-2); end
Note:
See TracChangeset
for help on using the changeset viewer.