- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear all,
I am running a big code for flow simulation and when I am using a mesh with large number of nodes, FORTRAN 90 gave me an error F6773 cannot allocate array out of memory
So how I can handle this error and if I use intel FORTRAN the problem will be solved or not.
its about 10000 nodes and I have many arrays in the code , the biggest one dimension is (5*number of nodes ,5*number of nodes)
Regards
Regards
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am using Win 7 RAM 16 gigabyte, Fortran 90 under win 32 bit platform, I donnot know the total size of arrays , ut are as follows
ALLOCATE(u_n(3,nnodes),NJdxdy(3,8),STRAIN(3,NNODES,nsteps+1),U(3,NNODES),kzb(nuzb),kx1(nXaxis),FORCESTR(3*NNODES),TM3(NN,3*NN),kyf(NUyAXIS),knownfz(nuz),KNOWNXF(NUyAXIS),ZZ(NNODES),STLOAD(3*NNODES),Knownux(NUXAXIS),Knownuy(NUyAXIS),M5e(3*NN,3*NN),Knownx(nXaxis),KnownY(nyaxis),temp_load(nnodes),radius(nXaxis),vec(nxaxis),MDISP(NELE,4,16),CLOAD_1(nnodes),KKLOAD_1(nnodes))
ALLOCATE(loade(nnodes),pre(nnodes),forcep(nnodes),LOADV(3*NNODES),AKTU22(NELE,4,4),k_k(nnodes))
ALLOCATE(KX(nrw),Kre(nRe),M4e(nn,nn),ANS(4*NNODES),K_KLOAD(nnodes))
ALLOCATE(disp_init(3*nnodes),pressure_init(nnodes),temp_init(nnodes),delta_u(2*nnodes),load_dec(2*nnodes))
ALLOCATE(soln(nnodes),pressV(nnodes),ANST(nnodes,nsteps+1),anse(nnodes,nsteps+1),C_TEMP(NELE,8,8), C_TEMP1(NELE,8,8))
ALLOCATE(Kt(nnodes,nnodes),Kt1(nnodes,nnodes),ANSE1(nnodes,NSTEPS+1))
ALLOCATE(MATE(5*NN,5*NN),M3(NNODES,3*NNODES),tempval(5*AC_NODE ),pr(nnodes),Tr(nnodes),xx(nnodes),yy(nnodes),AKTU11(NELE,8,8))
ALLOCATE(F4(3*nnodes),force(3*nnodes +nnodes),ma_vec(2*nnodes +nnodes),mi_vec(3*nnodes +nnodes))
ALLOCATE(displacement_u(3*nnodes,nsteps+1),M8E( NN,NN),LOAD_C(nnodes),AKTU111(NELE,8,8) )
ALLOCATE(KTP(nn,nn),refsoln(5*AC_NODE),stress_index(3*NNODES),TEMP_L(2*nnodes),TEMPL_1(2*nnodes))
ALLOCATE(STRESSRT(NNODES,3),bcout(nrelem,3),bcin(nrwelem,3),AKTU222(NELE,4,4))
ALLOCATE(Xini(Nnodes),Yini(Nnodes),Ake1(Nele,8,8),STRESS_INIT(NNODES,3),AKT1(NELE,8,8))
ALLOCATE(pressure_new(nnodes),TEMPERATURE_NEW(nnodes),BOUNDX(NMIN ,3) )
ALLOCATE(LOADSTR(3*NNODES),akp(NELE,8,8),DT(NSTEPS),AREA(NELE),STRESS_HISTORY(NSTEPS,NNODES,3),CORNER_NODE(nnodes,2))
nnodes : is the total number of nodes
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Even with allocatable arrays, under Windows 32-bit with Fortran you can't use more than 4GB total for all of the following: Windows OS, your program, your data, .....
As you have so much RAM, it would make more sense to switch to 64-bit Windows and ifort for Intel64.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Are you still using Microsoft Fortran PowerStation?
2GB is indeed the limit on 32-bit Windows for all program virtual memory combined.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Sergey,
The Task Manager does not tell you how much memory is allocated. It tells you how much is in use. Depending on O/S version, memory becomes in-use when the process first touches the allocated memory (page granularity). Thus allocation alone is insufficient. For a memory test program, after (first) allocation you would need to walk the allocated memory using page sized probes (e.g. read or write something every 4KB or 4MB within the allocation). You normally do not do this in an application unless you have a requirement that the allocation us usable. Note, if the page file is too small and not permitted to grow, it is not unusual to receive a "page fault" when writing data to a successfully allocated buffer.
Jim Dempsey
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Reda A.
My recommendation to you is that you
- rewrite the code so that you have one array allocated per line of code
- import this code into Excel
- text to columns, using (,) as delimiters can help with this.
- compute the size of each array, including the kind/byte size of each variable type.
- use reference to each variable size, so you can test the change to memory usage for changes to problem dimension.
Use of a VLOOKUP for parameters is a good idea, as this allows to sort the allocate lines, based on size.
I would recommend that this would give you a good insight into where all the memory usage is taking place.
A good coding technique is to map out where the arrays are being use, as typically they are not all used at the same time.
There is a long history of sparse memory techniques to reduce memory usage. Creating indexed tables of values is also a useful technique.
Even with 64-bit, mapping techniques to reduce array sizes often result in significant reduction in run times, by mapping out needless computation of zero values.
You certainly have identified a diverse group of variables in your earlier post.
John
ps : I have attached a spreadsheet of dimensions. It needs correction for parameter values and variable KIND. Once corrected it will show you where the memory is being used. Although you havn't indicated the variable sizes, I would suspect this will identify what to change. I have named "select_data" to help with the sort.

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page