Changeset 5963
- Timestamp:
- Nov 17, 2008, 1:47:15 PM (16 years ago)
- Location:
- anuga_core/source/anuga/shallow_water
- Files:
-
- 2 edited
Legend:
- Unmodified
- Added
- Removed
-
anuga_core/source/anuga/shallow_water/test_data_manager.py
r5962 r5963 6079 6079 file = base_name + mux_names[i] 6080 6080 6081 #print "base_name file", file6081 #print 'base_name file', file 6082 6082 f = open(file, 'wb') 6083 6083 files.append(file) … … 6564 6564 6565 6565 for i, q in enumerate(quantities): 6566 #print 6567 #print i, q 6568 6566 6569 q_time = zeros((time_step_count, points_num), Float) 6567 6570 quantities_init[i] = ensure_numeric(quantities_init[i]) … … 6617 6620 for point_i in range(points_num): 6618 6621 if time+1>=first_tstep[point_i] and time+1<=last_tstep[point_i]: 6619 assert abs(q_time[time, point_i]-unpack('f',f.read(4))[0])<epsilon 6622 x = unpack('f',f.read(4))[0] 6623 #print time, x, q_time[time, point_i] 6624 assert abs(q_time[time, point_i]-x)<epsilon 6620 6625 6621 6626 f.close() … … 11043 11048 if __name__ == "__main__": 11044 11049 11045 suite = unittest.makeSuite(Test_Data_Manager,'test')11050 #suite = unittest.makeSuite(Test_Data_Manager,'test') 11046 11051 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsI_beyond_model_time') 11047 11052 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsIV_sinewave_ordering') … … 11052 11057 11053 11058 # FIXME (Ole): This is the test that fails under Windows 11054 #suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem2')11059 suite = unittest.makeSuite(Test_Data_Manager,'test_read_mux_platform_problem2') 11055 11060 #suite = unittest.makeSuite(Test_Data_Manager,'test_file_boundary_stsIV') 11056 11061 -
anuga_core/source/anuga/shallow_water/urs_ext.c
r5937 r5963 436 436 // difference on 11 November 2008. We don't think the problem lies in the 437 437 // C code. Maybe it is a problem with the MUX files written by the unit test 438 // that fails on Windows but works OK on Linux. 439 440 //printf("\nRead %d elements, ", (int) numData); 441 //printf("muxdata[%d]=%f\n", 39, muxData[39]); 442 //for(i = 0; i < (int) numData; i++) 443 //{ 444 // printf("muxdata[%d]=%f\n", i, muxData[i]); 445 //} 438 // that fails on Windows but works OK on Linux. JJ's test on 17th November shows 439 // that as far as Python is concerned this file should be OK on both platforms. 446 440 441 // These printouts are enough to show the problem when compared on the two platforms 442 printf("\nRead %d elements, ", (int) numData); 443 printf("muxdata[%d]=%f\n", 39, muxData[39]); 444 445 /* 446 In Windows we get 447 Read 85 elements, muxdata[39]=0.999574 448 Read 85 elements, muxdata[39]=-0.087599 449 Read 85 elements, muxdata[39]=-0.087599 450 451 I Linux we get (the correct) 452 */ 447 453 448 454 // loop over stations present in the permutation array
Note: See TracChangeset
for help on using the changeset viewer.