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