Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

allocate different amounts of memory to different dimensions of an arr

Status
Not open for further replies.

efoss

Technical User
Nov 27, 2005
16
0
0
US
I'd like to index a lot of 20 character strings on 2 different numbers. I'm working with very large numbers of these character strings (32 million) and I'm running into trouble because Fortran doesn't want to let me make variables that big. I can always split things into smaller groups, but I want to avoid this as much as possible. So, I'm wondering if there's some way to allocate different amounts of memory into different dimensions of an array. Let's say I have an array with an integer in the first dimension, an integer in the second dimension, and a 20 character string in the third dimension. If I just declare this:

CHARACTER (len 20) :: array(5000,2000,1000000)

then I assume that I'm wasting a lot of memory in those first two dimensions. Is there a way for me to get around this?

Thanks.

Eric
 
I've posted the solution on the Belution website where you asked the same question.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top