# Can we use a large derived type over 2GiB Sizes?

**URL:** <https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326>\
**Category:** nvc, nvc++ and nvfortran\
**Created:** [June 27, 2025, 4:35am UTC](https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326 "2025-06-27T04:35:36Z")\
**Posts on this page:** 4\
**Page:** 1

<div class="post-metadata">

**Author:** ![ishikawa12](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ishikawa12](https://forums.developer.nvidia.com/u/ishikawa12)\
**Post date:** [June 27, 2025, 4:35am UTC](https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326/1 "2025-06-27T04:35:36Z")

</div>

Dear all,

I am working on an HPC program on an NVIDIA system.  
The program has been used for many years with Fortran from a non-NVIDIA provider, combined with CUDA C/C++ to use GPU accelerator cards.

Now I have to use nvfortran for the Fortran part. I encountered a segmentation fault error while working with a large dataset.  
More specifically, the error occurs when accessing a derived type variable that contains a tower of multi-rank arrays of large data size over 2GiB.

So my question is, can we use a large derived type over 2GiB Sizes ?  
I used the compiler option -mcmodel=medium.  
To answer this question, I wrote a test program and attached it below.  
Best,  
Ken-Ichi  
[TEST\_LARGE\_DERIVED\_TYPE.tar.gz](https://forums.developer.nvidia.com/uploads/short-url/ceyeKLEMMoVkq7hLk5y8p6lfd6V.gz) (3.5 KB)

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [June 30, 2025, 6:45pm UTC](https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326/2 "2025-06-30T18:45:12Z")

</div>

Thanks Ken-Ichi. I’ve filed this one as TPR #37539.

I don’t have a good work around for you. Possibly instead of having fixed size arrays, make them all allocable. I believe what’s happening is because the structure is one very large 5.6GB object, the offset when ieo goes to the second index overflows. Then again, the medium or large memory model should account for this, so could off a bit on my analysis.

---

<div class="post-metadata">

**Author:** ![ishikawa12](https://developer.download.nvidia.com/images/forums/profile-default-devtalk-84.png) [@ishikawa12](https://forums.developer.nvidia.com/u/ishikawa12)\
**Post date:** [July 2, 2025, 1:23am UTC](https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326/3 "2025-07-02T01:23:15Z")

</div>

Dear Mat,

Thank you for checking this issue. I hope this will be resolved in the next version of nvfortran.  
Best,  
Ken-Ichi

---

<div class="post-metadata">

**Author:** ![MatColgrove](https://sea2.discourse-cdn.com/nvidia/user_avatar/forums.developer.nvidia.com/matcolgrove/32/14047_2.png) [@MatColgrove](https://forums.developer.nvidia.com/u/MatColgrove)\
**Post date:** [January 28, 2026, 11:32pm UTC](https://forums.developer.nvidia.com/t/can-we-use-a-large-derived-type-over-2gib-sizes/337326/4 "2026-01-28T23:32:13Z")

</div>

Hi Ken-Ichi,

FYI, TPR #37539 was fixed in our 26.1 release.

-Mat
