FYI. In PnetCDF inq_var family APIs are independent APIs.
If PIOc_inq_var intends to be collective, then isn't it sufficient
to just check the consistency of ncid and varid? That way,
you can save those Bcast calls at the end. Such Bcast consistency
checks should be the PnetCDF/HDF5/ADIOS I/O library's responsibility.
FYI. In PnetCDF
inq_var
family APIs are independent APIs. If PIOc_inq_var intends to be collective, then isn't it sufficient to just check the consistency ofncid
andvarid
? That way, you can save those Bcast calls at the end. Such Bcast consistency checks should be the PnetCDF/HDF5/ADIOS I/O library's responsibility.https://github.com/E3SM-Project/scorpio/blob/ac679a546c2345e1b94e0fbb54d06115b91e792c/src/clib/pio_nc.c#L1436-L1560