PNetCDF C++ API, and open() and close() NcmpiFile members

Wei-Keng Liao wkliao at northwestern.edu
Fri Dec 11 08:50:05 CST 2020


Hi, Matt

Will it work if you call PnetCDF's C APIs in your C++ program?

Wei-keng

On Dec 10, 2020, at 11:47 PM, Norman, Matthew <normanmr at ornl.gov<mailto:normanmr at ornl.gov>> wrote:

Hi,

Is there a C++ API for PNetCDF? I see an API for C, but I can't find one for C++. The examples are helpful but not enough for using the C++ interface.

Specifically, I'm running into a problem where there is no open() or close() for the NcmpiFile class. It seems in the examples that I'm expected to do this only via the NcmpiFile constructor and destructor. However, the way I'm using PNetCDF, I need the file to stay open across multiple write calls, so it needs to be a class object in my wrapper class.

I tried assigning another NcmpiFile object to my class's NcmpiFile object to open a file, but it looks like the move and copy constructores are private instead of public.

Any suggestions on how to do this and where to find the C++ API?

Thanks,

-Matt

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/parallel-netcdf/attachments/20201211/126bf11d/attachment.html>


More information about the parallel-netcdf mailing list