Skip to content

ex_close fails if file is mode is EX_READ or EX_CLOBBER in parallel #467

@bourdin

Description

@bourdin

This sequence (trivial modification of testrd_par.c):

exoid = ex_open_par("test.exo",        /* filename path */
                          EX_READ,           /* access mode = READ */
                          &CPU_word_size, /* CPU word size */
                          &IO_word_size,    /* IO word size */
                          &version,       /* ExodusII library version */
                          mpi_comm, mpi_info);
  error = ex_close(exoid);

produces the following error:

Exodus Library Warning/Error: [ex_close] in file 'test.exo'
        ERROR: failed to close file id 65536
        NetCDF: Write to read only

If the file is open with ex_open, the code runs fine

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions