# Netcdf large file support

**URL:** <https://forum.hdfgroup.org/t/netcdf-large-file-support/1215>\
**Category:** Hdf-forum archives\
**Created:** [February 9, 2009, 3:49am UTC](https://forum.hdfgroup.org/t/netcdf-large-file-support/1215 "2009-02-09T03:49:34Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![Nikhil\_Laghave1](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/n/3be4f8/32.png) [@Nikhil\_Laghave1](https://forum.hdfgroup.org/u/Nikhil_Laghave1)\
**Post date:** [February 9, 2009, 3:49am UTC](https://forum.hdfgroup.org/t/netcdf-large-file-support/1215/1 "2009-02-09T03:49:34Z")

</div>

Hello All,

I am trying to create files larger than 2 GB using pnetcdf, but the  
application crashes. I understand I need to use NF\_64BIT\_OFFSET flag in the  
nfmpi\_create call, but I do not know how to pass this argument. This may seem  
a very silly question. I am sorry about that.

In C I think we need to pass NC\_64BIT\_OFFSET | NC\_CLOBBER, but similar  
approach does not work with fortran. Can some one send me an example of the  
API for fortran?

Right now, this is how I am making the call, which is not working.  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;retval = nfmpi\_create(comm, "nikhil.nc",NF\_64BIT\_OFFSET,  
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& info, ncid)

Thanks.

Regards,  
Nikhil

> **···**
>
> ----------------------------------------------------------------------  
> This mailing list is for HDF software users discussion.  
> To subscribe to this list, send a message to [hdf-forum-subscribe@hdfgroup.org](mailto:hdf-forum-subscribe@hdfgroup.org).  
> To unsubscribe, send a message to [hdf-forum-unsubscribe@hdfgroup.org](mailto:hdf-forum-unsubscribe@hdfgroup.org).

---

<div class="post-metadata">

**Author:** ![robl](https://forum.hdfgroup.org/letter_avatar_proxy/v4/letter/r/e9a140/32.png) [@robl](https://forum.hdfgroup.org/u/robl)\
**Post date:** [February 9, 2009, 2:11pm UTC](https://forum.hdfgroup.org/t/netcdf-large-file-support/1215/2 "2009-02-09T14:11:12Z")

</div>

Hi Nikhil

I think you probably meant this to go to the parallel-netcdf list,  
right? I copied both lists so people know I answered you, but let's  
follow up to just parallel-netcdf for the rest of this thread.

I'm not a fortran guy, but what I think what you want to do is define  
an integer 'flags' and then add NF\_64BIT\_OFFSET and NF\_CLOBBER  
to that flags variable.

integer flags  
flags = NF\_CLOBBER + NF\_64BIT\_OFFSET  
nfmpi\_create(comm, "foo.nc", flags, info, ncid)

what does your application crash look like? I would hope that we  
catch invalid flags at nfmpi\_create time, and not later on. Can you  
'nfmpi\_strerror' the return code?

==rob

> **···**
>
> On Sun, Feb 08, 2009 at 09:49:38PM -0600, Nikhil Laghave wrote:
> 
> > I am trying to create files larger than 2 GB using pnetcdf, but the  
> > application crashes. I understand I need to use NF\_64BIT\_OFFSET flag in the  
> > nfmpi\_create call, but I do not know how to pass this argument. This may seem  
> > a very silly question. I am sorry about that.
> > 
> > In C I think we need to pass NC\_64BIT\_OFFSET | NC\_CLOBBER, but similar  
> > approach does not work with fortran. Can some one send me an example of the  
> > API for fortran?
> > 
> > Right now, this is how I am making the call, which is not working.  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;retval = nfmpi\_create(comm, "nikhil.nc",NF\_64BIT\_OFFSET,  
> > &nbsp;&nbsp;&nbsp;&nbsp;&nbsp;& info, ncid)
> 
> --  
> Rob Latham  
> Mathematics and Computer Science Division A215 0178 EA2D B059 8CDF  
> Argonne National Lab, IL USA B29D F333 664A 4280 315B
> 
> ----------------------------------------------------------------------  
> This mailing list is for HDF software users discussion.  
> To subscribe to this list, send a message to hdf-forum-subscribe@hdfgroup.org.  
> To unsubscribe, send a message to hdf-forum-unsubscribe@hdfgroup.org.
