[MOAB-dev] Error message when MeshTag is set and entities are removed from database.

Lukasz Kaczmarczyk Lukasz.Kaczmarczyk at glasgow.ac.uk
Tue Jul 26 04:10:59 CDT 2016


Hello,

I found this bug, it always happens when MeshTag is defined and entities are removed from database. Bug is not
critical, but annoying making unnecessary printing on the screen when error not really happened.

[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Cannot get/set mesh/global tag _FieldShift on non-root-set EntitySet 3!
[0]MOAB ERROR: not_root_set() line 18 in src/MeshTag.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Cannot get/set mesh/global tag _FEShift on non-root-set EntitySet 3!
[0]MOAB ERROR: not_root_set() line 18 in src/MeshTag.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Cannot get/set mesh/global tag _ProblemShift on non-root-set EntitySet 3!
[0]MOAB ERROR: not_root_set() line 18 in src/MeshTag.cpp
[0]MOAB ERROR: --------------------- Error Message ------------------------------------
[0]MOAB ERROR: Cannot get/set mesh/global tag _MoFEMBuild on non-root-set EntitySet 3!
[0]MOAB ERROR: not_root_set() line 18 in src/MeshTag.cpp
[0]MOAB ERROR: remove_data() line 332 in src/SparseTag.cpp
[0]MOAB ERROR: remove_data() line 332 in src/SparseTag.cpp
[0]MOAB ERROR: remove_data() line 332 in src/SparseTag.cpp

I think that problem is in Core::delete_entities

 for (std::list<TagInfo*>::iterator i = tagList.begin(); i != tagList.end(); ++i) {
   temp_result = (*i)->remove_data( sequenceManager, mError, range );
     // ok if the error is tag_not_found, some ents may not have every tag on them
   if (MB_SUCCESS != temp_result && MB_TAG_NOT_FOUND != temp_result)
     result = temp_result;
 }

when MeshTag through virtual functions is deleted, then error is printed from not_root_set. This is not
consistent how other tags are responding, for example in case of SparseTag an error is resulted 
MB_TAG_NOT_FOUND and no error is printed. 

I think that MeshTag should behave in exactly the same way.

I can make quick fix, my proposition is to not_root_set change that it return MB_TAG_NOT_FOUND in 
case of non root meshset.


Kind regards,
Lukasz


More information about the moab-dev mailing list