[MOAB-dev] writing in parallel

Vijay S. Mahadevan vijay.m at gmail.com
Sat Jan 2 13:03:08 CST 2016


> Just what I needed. Is this documented anywhere at all?

There is some information about parallel loading in the user guide [1]
but nothing about writing. Mostly because PARALLEL=WRITE_PART is the
only option needed for parallel write. Either way, as I mentioned to
Iulian, we need to definitely update the documentation.

> Perhaps this could be communicated even more clearly by renaming the
> function to something along the lines of `write_serial`. Alternatively, one
> could think about removing that function altogether. `write_file("2.h5m")`
> does the same as `write_mesh("2.h5m")`.

Yes you can use write_file similar to write_mesh. As I said, the
original use case was for debugging purposes and unsure why this
helper API was kept around. I am all for scratching this routine all
together.

> In addition, I found that setting the `file_type` in [1] doesn't do
> anything. At least, illegal values aren't intercepted.

The file_type is only a suggestion to decipher which writer to use.
Otherwise, the strategy pattern queries each writer implementation to
see whether a valid implementation is available. This can certainly be
made better too.

Vijay

[1] ftp://ftp.mcs.anl.gov/pub/fathom/moab-docs/contents.html#fivetwo

On Sat, Jan 2, 2016 at 12:48 PM, Nico Schlömer <nico.schloemer at gmail.com> wrote:
>> with options="PARALLEL=WRITE_PART;".
>
> Just what I needed. Is this documented anywhere at all?
>
>> write_mesh only works in serial.
>
> Perhaps this could be communicated even more clearly by renaming the
> function to something along the lines of `write_serial`. Alternatively, one
> could think about removing that function altogether. `write_file("2.h5m")`
> does the same as `write_mesh("2.h5m")`.
>
> In addition, I found that setting the `file_type` in [1] doesn't do
> anything. At least, illegal values aren't intercepted.
>
> Cheers,
> Nico
>
> [1]
> http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Interface.html#a96c55cc351c6d44b88330a2bf692996b
>
> On Sat, Jan 2, 2016 at 7:23 PM Vijay S. Mahadevan <vijay.m at gmail.com> wrote:
>>
>> Hi Nico,
>>
>> Yes write_mesh is implemented to work only in serial. It internally
>> just calls write_file but with NULL options [1]. I believe write_mesh
>> exists typically for debug purposes where we can dump the partial mesh
>> from each process and analyze it. I don't see why this should be
>> restricted this way and can certainly change that. Alternately, you
>> can and should directly call write_file (which can store tags and
>> other set data too) with options="PARALLEL=WRITE_PART;".
>>
>> Iulian, we should update the documentation to say that write_mesh only
>> works in serial. Or optionally allow user to specify options so that
>> both serial/parallel writes can be enabled. Also, the documentation
>> for load_file and write_file should describe what typical options can
>> be used to read/write in parallel.
>>
>> Vijay
>>
>> [1]
>> http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Core.html#afa9715e0c6aef68eb7bb84407cf15a5e
>>
>> On Sat, Jan 2, 2016 at 8:42 AM, Nico Schlömer <nico.schloemer at gmail.com>
>> wrote:
>> > Hi everyone,
>> >
>> > I'm trying to write a mesh in parallel with write_mesh [1].
>> > Unfortunately,
>> > it appears that only one process actually writes the file (or the other
>> > portions are overridden). I see there is also write_file [2]; haven't
>> > tried
>> > it yet.
>> >
>> > Anything I should know?
>> >
>> > Cheers,
>> > Nico
>> >
>> >
>> > [1]
>> >
>> > http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Interface.html#a4d4d0fa72b9578bfd6f2ec8410fe207c
>> > [2]
>> >
>> > http://www.mcs.anl.gov/~fathom/moab-docs/html/classmoab_1_1Interface.html#a96c55cc351c6d44b88330a2bf692996b


More information about the moab-dev mailing list