[MOAB-dev] r4936 - MOAB/trunk/src/parallel
Hong-Jun Kim
hongjun at mcs.anl.gov
Fri Jun 3 10:31:53 CDT 2011
I see.
Since this tag can be created outside MOAB such as in MeshKit, then, let me keep checking "MB_ALREADY_ALLOCATED" is returned.
Thank you for your comment about it.
Hong-Jun
----- Original Message -----
> From: "Jason Kraftcheck" <kraftche at cae.wisc.edu>
> To: "Hong-Jun Kim" <hongjun at mcs.anl.gov>
> Cc: moab-dev at mcs.anl.gov
> Sent: Friday, June 3, 2011 10:23:17 AM
> Subject: Re: [MOAB-dev] r4936 - MOAB/trunk/src/parallel
> On 06/03/2011 10:09 AM, Hong-Jun Kim wrote:
> > To create this tag, I am using "iMesh_createTag" in meshkit which
> > uses "MB_TAG_EXCL" as an argument for moab's "tag_get_handle".
> > Isn't it make "MB_ALREADY_ALLOCATED" returned?
>
> Yes, but the code you changed in ParallelComm was not passing
> MB_TAG_EXCL
>
> > If it is, do I have to use moab's tag_get_handle instead of iMesh
> > one?
> >
>
> You can use whichever you want. MOAB uses MB_TAG_EXCL to get the
> expected
> behavior for the iMesh call. But my comment was with regards to the
> code
> you changed in ParallelComm, which did not use the iMesh call.
>
> - jason
>
>
>
> > Hong-Jun
> >
> > ----- Original Message -----
> >> From: "Jason Kraftcheck" <kraftche at cae.wisc.edu>
> >> To: moab-dev at mcs.anl.gov
> >> Cc: hongjun at mcs.anl.gov
> >> Sent: Friday, June 3, 2011 8:51:15 AM
> >> Subject: Re: [MOAB-dev] r4936 - MOAB/trunk/src/parallel
> >> On 06/02/2011 07:50 PM, hongjun at mcs.anl.gov wrote:
> >>> Author: hongjun
> >>> Date: 2011-06-02 19:50:28 -0500 (Thu, 02 Jun 2011)
> >>> New Revision: 4936
> >>>
> >>> Modified:
> >>> MOAB/trunk/src/parallel/ParallelComm.cpp
> >>> Log:
> >>> o MB_ALREADY_ALLOCATED case is handled in "un/pack_sets" function
> >>> o Passes make check
> >>>
> >>
> >> There shouldn't be an 'MB_ALREADY_ALLOCATED case'. If you're
> >> getting
> >> an
> >> error code other than MB_SUCCESS from those functions, then there
> >> is
> >> something wrong with the arguments (e.g. the tag is not actually 1
> >> integer.)
> >>
> >> - jason
> >>
> >>
> >>
> >>
> >>
> >>>
> >>> Modified: MOAB/trunk/src/parallel/ParallelComm.cpp
> >>> ===================================================================
> >>> --- MOAB/trunk/src/parallel/ParallelComm.cpp 2011-06-02 22:34:11
> >>> UTC
> >>> (rev 4935)
> >>> +++ MOAB/trunk/src/parallel/ParallelComm.cpp 2011-06-03 00:50:28
> >>> UTC
> >>> (rev 4936)
> >>> @@ -2510,7 +2510,7 @@
> >>> std::vector<int> id_data(n_sets);
> >>> result = mbImpl->tag_get_handle("PARALLEL_UNIQUE_ID", 1,
> >>> MB_TYPE_INTEGER,
> >>> uid_tag,
> >>> MB_TAG_SPARSE|MB_TAG_CREAT);
> >>> - if (MB_SUCCESS != result) {
> >>> + if (MB_ALREADY_ALLOCATED != result&& MB_SUCCESS != result) {
> >>> RRA("Trouble creating parallel geometry unique id tag.");
> >>> }
> >>> result = mbImpl->tag_get_data(uid_tag,
> >>> all_sets,&id_data[0]);
> >>> @@ -2665,7 +2665,7 @@
> >>> Tag uid_tag; int def_val = 0;
> >>> result = mbImpl->tag_get_handle("PARALLEL_UNIQUE_ID", 1,
> >>> MB_TYPE_INTEGER,
> >>> uid_tag,
> >>> MB_TAG_SPARSE|MB_TAG_CREAT,&def_val);
> >>> - if (MB_SUCCESS != result) {
> >>> + if (MB_ALREADY_ALLOCATED != result&& MB_SUCCESS != result) {
> >>> RRA("Trouble creating parallel geometry unique id tag.");
> >>> }
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
> >>>
>
>
> --
> "A foolish consistency is the hobgoblin of little minds" - Ralph Waldo
> Emerson
More information about the moab-dev
mailing list