moab-dev
Threads by month
- ----- 2026 -----
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2025 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2024 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2023 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2022 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2021 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2020 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2019 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2018 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2017 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2016 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2015 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2014 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2013 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2012 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2011 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2010 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2009 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2008 -----
- December
- November
- October
- September
- August
- July
- June
- May
- April
- March
- February
- January
- ----- 2007 -----
- December
- November
- October
- September
- August
- July
- June
April 2014
- 6 participants
- 50 discussions
commit/MOAB: danwu: Removed some unwanted warnings for unit tests in directory test/dagmc.
by commits-noreply@bitbucket.org 28 Apr '14
by commits-noreply@bitbucket.org 28 Apr '14
28 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/0c3c2a8253a1/
Changeset: 0c3c2a8253a1
Branch: master
User: danwu
Date: 2014-04-28 19:40:42
Summary: Removed some unwanted warnings for unit tests in directory test/dagmc.
Affected #: 3 files
diff --git a/test/dagmc/dagmc_pointinvol_test.cpp b/test/dagmc/dagmc_pointinvol_test.cpp
index 47ee7c1..a859b65 100644
--- a/test/dagmc/dagmc_pointinvol_test.cpp
+++ b/test/dagmc/dagmc_pointinvol_test.cpp
@@ -26,7 +26,6 @@ static const char input_file[] = STRINGIFY(MESHDIR) "/dagmc/test_geom.h5m";
static const char input_file[] = STRINGIFY(MESHDIR) "/dagmc/test_geom.h5m";
#endif
-
void dagmc_setup_test()
{
ErrorCode rval = DAG->load_file(input_file); // open the Dag file
@@ -34,250 +33,247 @@ void dagmc_setup_test()
rval = DAG->init_OBBTree();
CHECK_ERR(rval);
+ /*
int num_vols = DAG->num_entities(3);
EntityHandle vol;
- for ( int i = 0 ; i < num_vols ; i++ )
- {
- vol = DAG->entity_by_index(3,i);
- }
+ for (int i = 0; i < num_vols; i++)
+ vol = DAG->entity_by_index(3, i);
+ */
//EntityHandle volume = 12682136550675316765;
- //CHECK_EQUAL(volume,vol);
+ //CHECK_EQUAL(volume, vol);
}
void dagmc_point_in()
{
int result = 0;
- int expected_result=1;
- double xyz[3]={0.0,0.0,0.0};
- int vol_idx=1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- ErrorCode rval = DAG->point_in_volume(vol_h,xyz,result);
+ int expected_result = 1;
+ double xyz[3] = {0.0, 0.0, 0.0};
+ int vol_idx = 1;
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ ErrorCode rval = DAG->point_in_volume(vol_h, xyz, result);
CHECK_ERR(rval);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
-int dagmc_point_in_vol_dir(double origin[3],double dir[3],int vol_idx)
+int dagmc_point_in_vol_dir(double origin[3], double dir[3], int vol_idx)
{
int result = 0;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
double xyz[3];
double next_surf_dist;
EntityHandle next_surf;
// normalise the vector
- double dir_norm = (dir[0]*dir[0])+(dir[1]*dir[1])+(dir[2]*dir[2]);
+ double dir_norm = (dir[0]*dir[0]) + (dir[1]*dir[1]) + (dir[2]*dir[2]);
- dir[0]=dir[0]/sqrt(dir_norm);
- dir[1]=dir[1]/sqrt(dir_norm);
- dir[2]=dir[2]/sqrt(dir_norm);
+ dir[0] = dir[0] / sqrt(dir_norm);
+ dir[1] = dir[1] / sqrt(dir_norm);
+ dir[2] = dir[2] / sqrt(dir_norm);
- ErrorCode rval = DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist);
-
- xyz[0]=origin[0]+(next_surf_dist*dir[0]);
- xyz[1]=origin[1]+(next_surf_dist*dir[1]);
- xyz[2]=origin[2]+(next_surf_dist*dir[2]);
+ ErrorCode rval = DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist);
+
+ xyz[0] = origin[0] + (next_surf_dist*dir[0]);
+ xyz[1] = origin[1] + (next_surf_dist*dir[1]);
+ xyz[2] = origin[2] + (next_surf_dist*dir[2]);
std::cout << xyz[0] << " " << xyz[1] << " " << xyz[2] << std::endl;
- rval = DAG->point_in_volume(vol_h,xyz,result,dir);
+ rval = DAG->point_in_volume(vol_h, xyz, result, dir);
CHECK_ERR(rval);
return result;
}
void dagmc_point_in_vol_1()
{
- double dir[3]={ -1.0,0.0,0.0};
- double origin[3]={0.0,0.0,0.0};
- int vol_idx=1;
- int expected_result=1;
-
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
- CHECK_EQUAL(expected_result,result);
+ double dir[3] = {-1.0, 0.0, 0.0};
+ double origin[3] = {0.0, 0.0, 0.0};
+ int vol_idx = 1;
+ int expected_result = 1;
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_in_vol_2()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 1.0,0.0,0.0};
- double origin[3]={0.0,0.0,0.0};
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {1.0, 0.0, 0.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_in_vol_3()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 0.0,-1.0,0.0};
- double origin[3]={0.0,0.0,0.0};
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {0.0, -1.0, 0.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_in_vol_4()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 0.0,1.0,0.0};
- double origin[3]={0.0,0.0,0.0};
-
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {0.0, 1.0, 0.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- CHECK_EQUAL(expected_result,result);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_in_vol_5()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 0.0,0.0,-1.0};
- double origin[3]={0.0,0.0,0.0};
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {0.0, 0.0, -1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_in_vol_6()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 0.0,0.0,1.0};
- double origin[3]={0.0,0.0,0.0};
-
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {0.0, 0.0, 1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- CHECK_EQUAL(expected_result,result);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_1()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ 1.0,1.0,1.0};
- double origin[3]={0.0,0.0,0.0};
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {1.0, 1.0, 1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_2()
{
- int expected_result=1;
- int vol_idx=1;
- double dir[3]={ -1.0,1.0,1.0};
- double origin[3]={0.0,0.0,0.0};
+ int expected_result = 1;
+ int vol_idx = 1;
+ double dir[3] = {-1.0, 1.0, 1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_3()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ 1.0,1.0,-1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {1.0, 1.0, -1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_4()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ -1.0,1.0,-1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {-1.0, 1.0, -1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_5()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ 1.0,-1.0,1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {1.0, -1.0, 1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_6()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ -1.0,-1.0,1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {-1.0, -1.0, 1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_7()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ 1.0,-1.0,-1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {1.0, -1.0, -1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
void dagmc_point_on_corner_8()
{
int expected_result = 1;
- int vol_idx=1;
- double dir[3]={ -1.0,-1.0,-1.0};
- double origin[3]={0.0,0.0,0.0};
+ int vol_idx = 1;
+ double dir[3] = {-1.0, -1.0, -1.0};
+ double origin[3] = {0.0, 0.0, 0.0};
- int result = dagmc_point_in_vol_dir(origin,dir,vol_idx);
+ int result = dagmc_point_in_vol_dir(origin, dir, vol_idx);
- CHECK_EQUAL(expected_result,result);
+ CHECK_EQUAL(expected_result, result);
}
int main(int /* argc */, char** /* argv */)
{
int result = 0;
- result += RUN_TEST( dagmc_setup_test ); // setup problem
- result += RUN_TEST( dagmc_point_in ); // point in centre
+ result += RUN_TEST(dagmc_setup_test); // setup problem
+ result += RUN_TEST(dagmc_point_in); // point in centre
// rays fired along cardinal directions
- result += RUN_TEST( dagmc_point_in_vol_1); // point in centre
- result += RUN_TEST( dagmc_point_in_vol_2); // point in centre
- result += RUN_TEST( dagmc_point_in_vol_3); // point in centre
- result += RUN_TEST( dagmc_point_in_vol_4); // point in centre
- result += RUN_TEST( dagmc_point_in_vol_5); // point in centre
- result += RUN_TEST( dagmc_point_in_vol_6); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_1); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_2); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_3); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_4); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_5); // point in centre
+ result += RUN_TEST(dagmc_point_in_vol_6); // point in centre
// rays fired at nodes
- result += RUN_TEST( dagmc_point_on_corner_1);
- result += RUN_TEST( dagmc_point_on_corner_2);
- result += RUN_TEST( dagmc_point_on_corner_3);
- result += RUN_TEST( dagmc_point_on_corner_4);
-
- // result += RUN_TEST( dagmc_point_in({0.0,0.0,5.0}); // point in centre
- // result += RUN_TEST( dagmc_point_in({0.0,0.0,-5.0}); // point in centre
- // result += RUN_TEST( dagmc_point_in({0.0,5.0,0.0}); // point in centre
- // result += RUN_TEST( dagmc_point_in({0.0,-5.0,0.0}); // point in centre
- // result += RUN_TEST( dagmc_point_in({5.0,0.0,0.0}); // point in centre
- // result += RUN_TEST( dagmc_point_in({-5.0,0.0,0.0}); // point in centre
+ result += RUN_TEST(dagmc_point_on_corner_1);
+ result += RUN_TEST(dagmc_point_on_corner_2);
+ result += RUN_TEST(dagmc_point_on_corner_3);
+ result += RUN_TEST(dagmc_point_on_corner_4);
+
+ //result += RUN_TEST(dagmc_point_in({0.0, 0.0, 5.0}); // point in centre
+ //result += RUN_TEST(dagmc_point_in({0.0, 0.0, -5.0}); // point in centre
+ //result += RUN_TEST(dagmc_point_in({0.0, 5.0, 0.0}); // point in centre
+ //result += RUN_TEST(dagmc_point_in({0.0, -5.0, 0.0}); // point in centre
+ //result += RUN_TEST(dagmc_point_in({5.0, 0.0, 0.0}); // point in centre
+ //result += RUN_TEST(dagmc_point_in({-5.0, 0.0, 0.0}); // point in centre
return result;
}
diff --git a/test/dagmc/dagmc_rayfire_test.cpp b/test/dagmc/dagmc_rayfire_test.cpp
index 57aa625..ba5f309 100644
--- a/test/dagmc/dagmc_rayfire_test.cpp
+++ b/test/dagmc/dagmc_rayfire_test.cpp
@@ -35,80 +35,80 @@ void dagmc_setup_test()
rval = DAG->init_OBBTree();
CHECK_ERR(rval);
+ /*
int num_vols = DAG->num_entities(3);
EntityHandle vol_h;
- for ( int i = 0 ; i < num_vols ; i++ )
- {
- vol_h = DAG->entity_by_index(3,i);
- }
+ for (int i = 0; i < num_vols; i++)
+ vol_h = DAG->entity_by_index(3, i);
+ */
// EntityHandle volume = 12682136550675316765;
- // CHECK_EQUAL(volume,vol);
+ // CHECK_EQUAL(volume, vol);
}
void dagmc_origin_face_rayfire()
{
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={-1.0,0.0,0.0};
- double origin[3]={0.0,0.0,0.0};
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {-1.0, 0.0, 0.0};
+ double origin[3] = {0.0, 0.0, 0.0};
double next_surf_dist;
EntityHandle next_surf;
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist);
- double expected_next_surf_dist=5.0;
- CHECK_REAL_EQUAL(expected_next_surf_dist,next_surf_dist,eps);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist);
+ double expected_next_surf_dist = 5.0;
+ CHECK_REAL_EQUAL(expected_next_surf_dist, next_surf_dist, eps);
}
void dagmc_outside_face_rayfire()
{
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={1.0,0.0,0.0}; // ray along x direction
- double origin[3]={-10.0,0.0,0.0}; // origin at -10 0 0
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {1.0, 0.0, 0.0}; // ray along x direction
+ double origin[3] = {-10.0, 0.0, 0.0}; // origin at -10 0 0
double next_surf_dist;
EntityHandle next_surf;
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist);
std::cout << next_surf_dist << std::endl;
- double expected_next_surf_dist=15.0;
- CHECK_REAL_EQUAL(expected_next_surf_dist,next_surf_dist,eps);
+ double expected_next_surf_dist = 15.0;
+ CHECK_REAL_EQUAL(expected_next_surf_dist, next_surf_dist, eps);
}
void dagmc_outside_face_rayfire_orient_exit()
{
DagMC::RayHistory history;
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={1.0,0.0,0.0}; // ray along x direction
- double origin[3]={-10.0,0.0,0.0}; // origin at -10 0 0
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {1.0, 0.0, 0.0}; // ray along x direction
+ double origin[3] = {-10.0, 0.0, 0.0}; // origin at -10 0 0
double next_surf_dist;
EntityHandle next_surf;
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist, &history, 0, 1);
std::cout << next_surf_dist << std::endl;
- double expected_next_surf_dist=15.0;
- CHECK_REAL_EQUAL(expected_next_surf_dist,next_surf_dist,eps);
+ double expected_next_surf_dist = 15.0;
+ CHECK_REAL_EQUAL(expected_next_surf_dist, next_surf_dist, eps);
}
void dagmc_outside_face_rayfire_orient_entrance()
{
DagMC::RayHistory history;
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={1.0,0.0,0.0}; // ray along x direction
- double origin[3]={-10.0,0.0,0.0}; // origin at -10 0 0
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {1.0, 0.0, 0.0}; // ray along x direction
+ double origin[3] = {-10.0, 0.0, 0.0}; // origin at -10 0 0
double next_surf_dist;
EntityHandle next_surf;
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist,&history,0.0,-1);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist, &history, 0.0, -1);
std::cout << next_surf_dist << std::endl;
- double expected_next_surf_dist=5.0;
- CHECK_REAL_EQUAL(expected_next_surf_dist,next_surf_dist,eps);
+ double expected_next_surf_dist = 5.0;
+ CHECK_REAL_EQUAL(expected_next_surf_dist, next_surf_dist, eps);
}
void dagmc_outside_face_rayfire_history_fail()
{
DagMC::RayHistory history;
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={1.0,0.0,0.0}; // ray along x direction
- double origin[3]={-10.0,0.0,0.0}; // origin at -10 0 0
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {1.0, 0.0, 0.0}; // ray along x direction
+ double origin[3] = {-10.0, 0.0, 0.0}; // origin at -10 0 0
double xyz[3];
double next_surf_dist;
EntityHandle next_surf;
@@ -119,62 +119,60 @@ void dagmc_outside_face_rayfire_history_fail()
// needs two ray_fires to cross, this is expected and ok
// first ray fire with history
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist, &history, 0, 1);
// second ray fire with history
- DAG->ray_fire(vol_h,xyz,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1);
// this fire should hit graveyard, i.e. next_surf = 0
- DAG->ray_fire(vol_h,xyz,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1);
// using history with this geom, there should be no next surface, i.e. 0
EntityHandle ZERO = 0;
- CHECK_EQUAL(ZERO ,next_surf);
+ CHECK_EQUAL(ZERO, next_surf);
}
void dagmc_outside_face_rayfire_history()
{
DagMC::RayHistory history;
int vol_idx = 1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- double dir[3]={1.0,0.0,0.0}; // ray along x direction
- double origin[3]={-10.0,0.0,0.0}; // origin at -10 0 0
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ double dir[3] = {1.0, 0.0, 0.0}; // ray along x direction
+ double origin[3] = {-10.0, 0.0, 0.0}; // origin at -10 0 0
double xyz[3];
double next_surf_dist;
EntityHandle next_surf;
history.reset();
// first ray fire with history
- DAG->ray_fire(vol_h,origin,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, origin, dir, next_surf, next_surf_dist, &history, 0, 1);
std::cout << next_surf << " " << history.size() << std::endl;
// second ray fire with history
- xyz[0]=origin[0]+(next_surf_dist*dir[0]);
- xyz[1]=origin[1]+(next_surf_dist*dir[1]);
- xyz[2]=origin[2]+(next_surf_dist*dir[2]);
+ xyz[0] = origin[0] + (next_surf_dist*dir[0]);
+ xyz[1] = origin[1] + (next_surf_dist*dir[1]);
+ xyz[2] = origin[2] + (next_surf_dist*dir[2]);
// ray fired execacyl
- DAG->ray_fire(vol_h,xyz,dir,next_surf,next_surf_dist,&history,0,1);
-
- DAG->ray_fire(vol_h,xyz,dir,next_surf,next_surf_dist,&history,0,1);
+ DAG->ray_fire(vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1);
+ DAG->ray_fire(vol_h, xyz, dir, next_surf, next_surf_dist, &history, 0, 1);
// using history with this geom, there should be no next surface, i.e. 0
EntityHandle ZERO = 0;
- CHECK_EQUAL(ZERO ,next_surf);
+ CHECK_EQUAL(ZERO, next_surf);
}
-
int main(int /* argc */, char** /* argv */)
{
int result = 0;
- result += RUN_TEST( dagmc_setup_test ); // setup problem
+ result += RUN_TEST(dagmc_setup_test); // setup problem
// rays fired along cardinal directions
- result += RUN_TEST( dagmc_origin_face_rayfire ); // point in centre
- result += RUN_TEST( dagmc_outside_face_rayfire );
- result += RUN_TEST( dagmc_outside_face_rayfire_orient_exit ); // fire ray from point outside volume looking for exit intersections
- result += RUN_TEST( dagmc_outside_face_rayfire_orient_entrance ); // fire ray from point outside volume looking for entrance intersection
- result += RUN_TEST( dagmc_outside_face_rayfire_history_fail ); // fire ray from point outside geometry using ray history
- result += RUN_TEST( dagmc_outside_face_rayfire_history ); // fire ray from point outside geometry using ray history
+ result += RUN_TEST(dagmc_origin_face_rayfire); // point in centre
+ result += RUN_TEST(dagmc_outside_face_rayfire);
+ result += RUN_TEST(dagmc_outside_face_rayfire_orient_exit); // fire ray from point outside volume looking for exit intersections
+ result += RUN_TEST(dagmc_outside_face_rayfire_orient_entrance); // fire ray from point outside volume looking for entrance intersection
+ result += RUN_TEST(dagmc_outside_face_rayfire_history_fail); // fire ray from point outside geometry using ray history
+ result += RUN_TEST(dagmc_outside_face_rayfire_history); // fire ray from point outside geometry using ray history
return result;
}
diff --git a/test/dagmc/dagmc_simple_test.cpp b/test/dagmc/dagmc_simple_test.cpp
index bf253f6..b2a44eb 100644
--- a/test/dagmc/dagmc_simple_test.cpp
+++ b/test/dagmc/dagmc_simple_test.cpp
@@ -26,7 +26,6 @@ static const char input_file[] = STRINGIFY(MESHDIR) "/dagmc/test_geom.h5m";
static const char input_file[] = STRINGIFY(MESHDIR) "/dagmc/test_geom.h5m";
#endif
-
void dagmc_load_file()
{
ErrorCode rval = DAG->load_file(input_file); // open the Dag file
@@ -41,97 +40,101 @@ void dagmc_build_obb()
void dagmc_num_vols()
{
- int expect_num_vols=2;
+ int expect_num_vols = 2;
int num_vols = DAG->num_entities(3);
- CHECK_EQUAL(expect_num_vols,num_vols);
+ CHECK_EQUAL(expect_num_vols, num_vols);
}
void dagmc_entity_handle()
{
- int num_vols = DAG->num_entities(3);
+ /*
+ int num_vols = DAG->num_entities(3);
EntityHandle vol_h;
- for ( int i = 0 ; i < num_vols ; i++ )
- {
- vol_h = DAG->entity_by_index(3,i);
- }
+ for (int i = 0; i < num_vols; i++)
+ vol_h = DAG->entity_by_index(3, i);
+ */
//EntityHandle expect_vol_h = 12682136550675316765;
- //CHECK_EQUAL(expect_vol_h,vol_h);
+ //CHECK_EQUAL(expect_vol_h, vol_h);
}
void dagmc_point_in()
{
int result = 0;
- int expect_result=1;
- int vol_idx=1;
- double xyz[3]={0.0,0.0,0.0};
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- ErrorCode rval = DAG->point_in_volume(vol_h,xyz,result);
- CHECK_EQUAL(expect_result,result);
+ int expect_result = 1;
+ int vol_idx = 1;
+ double xyz[3] = {0.0, 0.0, 0.0};
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ ErrorCode rval = DAG->point_in_volume(vol_h, xyz, result);
+ CHECK_ERR(rval);
+ CHECK_EQUAL(expect_result, result);
}
void dagmc_rayfire()
{
const double eps = 1e-6; // epsilon for test, faceting tol?
- int vol_idx=1;
+ int vol_idx = 1;
// note model is cube of side 10, centred at 0,0,0, so ray fire along
// any unit direction should be exactly 5.0
- double xyz[3]={0.0,0.0,0.0};
- double dir[3]={0.0,0.0,1.0};
+ double xyz[3] = {0.0, 0.0, 0.0};
+ double dir[3] = {0.0, 0.0, 1.0};
EntityHandle next_surf;
double next_surf_dist;
- double expect_next_surf_dist=5.0;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
+ double expect_next_surf_dist = 5.0;
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
- ErrorCode rval = DAG->ray_fire(vol_h,xyz,dir,next_surf,next_surf_dist);
- CHECK_REAL_EQUAL(expect_next_surf_dist,next_surf_dist,eps);
+ ErrorCode rval = DAG->ray_fire(vol_h, xyz, dir, next_surf, next_surf_dist);
+ CHECK_ERR(rval);
+ CHECK_REAL_EQUAL(expect_next_surf_dist, next_surf_dist, eps);
}
void dagmc_closest_to()
{
const double eps = 1e-6; // epsilon for test, faceting tol?
- int vol_idx=1;
+ int vol_idx = 1;
// note model is cube of side 10, centred at 0,0,0, so ray fire along
// any unit direction should be exactly 5.0
- double xyz[3]={-6.0,0.0,0.0};
+ double xyz[3] = {-6.0, 0.0, 0.0};
double distance; // distance from point to nearest surface
- double expect_distance=1.0;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
+ double expect_distance = 1.0;
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
- ErrorCode rval = DAG->closest_to_location(vol_h,xyz,distance);
+ ErrorCode rval = DAG->closest_to_location(vol_h, xyz, distance);
+ CHECK_ERR(rval);
// distance should be 1.0 cm
- CHECK_REAL_EQUAL(expect_distance,distance,eps);
+ CHECK_REAL_EQUAL(expect_distance, distance, eps);
}
void dagmc_test_boundary()
{
- int vol_idx=1;
- EntityHandle vol_h = DAG->entity_by_index(3,vol_idx);
- int surf_idx=1;
- EntityHandle surf_h = DAG->entity_by_index(2,surf_idx);
+ int vol_idx = 1;
+ EntityHandle vol_h = DAG->entity_by_index(3, vol_idx);
+ int surf_idx = 1;
+ EntityHandle surf_h = DAG->entity_by_index(2, surf_idx);
- double xyz[3]={0.0,0.0,5.0};
- double dir[3]={0.0,0.0,1.0};
+ double xyz[3] = {0.0, 0.0, 5.0};
+ double dir[3] = {0.0, 0.0, 1.0};
int result;
- int expect_result=0;
+ int expect_result = 0;
- ErrorCode rval = DAG->test_volume_boundary(vol_h,surf_h,xyz,dir,result);
+ ErrorCode rval = DAG->test_volume_boundary(vol_h, surf_h, xyz, dir, result);
+ CHECK_ERR(rval);
// check ray leaving volume
- CHECK_EQUAL(expect_result,result);
+ CHECK_EQUAL(expect_result, result);
}
int main(int /* argc */, char** /* argv */)
{
int result = 0;
- result += RUN_TEST( dagmc_load_file ); // test ray fire
- result += RUN_TEST( dagmc_build_obb ); // build the obb
- result += RUN_TEST( dagmc_num_vols ); // make sure the num of vols correct
- // result += RUN_TEST( dagmc_entity_handle); // check the entity handle correct
- result += RUN_TEST( dagmc_point_in); // check entity by point
- result += RUN_TEST( dagmc_rayfire ) ; // ensure ray fire distance is correct
- result += RUN_TEST( dagmc_closest_to ); // check the distance to surface nearest point
- result += RUN_TEST( dagmc_test_boundary ); // check particle entering leaving
+ result += RUN_TEST(dagmc_load_file); // test ray fire
+ result += RUN_TEST(dagmc_build_obb); // build the obb
+ result += RUN_TEST(dagmc_num_vols); // make sure the num of vols correct
+ // result += RUN_TEST(dagmc_entity_handle); // check the entity handle correct
+ result += RUN_TEST(dagmc_point_in); // check entity by point
+ result += RUN_TEST(dagmc_rayfire); // ensure ray fire distance is correct
+ result += RUN_TEST(dagmc_closest_to); // check the distance to surface nearest point
+ result += RUN_TEST(dagmc_test_boundary); // check particle entering leaving
return result;
}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: iulian07: spelling errors on h5m file format
by commits-noreply@bitbucket.org 26 Apr '14
by commits-noreply@bitbucket.org 26 Apr '14
26 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/9a1a77fa8215/
Changeset: 9a1a77fa8215
Branch: master
User: iulian07
Date: 2014-04-26 22:42:26
Summary: spelling errors on h5m file format
Affected #: 1 file
diff --git a/src/io/mhdf/include/mhdf.h b/src/io/mhdf/include/mhdf.h
index db36d63..b602bdf 100644
--- a/src/io/mhdf/include/mhdf.h
+++ b/src/io/mhdf/include/mhdf.h
@@ -67,7 +67,7 @@ extern "C" {
* named \c max_id . This attribute, if present, should contain the
* value of the largest entity ID used internally to the file. It can
* be used to verify that the code reading the file is using an integer
- * type of sufficient size to accomodate the entity IDs.
+ * type of sufficient size to accommodate the entity IDs.
*
* The \c tstt group contains four sub-groups, a datatype object, and a
* dataset object. The four sub-groups are: \c nodes, \c elements,
@@ -101,12 +101,12 @@ extern "C" {
*
* The \c coordinates
* DataSet contains the coordinates of all vertices in the mesh.
- * The DataSet should contain floating point values and have a dimenions
+ * The DataSet should contain floating point values and have a dimensions
* \f$ n \times d \f$, where \c n is the number of vertices and \c d
* is the number of coordinate values for each vertex.
*
- * The \c coodinates DataSet must have an integer attribute named \c start_id .
- * The vertices are then defined to have IDs begining with this value
+ * The \c coordinates DataSet must have an integer attribute named \c start_id .
+ * The vertices are then defined to have IDs beginning with this value
* and increasing sequentially in the order that they are defined in the
* \c coordinates table.
*
@@ -128,7 +128,7 @@ extern "C" {
* optional subgroup named \c tags. The \c tags subgroup is described in the
* \ref Dense "section on dense tag storage".
*
- * The \c connectivty DataSet is an \f$ n \times m \f$ array of integer
+ * The \c connectivity DataSet is an \f$ n \times m \f$ array of integer
* values. The DataSet contains one row for each of the \c n contained
* elements, where the connectivity of each element contains \c m IDs. For
* all element types supported by MOAB, with the exception of polyhedra,
@@ -146,14 +146,14 @@ extern "C" {
* The \c sets group contains the definitions of any entity sets stored
* in the file. It contains 1 to 4 DataSets and the optional \c tags
* subgroup. The \c contents, \c parents, and \c children data sets
- * are one dimensional arrays containing the concatenation of of the
+ * are one dimensional arrays containing the concatenation of the
* corresponding lists for all of the sets represented in the file.
*
* The \c lists DataSet is a \f$ n \times 4 \f$ table, having one
* row of four integer values for each set. The first three values
* for each set are the indices into the \c contents, \c children,
* and \c parents DataSets, respectively, at which the \em last value
- * for the set is stored. The contents, child, and parent lists for
+ * for set is stored. The contents, child, and parent lists for
* sets are stored in the corresponding datasets in the same order as
* the sets are listed in the \c lists DataSet, such that the index of
* the first value in one of those tables is one greater than the
@@ -168,7 +168,7 @@ extern "C" {
* stored at position 0 of the \c parents DataSet and the second at position
* 1.
*
- * The fourth colum of the \c lists DataSet is a series of bit flags
+ * The fourth column of the \c lists DataSet is a series of bit flags
* defining some properties of the sets. The four bit values currently
* defined are:
* - 0x1 owner
@@ -180,7 +180,7 @@ extern "C" {
* data set, that the contents list for the corresponding set is stored
* using a single range compression. Rather than storing the IDs of the
* contained entities individually, each ID \c i is followed by a count
- * \c n indicating that the set contains the cotiguous range of IDs
+ * \c n indicating that the set contains the contiguous range of IDs
* \f$ [i, i+n-1] \f$.
*
* The three least significant bits specify intended properties of the
@@ -208,16 +208,16 @@ extern "C" {
* may also be stored in the "dense" format as described in the
* \ref Dense "section on dense tag storage".
*
- * Each sub-group of the \c tags group contains the defintion for
+ * Each sub-group of the \c tags group contains the definition for
* a single tag. The name of each sub-group is the name of the
* corresponding tag. Non-printable characters, characters
* prohibited in group names in the HDF5 file format, and the
* backslash ('\') character are encoded
* in the name string by a backslash ('\') character followed by
- * the ASCII value of the character expressed as a pair of hexidecimal
+ * the ASCII value of the character expressed as a pair of hexadecimal
* digits. Thus the backslash character would be represented as \c \5C .
* Each tag group should also contain a comment which contains the
- * unenconded tag name.
+ * unencoded tag name.
*
* The tag sub-group may have any or all of the following four attributes:
* \c default, \c global, \c is_handle, and \c variable_length.
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: danwu: Added two test cases to write_nc for MPAS. As the output file does not contain mesh information, variables will be checked without using NC reader.
by commits-noreply@bitbucket.org 25 Apr '14
by commits-noreply@bitbucket.org 25 Apr '14
25 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/8139ed1b1957/
Changeset: 8139ed1b1957
Branch: ncwriter
User: danwu
Date: 2014-04-25 20:44:40
Summary: Added two test cases to write_nc for MPAS. As the output file does not contain mesh information, variables will be checked without using NC reader.
Affected #: 3 files
diff --git a/test/io/Makefile.am b/test/io/Makefile.am
index fffcbb4..6463d0a 100644
--- a/test/io/Makefile.am
+++ b/test/io/Makefile.am
@@ -91,5 +91,6 @@ MOSTLYCLEANFILES = dumped_acis.sat \
singlecyl_tmp.ccmg \
test_eul_T.nc \
test_fv_T.nc \
- test_homme_T.nc
+ test_homme_T.nc \
+ test_mpas_vars.nc
diff --git a/test/io/write_nc.cpp b/test/io/write_nc.cpp
index 8f87063..2d9bdae 100644
--- a/test/io/write_nc.cpp
+++ b/test/io/write_nc.cpp
@@ -9,11 +9,13 @@ static const char example_eul[] = STRINGIFY(MESHDIR) "/io/camEul26x48x96.t3.nc";
static const char example_fv[] = STRINGIFY(MESHDIR) "/io/fv26x46x72.t.3.nc";
static const char example_homme[] = STRINGIFY(MESHDIR) "/io/homme26x3458.t.3.nc";
static const char example_homme_mapping[] = STRINGIFY(MESHDIR) "/io/HommeMapping.nc";
+static const char example_mpas[] = STRINGIFY(MESHDIR) "/io/mpasx1.642.t.2.nc";
#else
static const char example_eul[] = "/io/camEul26x48x96.t3.nc";
static const char example_fv[] = "/io/fv26x46x72.t.3.nc";
static const char example_homme[] = "/io/homme26x3458.t.3.nc";
static const char example_homme_mapping[] = "/io/HommeMapping.nc";
+static const char example_mpas[] = "/io/mpasx1.642.t.2.nc";
#endif
#ifdef USE_MPI
@@ -21,6 +23,16 @@ static const char example_homme_mapping[] = "/io/HommeMapping.nc";
#include "moab/ParallelComm.hpp"
#endif
+#ifdef PNETCDF_FILE
+#include "pnetcdf.h"
+#define NCFUNC(func) ncmpi_ ## func
+#define NCDF_SIZE MPI_Offset
+#else
+#include "netcdf.h"
+#define NCFUNC(func) nc_ ## func
+#define NCDF_SIZE size_t
+#endif
+
// CAM-EUL
void test_eul_read_write_T();
void test_eul_check_T();
@@ -33,9 +45,14 @@ void test_fv_check_T();
void test_homme_read_write_T();
void test_homme_check_T();
+// MPAS
+void test_mpas_read_write_vars();
+void test_mpas_check_vars();
+
void get_eul_read_options(std::string& opts);
void get_fv_read_options(std::string& opts);
void get_homme_read_options(std::string& opts);
+void get_mpas_read_options(std::string& opts);
int main(int argc, char* argv[])
{
@@ -55,6 +72,8 @@ int main(int argc, char* argv[])
result += RUN_TEST(test_fv_check_T);
result += RUN_TEST(test_homme_read_write_T);
result += RUN_TEST(test_homme_check_T);
+ //result += RUN_TEST(test_mpas_read_write_vars);
+ //result += RUN_TEST(test_mpas_check_vars);
#ifdef USE_MPI
fail = MPI_Finalize();
@@ -507,6 +526,115 @@ void test_homme_check_T()
}
}
+void test_mpas_read_write_vars()
+{
+ int procs = 1;
+#ifdef USE_MPI
+ MPI_Comm_size(MPI_COMM_WORLD, &procs);
+#endif
+
+// We will not test NC writer in parallel without pnetcdf support
+#ifndef PNETCDF_FILE
+ if (procs > 1)
+ return;
+#endif
+
+ Core moab;
+ Interface& mb = moab;
+
+ std::string read_opts;
+ get_mpas_read_options(read_opts);
+
+ EntityHandle set;
+ ErrorCode rval = mb.create_meshset(MESHSET_SET, set);
+ CHECK_ERR(rval);
+
+ // Load non-set variable u, non-set variable ke, non-set variable vorticity, and the mesh
+ read_opts += ";DEBUG_IO=0;VARIABLE=u,ke,vorticity";
+ if (procs > 1)
+ read_opts += ";PARALLEL_RESOLVE_SHARED_ENTS";
+ rval = mb.load_file(example_mpas, &set, read_opts.c_str());
+ CHECK_ERR(rval);
+
+ // Write variables u, ke and vorticity (no mesh information)
+ std::string write_opts = ";;VARIABLE=u,ke,vorticity;DEBUG_IO=0;";
+#ifdef USE_MPI
+ // Use parallel options
+ write_opts += std::string(";PARALLEL=WRITE_PART");
+#endif
+ if (procs > 1)
+ rval = mb.write_file("test_par_mpas_vars.nc", 0, write_opts.c_str(), &set, 1);
+ else
+ rval = mb.write_file("test_mpas_vars.nc", 0, write_opts.c_str(), &set, 1);
+ CHECK_ERR(rval);
+}
+
+// Check variables without using NC reader (the output file does not contain mesh information)
+// For the time being, we only check cell variable ke
+void test_mpas_check_vars()
+{
+ int rank = 0;
+ int procs = 1;
+#ifdef USE_MPI
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
+ MPI_Comm_size(MPI_COMM_WORLD, &procs);
+#endif
+
+// We will not test NC writer in parallel without pnetcdf support
+#ifndef PNETCDF_FILE
+ if (procs > 1)
+ return;
+#endif
+
+ if (0 == rank) {
+ int ncid, varid;
+ int success;
+ const double eps = 1e-10;
+
+ std::string filename;
+ if (procs > 1)
+ filename = "test_mpas_vars.nc";
+ else
+ filename = "test_par_mpas_vars.nc";
+
+#ifdef PNETCDF_FILE
+ success = NCFUNC(open)(MPI_COMM_SELF, filename.c_str(), NC_NOWRITE, MPI_INFO_NULL, &ncid);
+#else
+ success = NCFUNC(open)(filename.c_str(), NC_NOWRITE, &ncid);
+#endif
+ CHECK_EQUAL(0, success);
+
+ success = NCFUNC(inq_varid)(ncid, "ke", &varid);
+ CHECK_EQUAL(0, success);
+
+#ifdef PNETCDF_FILE
+ // Enter independent I/O mode
+ success = NCFUNC(begin_indep_data)(ncid);
+ CHECK_EQUAL(0, success);
+#endif
+
+ NCDF_SIZE start[] = {0, 0, 0};
+ NCDF_SIZE count[] = {1, 642, 1};
+ double vals[642];
+ success = NCFUNC(get_vara_double)(ncid, varid, start, count, vals);
+ CHECK_EQUAL(0, success);
+
+#ifdef PNETCDF_FILE
+ // End independent I/O mode
+ success = NCFUNC(end_indep_data)(ncid);
+ CHECK_EQUAL(0, success);
+#endif
+
+ CHECK_REAL_EQUAL(15.001, vals[0], eps);
+ CHECK_REAL_EQUAL(15.012, vals[11], eps);
+ CHECK_REAL_EQUAL(16.013, vals[12], eps);
+ CHECK_REAL_EQUAL(16.642, vals[641], eps);
+
+ success = NCFUNC(close)(ncid);
+ CHECK_EQUAL(0, success);
+ }
+}
+
void get_eul_read_options(std::string& opts)
{
#ifdef USE_MPI
@@ -536,3 +664,17 @@ void get_homme_read_options(std::string& opts)
opts = ";;";
#endif
}
+
+void get_mpas_read_options(std::string& opts)
+{
+#ifdef USE_MPI
+ // Use parallel options
+#ifdef HAVE_ZOLTAN
+ opts = ";;PARALLEL=READ_PART;PARTITION_METHOD=RCBZOLTAN";
+#else
+ opts = ";;PARALLEL=READ_PART;PARTITION_METHOD=TRIVIAL";
+#endif
+#else
+ opts = ";;";
+#endif
+}
diff --git a/test/parallel/Makefile.am b/test/parallel/Makefile.am
index 59c39c3..8a11dd1 100644
--- a/test/parallel/Makefile.am
+++ b/test/parallel/Makefile.am
@@ -123,4 +123,5 @@ MOSTLYCLEANFILES = mhdf_ll.h5m tmp0.h5m tmp1.h5m tmp2.h5m tmp3.h5m \
test_mpas_rcbzoltan_no_mixed_elements.h5m \
test_par_eul_T.nc \
test_par_fv_T.nc \
- test_par_homme_T.nc
+ test_par_homme_T.nc \
+ test_par_mpas_vars.nc
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: danwu: Updated NC writer for HOMME. Only the root processor should write coordinates used by requested variables.
by commits-noreply@bitbucket.org 24 Apr '14
by commits-noreply@bitbucket.org 24 Apr '14
24 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/ee109806ef41/
Changeset: ee109806ef41
Branch: ncwriter
User: danwu
Date: 2014-04-24 23:51:24
Summary: Updated NC writer for HOMME. Only the root processor should write coordinates used by requested variables.
Affected #: 1 file
diff --git a/src/io/NCWriteHOMME.cpp b/src/io/NCWriteHOMME.cpp
index 36ea5c7..9320f62 100644
--- a/src/io/NCWriteHOMME.cpp
+++ b/src/io/NCWriteHOMME.cpp
@@ -148,38 +148,7 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
std::set<std::string>& dummyVarNames = _writeNC->dummyVarNames;
std::map<std::string, WriteNC::VarData>& varInfo = _writeNC->varInfo;
- // Start with coordinates
- for (std::set<std::string>::iterator setIt = usedCoordinates.begin();
- setIt != usedCoordinates.end(); ++setIt) {
- const std::string& coordName = *setIt;
-
- // Skip dummy coordinate variables (e.g. ncol)
- if (dummyVarNames.find(coordName) != dummyVarNames.end())
- continue;
-
- std::map<std::string, WriteNC::VarData>::iterator vit = varInfo.find(coordName);
- if (vit == varInfo.end())
- ERRORR(MB_FAILURE, "Can't find one coordinate variable.");
-
- WriteNC::VarData& varCoordData = vit->second;
-
- int success = 0;
- switch (varCoordData.varDataType) {
- case NC_DOUBLE:
- success = NCFUNCAP(_vara_double)(_fileId, varCoordData.varId, &varCoordData.writeStarts[0],
- &varCoordData.writeCounts[0], (double*)(varCoordData.memoryHogs[0]));
- ERRORS(success, "Failed to write double data.");
- break;
- case NC_INT:
- success = NCFUNCAP(_vara_int)(_fileId, varCoordData.varId, &varCoordData.writeStarts[0],
- &varCoordData.writeCounts[0], (int*)(varCoordData.memoryHogs[0]));
- ERRORS(success, "Failed to write int data.");
- break;
- default:
- success = 1;
- break;
- }
- }
+ int success;
// Now look at requested var_names; if they have time, we will have a list, and write one at a time
// Need to transpose from lev dimension
@@ -193,7 +162,10 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
WriteNC::VarData& variableData = vit->second;
int numTimeSteps = (int)variableData.varTags.size();
if (variableData.has_tsteps) {
- // Get entities of this variable
+ // Time should be the first dimension
+ assert(tDim == variableData.varDims[0]);
+
+ // Assume this variable is on vertices for the time being
switch (variableData.entLoc) {
case WriteNC::ENTLOCVERT:
// Vertices
@@ -223,7 +195,6 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
#endif
// Now write from memory directly
- int success = 0;
switch (variableData.varDataType) {
case NC_DOUBLE: {
std::vector<double> tmpdoubledata(nLocalVerticesOwned * variableData.numLev);
@@ -268,7 +239,6 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
}
} // if (variableData.has_tsteps)
else {
- int success = 0;
switch (variableData.varDataType) {
case NC_DOUBLE:
success = NCFUNCAP(_vara_double)(_fileId, variableData.varId, &variableData.writeStarts[0],
@@ -281,6 +251,65 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
}
}
+ // Write coordinates used by requested var_names
+ // Use independent I/O mode put, since this write is only for the root processor
+ // CAUTION: if the NetCDF ID is from a previous call to ncmpi_create rather than ncmpi_open,
+ // all processors need to call ncmpi_begin_indep_data(). If only the root processor does so,
+ // ncmpi_begin_indep_data() call will be blocked forever :(
+#ifdef PNETCDF_FILE
+ // Enter independent I/O mode
+ success = NCFUNC(begin_indep_data)(_fileId);
+ ERRORS(success, "Failed to begin independent I/O mode.");
+#endif
+
+ int rank = 0;
+#ifdef USE_MPI
+ bool& isParallel = _writeNC->isParallel;
+ if (isParallel) {
+ ParallelComm*& myPcomm = _writeNC->myPcomm;
+ rank = myPcomm->proc_config().proc_rank();
+ }
+#endif
+ if (0 == rank) {
+ for (std::set<std::string>::iterator setIt = usedCoordinates.begin();
+ setIt != usedCoordinates.end(); ++setIt) {
+ const std::string& coordName = *setIt;
+
+ // Skip dummy coordinate variables (e.g. ncol)
+ if (dummyVarNames.find(coordName) != dummyVarNames.end())
+ continue;
+
+ std::map<std::string, WriteNC::VarData>::iterator vit = varInfo.find(coordName);
+ if (vit == varInfo.end())
+ ERRORR(MB_FAILURE, "Can't find one coordinate variable.");
+
+ WriteNC::VarData& varCoordData = vit->second;
+
+ switch (varCoordData.varDataType) {
+ case NC_DOUBLE:
+ // Independent I/O mode put
+ success = NCFUNCP(_vara_double)(_fileId, varCoordData.varId, &varCoordData.writeStarts[0],
+ &varCoordData.writeCounts[0], (double*)(varCoordData.memoryHogs[0]));
+ ERRORS(success, "Failed to write double data.");
+ break;
+ case NC_INT:
+ // Independent I/O mode put
+ success = NCFUNCP(_vara_int)(_fileId, varCoordData.varId, &varCoordData.writeStarts[0],
+ &varCoordData.writeCounts[0], (int*)(varCoordData.memoryHogs[0]));
+ ERRORS(success, "Failed to write int data.");
+ break;
+ default:
+ ERRORR(MB_FAILURE, "Not implemented yet.");
+ }
+ }
+ }
+
+#ifdef PNETCDF_FILE
+ // End independent I/O mode
+ success = NCFUNC(end_indep_data)(_fileId);
+ ERRORS(success, "Failed to end independent I/O mode.");
+#endif
+
return MB_SUCCESS;
}
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: danwu: Updated NC writer and its unit test. Parallel write should work now for HOMME.
by commits-noreply@bitbucket.org 24 Apr '14
by commits-noreply@bitbucket.org 24 Apr '14
24 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/9136633af5e1/
Changeset: 9136633af5e1
Branch: ncwriter
User: danwu
Date: 2014-04-24 22:47:43
Summary: Updated NC writer and its unit test. Parallel write should work now for HOMME.
Affected #: 3 files
diff --git a/src/io/NCWriteHOMME.cpp b/src/io/NCWriteHOMME.cpp
index 45ccff0..36ea5c7 100644
--- a/src/io/NCWriteHOMME.cpp
+++ b/src/io/NCWriteHOMME.cpp
@@ -6,6 +6,7 @@
#include "NCWriteHOMME.hpp"
#include "moab/WriteUtilIface.hpp"
+#include "MBTagConventions.hpp"
#define ERRORR(rval, str) \
if (MB_SUCCESS != rval) { _writeNC->mWriteIface->report_error("%s", str); return rval; }
@@ -51,13 +52,36 @@ ErrorCode NCWriteHOMME::collect_mesh_info()
ERRORR(rval, "Trouble getting local vertices in current file set.");
assert(!local_verts.empty());
- std::vector<int> gids(local_verts.size());
- rval = mbImpl->tag_get_data(mGlobalIdTag, local_verts, &gids[0]);
+#ifdef USE_MPI
+ bool& isParallel = _writeNC->isParallel;
+ if (isParallel) {
+ ParallelComm*& myPcomm = _writeNC->myPcomm;
+ int rank = myPcomm->proc_config().proc_rank();
+ int procs = myPcomm->proc_config().proc_size();
+ if (procs > 1) {
+ rval = myPcomm->filter_pstatus(local_verts, PSTATUS_NOT_OWNED, PSTATUS_NOT, -1, &localVertsOwned);
+ ERRORR(rval, "Trouble getting owned vertices in set.");
+ // Assume that PARALLEL_RESOLVE_SHARED_ENTS option is set
+ // We should avoid writing in parallel with overlapped data
+ if (rank > 0)
+ assert("PARALLEL_RESOLVE_SHARED_ENTS option is set" && localVertsOwned.size() < local_verts.size());
+ }
+ else
+ localVertsOwned = local_verts;
+ }
+ else
+ localVertsOwned = local_verts; // Not running in parallel, but still with MPI
+#else
+ localVertsOwned = local_verts;
+#endif
+
+ std::vector<int> gids(localVertsOwned.size());
+ rval = mbImpl->tag_get_data(mGlobalIdTag, localVertsOwned, &gids[0]);
ERRORR(rval, "Trouble getting global IDs on local vertices.");
// Restore localGidVerts
- std::copy(gids.rbegin(), gids.rend(), range_inserter(localGidVerts));
- nLocalVertices = localGidVerts.size();
+ std::copy(gids.rbegin(), gids.rend(), range_inserter(localGidVertsOwned));
+ nLocalVerticesOwned = localGidVertsOwned.size();
return MB_SUCCESS;
}
@@ -100,8 +124,8 @@ ErrorCode NCWriteHOMME::collect_variable_data(std::vector<std::string>& var_name
// Vertices
// Start from the first localGidVerts
// Actually, this will be reset later for writing
- currentVarData.writeStarts[2] = localGidVerts[0] - 1;
- currentVarData.writeCounts[2] = nLocalVertices;
+ currentVarData.writeStarts[2] = localGidVertsOwned[0] - 1;
+ currentVarData.writeCounts[2] = nLocalVerticesOwned;
break;
default:
ERRORR(MB_FAILURE, "Unexpected entity location type for HOMME non-set variable.");
@@ -124,8 +148,6 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
std::set<std::string>& dummyVarNames = _writeNC->dummyVarNames;
std::map<std::string, WriteNC::VarData>& varInfo = _writeNC->varInfo;
- ErrorCode rval;
-
// Start with coordinates
for (std::set<std::string>::iterator setIt = usedCoordinates.begin();
setIt != usedCoordinates.end(); ++setIt) {
@@ -172,12 +194,9 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
int numTimeSteps = (int)variableData.varTags.size();
if (variableData.has_tsteps) {
// Get entities of this variable
- Range ents;
switch (variableData.entLoc) {
case WriteNC::ENTLOCVERT:
// Vertices
- rval = mbImpl->get_entities_by_dimension(_fileSet, 0, ents);
- ERRORR(rval, "Can't get entities for vertices.");
break;
default:
ERRORR(MB_FAILURE, "Unexpected entity location type for HOMME non-set variable.");
@@ -189,16 +208,16 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
// FIXME: Should use tstep_nums (from writing options) later
for (int j = 0; j < numTimeSteps; j++) {
// We will write one time step, and count will be one; start will be different
- // We will write values directly from tag_iterate, but we should also transpose for level
- // so that means deep copy for transpose
+ // Use tag_get_data instead of tag_iterate to get values, as localVertsOwned
+ // might not be contiguous. We should also transpose for level so that means
+ // deep copy for transpose
variableData.writeStarts[0] = j; // This is time, again
- int count;
- void* dataptr;
- rval = mbImpl->tag_iterate(variableData.varTags[j], ents.begin(), ents.end(), count, dataptr);
- assert(count == (int)ents.size());
+ std::vector<double> tag_data(nLocalVerticesOwned * variableData.numLev);
+ ErrorCode rval = mbImpl->tag_get_data(variableData.varTags[j], localVertsOwned, &tag_data[0]);
+ ERRORR(rval, "Trouble getting tag data on owned vertices.");
#ifdef PNETCDF_FILE
- size_t nb_writes = localGidVerts.psize();
+ size_t nb_writes = localGidVertsOwned.psize();
std::vector<int> requests(nb_writes), statuss(nb_writes);
size_t idxReq = 0;
#endif
@@ -207,14 +226,14 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
int success = 0;
switch (variableData.varDataType) {
case NC_DOUBLE: {
- std::vector<double> tmpdoubledata(nLocalVertices * variableData.numLev);
+ std::vector<double> tmpdoubledata(nLocalVerticesOwned * variableData.numLev);
// Transpose (ncol, lev) back to (lev, ncol)
- jik_to_kji(nLocalVertices, 1, variableData.numLev, &tmpdoubledata[0], (double*)(dataptr));
+ jik_to_kji(nLocalVerticesOwned, 1, variableData.numLev, &tmpdoubledata[0], &tag_data[0]);
size_t indexInDoubleArray = 0;
size_t ic = 0;
- for (Range::pair_iterator pair_iter = localGidVerts.pair_begin();
- pair_iter != localGidVerts.pair_end(); ++pair_iter, ic++) {
+ for (Range::pair_iterator pair_iter = localGidVertsOwned.pair_begin();
+ pair_iter != localGidVertsOwned.pair_end(); ++pair_iter, ic++) {
EntityHandle starth = pair_iter->first;
EntityHandle endh = pair_iter->second;
variableData.writeStarts[2] = (NCDF_SIZE)(starth - 1);
@@ -236,7 +255,7 @@ ErrorCode NCWriteHOMME::write_values(std::vector<std::string>& var_names)
// next subrange
indexInDoubleArray += (endh - starth + 1) * variableData.numLev;
}
- assert(ic == localGidVerts.psize());
+ assert(ic == localGidVertsOwned.psize());
#ifdef PNETCDF_FILE
success = ncmpi_wait_all(_fileId, requests.size(), &requests[0], &statuss[0]);
ERRORS(success, "Failed on wait_all.");
diff --git a/src/io/NCWriteHelper.hpp b/src/io/NCWriteHelper.hpp
index 6678bb5..b05fe12 100644
--- a/src/io/NCWriteHelper.hpp
+++ b/src/io/NCWriteHelper.hpp
@@ -100,21 +100,24 @@ class UcdNCWriteHelper : public NCWriteHelper
public:
UcdNCWriteHelper(WriteNC* writeNC, int fileId, const FileOptions& opts, EntityHandle fileSet)
: NCWriteHelper(writeNC, fileId, opts, fileSet),
- nLocalCells(0), nLocalEdges(0), nLocalVertices(0),
+ nLocalCellsOwned(0), nLocalEdgesOwned(0), nLocalVerticesOwned(0),
cDim(-1), eDim(-1), vDim(-1) {}
virtual ~UcdNCWriteHelper() {}
protected:
- //! Dimensions of my local part of grid
- int nLocalCells;
- int nLocalEdges;
- int nLocalVertices;
+ //! Dimensions of my local owned part of grid
+ int nLocalCellsOwned;
+ int nLocalEdgesOwned;
+ int nLocalVerticesOwned;
//! Dimension numbers for nCells, nEdges and nVertices
int cDim, eDim, vDim;
- //! Local global ID for cells, edges and vertices
- Range localGidCells, localGidEdges, localGidVerts;
+ //! Local owned cells, edges and vertices
+ Range localCellsOwned, localEdgesOwned, localVertsOwned;
+
+ //! Local global ID for owned cells, edges and vertices
+ Range localGidCellsOwned, localGidEdgesOwned, localGidVertsOwned;
};
} // namespace moab
diff --git a/test/io/write_nc.cpp b/test/io/write_nc.cpp
index 827b102..8f87063 100644
--- a/test/io/write_nc.cpp
+++ b/test/io/write_nc.cpp
@@ -106,6 +106,7 @@ void test_eul_read_write_T()
rval = mb.write_file("test_par_eul_T.nc", 0, write_opts.c_str(), &set, 1);
else
rval = mb.write_file("test_eul_T.nc", 0, write_opts.c_str(), &set, 1);
+ CHECK_ERR(rval);
}
// Check non-set variable T on some quads
@@ -256,6 +257,7 @@ void test_fv_read_write_T()
rval = mb.write_file("test_par_fv_T.nc", 0, write_opts.c_str(), &set, 1);
else
rval = mb.write_file("test_fv_T.nc", 0, write_opts.c_str(), &set, 1);
+ CHECK_ERR(rval);
}
// Check non-set variable T on some quads
@@ -358,10 +360,6 @@ void test_homme_read_write_T()
return;
#endif
- // Only test serial case for the time being
- if (procs > 1)
- return;
-
Core moab;
Interface& mb = moab;
@@ -374,12 +372,21 @@ void test_homme_read_write_T()
// Load non-set variable T, set variable lat, set variable lon, and the mesh
read_opts += ";DEBUG_IO=0;VARIABLE=T,lat,lon";
+ if (procs > 1)
+ read_opts += ";PARALLEL_RESOLVE_SHARED_ENTS";
rval = mb.load_file(example_homme, &set, read_opts.c_str());
CHECK_ERR(rval);
// Write variables T, lat and lon
std::string write_opts = ";;VARIABLE=T,lat,lon;DEBUG_IO=0;";
- rval = mb.write_file("test_homme_T.nc", 0, write_opts.c_str(), &set, 1);
+#ifdef USE_MPI
+ // Use parallel options
+ write_opts += std::string(";PARALLEL=WRITE_PART");
+#endif
+ if (procs > 1)
+ rval = mb.write_file("test_par_homme_T.nc", 0, write_opts.c_str(), &set, 1);
+ else
+ rval = mb.write_file("test_homme_T.nc", 0, write_opts.c_str(), &set, 1);
CHECK_ERR(rval);
}
@@ -387,8 +394,10 @@ void test_homme_read_write_T()
// Also check set variables lat and lon
void test_homme_check_T()
{
+ int rank = 0;
int procs = 1;
#ifdef USE_MPI
+ MPI_Comm_rank(MPI_COMM_WORLD, &rank);
MPI_Comm_size(MPI_COMM_WORLD, &procs);
#endif
@@ -398,10 +407,6 @@ void test_homme_check_T()
return;
#endif
- // Only test serial case for the time being
- if (procs > 1)
- return;
-
Core moab;
Interface& mb = moab;
@@ -416,9 +421,14 @@ void test_homme_check_T()
read_opts += ";VARIABLE=T,lat,lon";
read_opts += ";CONN=";
read_opts += example_homme_mapping;
- rval = mb.load_file("test_homme_T.nc", &set, read_opts.c_str());
+ if (procs > 1)
+ rval = mb.load_file("test_par_homme_T.nc", &set, read_opts.c_str());
+ else
+ rval = mb.load_file("test_homme_T.nc", &set, read_opts.c_str());
CHECK_ERR(rval);
+ double eps = 1e-10;
+
if (1 == procs) {
// Get tag lat
Tag lat_tag;
@@ -432,7 +442,6 @@ void test_homme_check_T()
CHECK_ERR(rval);
CHECK_EQUAL(3458, var_len);
double* lat_val = (double*)var_data;
- double eps = 1e-10;
CHECK_REAL_EQUAL(-35.2643896827547, lat_val[0], eps);
CHECK_REAL_EQUAL(23.8854752772335, lat_val[1728], eps);
CHECK_REAL_EQUAL(29.8493120043874, lat_val[1729], eps);
@@ -453,33 +462,49 @@ void test_homme_check_T()
CHECK_REAL_EQUAL(202.5, lon_val[1728], eps);
CHECK_REAL_EQUAL(194.359423525313, lon_val[1729], eps);
CHECK_REAL_EQUAL(135, lon_val[3457], eps);
+ }
- // Get tag T0
- Tag Ttag0;
- rval = mb.tag_get_handle("T0", 26, MB_TYPE_DOUBLE, Ttag0);
- CHECK_ERR(rval);
+ // Get tag T0
+ Tag Ttag0;
+ rval = mb.tag_get_handle("T0", 26, MB_TYPE_DOUBLE, Ttag0);
+ CHECK_ERR(rval);
- // Get vertices
- Range verts;
- rval = mb.get_entities_by_type(0, MBVERTEX, verts);
- CHECK_ERR(rval);
- CHECK_EQUAL((size_t)3458, verts.size());
+ // Get vertices
+ Range verts;
+ rval = mb.get_entities_by_type(0, MBVERTEX, verts);
+ CHECK_ERR(rval);
- // Get all values of tag T0
- int count;
- void* Tbuf;
- rval = mb.tag_iterate(Ttag0, verts.begin(), verts.end(), count, Tbuf);
- CHECK_ERR(rval);
- CHECK_EQUAL((size_t)count, verts.size());
+ // Get all values of tag T0
+ int count;
+ void* Tbuf;
+ rval = mb.tag_iterate(Ttag0, verts.begin(), verts.end(), count, Tbuf);
+ CHECK_ERR(rval);
+ CHECK_EQUAL((size_t)count, verts.size());
- // Check some values of tag T0 on first level
- eps = 0.0001;
- double* data = (double*) Tbuf;
+ double* data = (double*) Tbuf;
+ eps = 0.0001;
+
+ if (1 == procs) {
+ CHECK_EQUAL((size_t)3458, verts.size());
CHECK_REAL_EQUAL(233.1136, data[0 * 26], eps); // First vert
CHECK_REAL_EQUAL(236.1505, data[1728 * 26], eps); // Median vert
CHECK_REAL_EQUAL(235.7722, data[1729 * 26], eps); // Median vert
CHECK_REAL_EQUAL(234.0416, data[3457 * 26], eps); // Last vert
}
+ else if (2 == procs) {
+ if (0 == rank) {
+ CHECK_EQUAL((size_t)1825, verts.size());
+ CHECK_REAL_EQUAL(233.1136, data[0 * 26], eps); // First vert
+ CHECK_REAL_EQUAL(237.1977, data[912 * 26], eps); // Median vert
+ CHECK_REAL_EQUAL(234.9711, data[1824 * 26], eps); // Last vert
+ }
+ else if (1 == rank) {
+ CHECK_EQUAL((size_t)1825, verts.size());
+ CHECK_REAL_EQUAL(233.1136, data[0 * 26], eps); // First vert
+ CHECK_REAL_EQUAL(231.0446, data[912 * 26], eps); // Median vert
+ CHECK_REAL_EQUAL(234.0416, data[1824 * 26], eps); // Last vert
+ }
+ }
}
void get_eul_read_options(std::string& opts)
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: iulian07: be more tolerant with tree searching
by commits-noreply@bitbucket.org 24 Apr '14
by commits-noreply@bitbucket.org 24 Apr '14
24 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/acb91f8fdb36/
Changeset: acb91f8fdb36
Branch: master
User: iulian07
Date: 2014-04-24 22:03:02
Summary: be more tolerant with tree searching
the tolerances used for searching in coupler were too tight
for some real models.
And they were hardcoded :(
replace them with tolerances based on epsilon input by the user
more studies are needed here, but 1.e-10 was too tight, especially
if midnodes were created by cubit from mesh-based geometry
Affected #: 1 file
diff --git a/tools/mbcoupler/Coupler.cpp b/tools/mbcoupler/Coupler.cpp
index b868006..fbfd8fb 100644
--- a/tools/mbcoupler/Coupler.cpp
+++ b/tools/mbcoupler/Coupler.cpp
@@ -446,7 +446,12 @@ ErrorCode Coupler::locate_points(double *xyz, int num_points,
for (int i = 0; i < num_points; i++)
{
if (tl_tmp->vi_rd[3*i+1] == -1)
+ {
missing_pts++;
+#ifndef NDEBUG
+ printf(" %f %f %f\n", xyz[3*i], xyz[3*i+1], xyz[3*i+2] );
+#endif
+ }
else
if (tl_tmp->vi_rd[3*i]==(int)my_rank)
local_pts++;
@@ -668,7 +673,11 @@ ErrorCode Coupler::nat_param(double xyz[3],
if (epsilon) {
std::vector<double> dists;
std::vector<EntityHandle> leaves;
- result = myTree->distance_search(xyz, epsilon, leaves, 1.0e-10, 1.0e-6, &dists, NULL, &localRoot);
+ // two tolerances
+ result = myTree->distance_search(xyz, epsilon, leaves,
+ /*iter_tol*/ epsilon,
+ /*inside_tol*/ 10*epsilon,
+ &dists, NULL, &localRoot);
if (leaves.empty())
// not found returns success here, with empty list, just like case with no epsilon
return MB_SUCCESS;
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
Could be related to this ticket
https://trac.mcs.anl.gov/projects/ITAPS/ticket/287
Do vtk works for you or not?
Thanks,
Iulian
________________________________
From: kanaev(a)ibrae.ac.ru [kanaev(a)ibrae.ac.ru]
Sent: Thursday, April 24, 2014 1:51 PM
To: Grindeanu, Iulian R.
Subject: Visit 2.7.1
Hello Iulian,
Do you have Visit able to open ITAPS MOAB installed?
Can you please open in Visit the file attached and draw Pseudocolor of Vol ?
I have Visit 2.7.1 compiled with option to read ITAPS MOAB files but it has the following bug - for example Vol values read by Visit are the same as V values (they are different as you can see having opened the file in HDFView) and it's the same with the tags starting with the same letter
Thanks
Anton
1
0
See <https://jenkins-ci.mcs.anl.gov/job/moab32par/398/changes>
Changes:
[wuda] Updated NC writer and its unit test. Parallel write should work now for structured mesh (e.g. CAM_EUL).
[wuda] Added two test cases to write_nc for CAM-FV. Fixed a few NC writer bugs to make them pass.
------------------------------------------
[...truncated 185 lines...]
checking for known C compilers... GNU
checking for known compiler/OS combinations... GNU:i686
checking for known c++ compilers... GNU
checking for known compiler/OS combinations... GNU:i686
checking whether make supports nested variables... yes
checking whether byte ordering is bigendian... no
checking if platform is IBM BlueGene... no
checking for gunzip... gunzip -c
checking for gzip... (cached) gunzip -c
checking for zcat... (cached) gunzip -c
checking if C++ compiler supports template class specialization... yes
checking if C++ compiler supports template function specialization... yes
checking if mpicxx works... yes
checking how to get verbose linking output from mpif90... -v
checking for Fortran libraries of mpif90... -L/usr/lib -L/usr/lib/gcc/i686-linux-gnu/4.6 -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../i386-linux-gnu -L/usr/lib/gcc/i686-linux-gnu/4.6/../../../../lib -L/lib/i386-linux-gnu -L/lib/../lib -L/usr/lib/i386-linux-gnu -L/usr/lib/../lib -L/usr/lib/gcc/i686-linux-gnu/4.6/../../.. -lgfortran -lm -lmpichf90 -lmpich -lopa -lmpl -lrt -lcr -lpthread -lquadmath
checking for dummy main to link with Fortran libraries... none
checking for Fortran name-mangling scheme... lower case, underscore, no extra underscore
checking whether Fortran 77 supports Cray-style pointer... yes
checking for Fortran 77 compiler flag for Cray-style pointer... -fcray-pointer
checking whether Fortran 90 supports Cray-style pointer... yes
checking for Fortran 90 compiler flag for Cray-style pointer... -fcray-pointer
checking for vsnprintf... yes
checking if std::vector has templatized insert method... yes
checking if std::copy must be old SGI format... no
checking for inttypes.h... (cached) yes
checking for stdint.h... (cached) yes
checking for sys/types.h... (cached) yes
checking stddef.h usability... yes
checking stddef.h presence... yes
checking for stddef.h... yes
checking for stdlib.h... (cached) yes
checking size of void *... 4
checking for size_t... yes
checking for ptrdiff_t... yes
checking size of EntityHandle... 4
checking if iMesh support is to be built... yes
checking if iGeom support is to be built... yes
configure: creating ./config.lt
config.lt: creating libtool
checking ieeefp.h usability... no
checking ieeefp.h presence... no
checking for ieeefp.h... no
checking for C++ unordered_map... std::tr1
checking mpi.h usability... yes
checking mpi.h presence... yes
checking for mpi.h... yes
checking If mpi.h conflicts with C headers in C++... no
checking for mpiexec... mpiexec
checking for deflate in -lz... yes
checking for SZ_Decompress in -lsz... no
checking if HDF5 support is enabled... yes
checking hdf5.h usability... yes
checking hdf5.h presence... yes
checking for hdf5.h... yes
checking for gpfs_stat in -lgpfs... no
checking for H5Fopen in -lhdf5... yes
checking for H5Pset_fapl_mpio in -lhdf5... yes
checking for H5_MPI_COMPLEX_DERIVED_DATATYPE_WORKS... yes
checking if CCMIO support is enabled... yes
checking if CCMIO support available...
checking ccmio.h usability... no
checking ccmio.h presence... no
checking for ccmio.h... no
checking ccmioutility.h usability... no
checking ccmioutility.h presence... no
checking for ccmioutility.h... no
checking ccmiocore.h usability... no
checking ccmiocore.h presence... no
checking for ccmiocore.h... no
checking unsuccessful, Ccmio support disabled...
checking if DAMSEL support is enabled... no
checking if DAMSEL support available...
checking if NetCDF support is enabled... yes
checking for nc-config... /homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/bin/nc-config
checking netcdf.h usability... yes
checking netcdf.h presence... yes
checking for netcdf.h... yes
checking if NC_MAX_DIMS is at least 65536... no
checking if NC_MAX_VARS is at least 524288... no
checking for nc_create in -lnetcdf... yes
checking if Pnetcdf support is enabled... yes
checking pnetcdf.h usability... no
checking pnetcdf.h presence... no
checking for pnetcdf.h... no
checking for ncmpi_create in -lpnetcdf... no
checking if CGNS support is enabled... yes
checking cgnslib.h usability... no
checking cgnslib.h presence... no
checking for cgnslib.h... no
configure: WARNING: CGNS header not found.
checking for cg_open in -lcgns... no
checking for cg_open in -lcgns... no
checking for cg_open in -lcgns... no
configure: WARNING: "CGNS support disabled"
checking for doxygen... /usr/bin/doxygen
checking if mbconvert is to be built... yes
checking if hexmodops is to be built... yes
checking if qvdual is to be built... no
checking if vtkMOABReader is to be built... no
checking if vtkMOABReaderNew is to be built... no
checking if mbsize is to be built... yes
checking if mbskin is to be built... yes
checking if mbtagprop is to be built... yes
checking if mbmem is to be built... yes
checking if mcnpmit is to be built... no
checking if mbcoupler is to be built... no
checking if spheredecomp is to be built... yes
checking if mbsurfplot is to be built... yes
checking if mbzoltan is to be built... no
checking if dagmc is to be built... yes
checking if gsets is to be built... yes
checking if mbdepth is to be built... yes
checking if refiner is to be built... no
checking if h5mtools is to be built... yes
checking if mbcslam is to be built... no
checking for /home/fathom/lib32/jenkins/cgm/lib/cgm.make... yes
checking Checking for GeometryQueryTool::ray_fire(RefFace*,...)... no
configure: creating ./config.status
config.status: creating Makefile
config.status: creating moab.make
config.status: creating MOABConfig.cmake
config.status: creating src/Makefile
config.status: creating src/io/Makefile
config.status: creating src/io/mhdf/Makefile
config.status: creating src/LocalDiscretization/Makefile
config.status: creating src/parallel/Makefile
config.status: creating src/oldinc/Makefile
config.status: creating test/Makefile
config.status: creating test/dagmc/Makefile
config.status: creating test/h5file/Makefile
config.status: creating test/dual/Makefile
config.status: creating test/obb/Makefile
config.status: creating test/perf/Makefile
config.status: creating test/perf/point_location/Makefile
config.status: creating test/io/Makefile
config.status: creating test/parallel/Makefile
config.status: creating test/oldinc/Makefile
config.status: creating itaps/iBase_f.h
config.status: creating itaps/Makefile
config.status: creating itaps/imesh/Makefile
config.status: creating itaps/imesh/iMesh-Defs.inc
config.status: creating itaps/igeom/Makefile
config.status: creating itaps/igeom/FBiGeom-Defs.inc
config.status: creating tools/Makefile
config.status: creating tools/refiner/Makefile
config.status: creating tools/mbcoupler/Makefile
config.status: creating tools/mbcslam/Makefile
config.status: creating tools/mbzoltan/Config.moab
config.status: creating tools/mbzoltan/Makefile
config.status: creating tools/mcnpmit/Makefile
config.status: creating tools/qvdual/Makefile
config.status: creating tools/dagmc/Makefile
config.status: creating tools/vtkMOABReader/CMakeLists.txt
config.status: creating tools/vtkMOABReaderNew/CMakeLists.txt
config.status: creating doc/Makefile
config.status: creating doc/user.dox
config.status: creating doc/config.tex
config.status: creating MeshFiles/Makefile
config.status: creating MeshFiles/unittest/Makefile
config.status: creating MeshFiles/unittest/io/Makefile
config.status: creating MeshFiles/unittest/iGeom/Makefile
config.status: creating MeshFiles/unittest/dagmc/Makefile
config.status: creating config.h
config.status: config.h is unchanged
config.status: creating src/moab/Version.h
config.status: src/moab/Version.h is unchanged
config.status: creating src/moab/EntityHandle.hpp
config.status: src/moab/EntityHandle.hpp is unchanged
config.status: creating src/parallel/moab_mpi_config.h
config.status: src/parallel/moab_mpi_config.h is unchanged
config.status: creating src/FCDefs.h
config.status: src/FCDefs.h is unchanged
config.status: executing depfiles commands
config.status: executing libtool commands
config.status: executing src/MOAB_FCDefs.h commands
C: mpicc -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set
C++: mpicxx -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set
Fortran90: mpif90 -O2 -fcray-pointer
Fortran77: mpif77 -O2 -fcray-pointer
+ make
make all-recursive
make[1]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/'>
Making all in src
make[2]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src'>
(CDPATH="${ZSH_VERSION+.}:" && cd .. && /bin/sh <https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/config/missing> --run autoheader)
rm -f stamp-h5
touch FCDefs.h.in
cd .. && /bin/sh ./config.status src/FCDefs.h
config.status: creating src/FCDefs.h
config.status: src/FCDefs.h is unchanged
make all-recursive
make[3]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src'>
Making all in parallel
make[4]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/parallel'>
(CDPATH="${ZSH_VERSION+.}:" && cd ../.. && /bin/sh <https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/config/missing> --run autoheader)
rm -f stamp-h4
touch moab_mpi_config.h.in
cd ../.. && /bin/sh ./config.status src/parallel/moab_mpi_config.h
config.status: creating src/parallel/moab_mpi_config.h
config.status: src/parallel/moab_mpi_config.h is unchanged
make all-am
make[5]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/parallel'>
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -DSRCDIR=. -I./.. -I.. -I./../io -I./../io/mhdf/include -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ParallelMergeMesh.lo -MD -MP -MF .deps/ParallelMergeMesh.Tpo -c -o ParallelMergeMesh.lo ParallelMergeMesh.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -DSRCDIR=. -I./.. -I.. -I./../io -I./../io/mhdf/include -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ParallelMergeMesh.lo -MD -MP -MF .deps/ParallelMergeMesh.Tpo -c ParallelMergeMesh.cpp -o ParallelMergeMesh.o
mv -f .deps/ParallelMergeMesh.Tpo .deps/ParallelMergeMesh.Plo
/bin/sh ../../libtool --tag=CXX --mode=link mpicxx -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -R/homes/fathom/lib32/jenkins/cgm/lib -R/homes/fathom/3rdparty/cubit/Cubit32/Cubit-12.2/bin -L/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/lib -lnetcdf -L/homes/fathom/3rdparty/lib32/zlib-1.2.4/gcc/lib -L/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/lib -L/homes/fathom/lib32/jenkins/cgm/lib -L/homes/fathom/3rdparty/cubit/Cubit32/Cubit-12.2/bin -L/homes/fathom/3rdparty/lib32/zlib-1.2.4/gcc/lib -L/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/lib -L/homes/fathom/3rdparty/lib32/zlib-1.2.4/gcc/lib -L/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/lib -L/homes/fathom/3rdparty/lib32/zlib-1.2.4/gcc/lib -L/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/lib -o libMOABpar.la ParallelComm.lo ProcConfig.lo ParallelData.lo ParallelMergeMesh.lo ReadParallel.lo SharedSetData.lo gs.lo WriteHDF5Parallel.lo -lm
libtool: link: rm -fr .libs/libMOABpar.a .libs/libMOABpar.la
libtool: link: ar cru .libs/libMOABpar.a ParallelComm.o ProcConfig.o ParallelData.o ParallelMergeMesh.o ReadParallel.o SharedSetData.o gs.o WriteHDF5Parallel.o
libtool: link: ranlib .libs/libMOABpar.a
libtool: link: ( cd ".libs" && rm -f "libMOABpar.la" && ln -s "../libMOABpar.la" "libMOABpar.la" )
make[5]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/parallel'>
make[4]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/parallel'>
Making all in io
make[4]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io'>
Making all in mhdf
make[5]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io/mhdf'>
make[5]: Nothing to be done for `all'.
make[5]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io/mhdf'>
Making all in .
make[5]: Entering directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io'>
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ReadNCDF.lo -MD -MP -MF .deps/ReadNCDF.Tpo -c -o ReadNCDF.lo ReadNCDF.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ReadNCDF.lo -MD -MP -MF .deps/ReadNCDF.Tpo -c ReadNCDF.cpp -o ReadNCDF.o
mv -f .deps/ReadNCDF.Tpo .deps/ReadNCDF.Plo
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ReadNC.lo -MD -MP -MF .deps/ReadNC.Tpo -c -o ReadNC.lo ReadNC.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT ReadNC.lo -MD -MP -MF .deps/ReadNC.Tpo -c ReadNC.cpp -o ReadNC.o
mv -f .deps/ReadNC.Tpo .deps/ReadNC.Plo
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT WriteNC.lo -MD -MP -MF .deps/WriteNC.Tpo -c -o WriteNC.lo WriteNC.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT WriteNC.lo -MD -MP -MF .deps/WriteNC.Tpo -c WriteNC.cpp -o WriteNC.o
mv -f .deps/WriteNC.Tpo .deps/WriteNC.Plo
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT NCHelper.lo -MD -MP -MF .deps/NCHelper.Tpo -c -o NCHelper.lo NCHelper.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT NCHelper.lo -MD -MP -MF .deps/NCHelper.Tpo -c NCHelper.cpp -o NCHelper.o
mv -f .deps/NCHelper.Tpo .deps/NCHelper.Plo
/bin/sh ../../libtool --tag=CXX --mode=compile mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT NCWriteHelper.lo -MD -MP -MF .deps/NCWriteHelper.Tpo -c -o NCWriteHelper.lo NCWriteHelper.cpp
libtool: compile: mpicxx -DHAVE_CONFIG_H -I. -I../.. -I../../src/moab -I../../src/parallel -I../../src -I/homes/fathom/3rdparty/lib32/netcdf-4.1.3_gcc/include -I/home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -isystem /home/fathom/3rdparty/lib32/hdf5-1.8.8-par-gcc/include -DTEMPLATE_SPECIALIZATION -DTEMPLATE_FUNC_SPECIALIZATION -DHAVE_VSNPRINTF -D_FILE_OFFSET_BITS=64 -DUSE_MPI -DHDF5_FILE -DHDF5_PARALLEL -DNETCDF_FILE -DCGM -DIS_BUILDING_MB -I.. -I./.. -I./../parallel -I./mhdf/include -DTEMPLATE_DEFS_INCLUDED -DHAVE_ACIS -I/homes/fathom/lib32/jenkins/cgm/include -DCGM -DUNORDERED_MAP_NS=std::tr1 -DHAVE_UNORDERED_MAP=tr1/unordered_map -DHAVE_UNORDERED_SET=tr1/unordered_set -Wall -pipe -pedantic -Wno-long-long -Wextra -Wcast-align -Wpointer-arith -Wformat -Wformat-security -Wshadow -Wunused-parameter -O2 -DNDEBUG -MT NCWriteHelper.lo -MD -MP -MF .deps/NCWriteHelper.Tpo -c NCWriteHelper.cpp -o NCWriteHelper.o
NCWriteHelper.cpp: In member function 'virtual moab::ErrorCode moab::ScdNCWriteHelper::write_values(std::vector<std::basic_string<char> >&)':
NCWriteHelper.cpp:567:45: error: 'nc_begin_indep_data' was not declared in this scope
NCWriteHelper.cpp:613:43: error: 'nc_end_indep_data' was not declared in this scope
make[5]: *** [NCWriteHelper.lo] Error 1
make[5]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io'>
make[4]: *** [all-recursive] Error 1
make[4]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src/io'>
make[3]: *** [all-recursive] Error 1
make[3]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src'>
make[2]: *** [all] Error 2
make[2]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/src'>
make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `<https://jenkins-ci.mcs.anl.gov/job/moab32par/ws/'>
make: *** [all] Error 2
Build step 'Execute shell' marked build as failure
1
1
22 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/1d09d7a2d3bc/
Changeset: 1d09d7a2d3bc
Branch: ncwriter
User: danwu
Date: 2014-04-22 22:54:35
Summary: Adding write_nc_par to ignore.
Affected #: 1 file
diff --git a/.gitignore b/.gitignore
index 0e9b261..d686ffa 100644
--- a/.gitignore
+++ b/.gitignore
@@ -209,6 +209,7 @@ test/parallel/structured3
test/parallel/uber_parallel_test
test/parallel/ucdtrvpart
test/parallel/*.vtk
+test/parallel/write_nc_par
test/perf/adj_time
test/perf/perf
test/perf/perftool
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0
commit/MOAB: danwu: Updated unit test makefiles and git ignore items for NC writer.
by commits-noreply@bitbucket.org 22 Apr '14
by commits-noreply@bitbucket.org 22 Apr '14
22 Apr '14
1 new commit in MOAB:
https://bitbucket.org/fathomteam/moab/commits/3baa2f44fdfa/
Changeset: 3baa2f44fdfa
Branch: ncwriter
User: danwu
Date: 2014-04-22 21:38:28
Summary: Updated unit test makefiles and git ignore items for NC writer.
Affected #: 3 files
diff --git a/.gitignore b/.gitignore
index ba9fe1e..0e9b261 100644
--- a/.gitignore
+++ b/.gitignore
@@ -155,6 +155,7 @@ test/io/*.g
test/io/gmsh_test
test/io/ideas_test
test/io/nastran_test
+test/io/*.nc
test/io/read_cgm_basic_test
test/io/read_cgm_connectivity_test
test/io/read_cgm_group_test
@@ -168,6 +169,7 @@ test/io/smf_test
test/io/stl_test
test/io/tqdcfr
test/io/vtk_test
+test/io/write_nc
test/kd_tree_test
test/kd_tree_time
test/kd_tree_tool
@@ -187,6 +189,7 @@ test/parallel/*.h5m
test/parallel/mbparallelcomm_test
test/parallel/mhdf_parallel
test/parallel/mpastrvpart
+test/parallel/*.nc
test/parallel/par_coupler_test
test/parallel/par_intx_sph
test/parallel/parallel_hdf5_test
diff --git a/test/io/Makefile.am b/test/io/Makefile.am
index dd09c0e..fffcbb4 100644
--- a/test/io/Makefile.am
+++ b/test/io/Makefile.am
@@ -67,6 +67,7 @@ nastran_test_SOURCES = $(srcdir)/../TestUtil.hpp nastran_test.cc
read_nc_SOURCES = $(srcdir)/../TestUtil.hpp read_nc.cpp
read_ucd_nc_SOURCES = $(srcdir)/../TestUtil.hpp read_ucd_nc.cpp
read_mpas_nc_SOURCES = $(srcdir)/../TestUtil.hpp read_mpas_nc.cpp
+write_nc_SOURCES = $(srcdir)/../TestUtil.hpp write_nc.cpp
ideas_test_SOURCES = $(srcdir)/../TestUtil.hpp ideas_test.cc
stl_test_SOURCES = $(srcdir)/../TestUtil.hpp stl_test.cc
smf_test_SOURCES = $(srcdir)/../TestUtil.hpp smf_test.cc
@@ -84,8 +85,11 @@ read_cgm_group_test_CXXFLAGS = $(CGM_CPPFLAGS) $(CGM_LIBS) $(CXXFLAGS)
readutil_test_SOURCES = $(srcdir)/../TestUtil.hpp readutil_test.cpp
cgns_test_SOURCES=$(srcdir)/../TestUtil.hpp cgns_test.cpp
-MOSTLYCLEANFILES = dumped_acis.sat \
+MOSTLYCLEANFILES = dumped_acis.sat \
mb_write.g \
mb_write2.g \
- singlecyl_tmp.ccmg
+ singlecyl_tmp.ccmg \
+ test_eul_T.nc \
+ test_fv_T.nc \
+ test_homme_T.nc
diff --git a/test/parallel/Makefile.am b/test/parallel/Makefile.am
index dde3a87..59c39c3 100644
--- a/test/parallel/Makefile.am
+++ b/test/parallel/Makefile.am
@@ -55,7 +55,9 @@ endif
if PNETCDF_FILE
if !NETCDF_FILE
- NETCDF_TESTS += scdpart read_nc_par ucdtrvpart mpastrvpart
+ NETCDF_TESTS += scdpart read_nc_par ucdtrvpart mpastrvpart write_nc_par
+else
+ NETCDF_TESTS += write_nc_par
endif
endif
@@ -90,6 +92,7 @@ scdpart_SOURCES = scdpart.cpp
read_nc_par_SOURCES = ../io/read_nc.cpp
ucdtrvpart_SOURCES = ucdtrvpart.cpp
mpastrvpart_SOURCES = mpastrvpart.cpp
+write_nc_par_SOURCES = ../io/write_nc.cpp
par_spatial_locator_test_SOURCES = par_spatial_locator_test.cpp
if ENABLE_mbcoupler
@@ -117,4 +120,7 @@ MOSTLYCLEANFILES = mhdf_ll.h5m tmp0.h5m tmp1.h5m tmp2.h5m tmp3.h5m \
dum.h5m \
test_mpas_no_mixed_elements.h5m \
test_mpas_rcbzoltan.h5m \
- test_mpas_rcbzoltan_no_mixed_elements.h5m
+ test_mpas_rcbzoltan_no_mixed_elements.h5m \
+ test_par_eul_T.nc \
+ test_par_fv_T.nc \
+ test_par_homme_T.nc
Repository URL: https://bitbucket.org/fathomteam/moab/
--
This is a commit notification from bitbucket.org. You are receiving
this because you have the service enabled, addressing the recipient of
this email.
1
0