Error: attempt to move .org backwards

  • Thread starter Thread starter mrz1982
  • Start date Start date
  • Tags Tags
    Error
AI Thread Summary
The discussion centers around an error encountered during compilation using MinGW, specifically related to memory limits when declaring large arrays in Fortran. The error messages indicate issues with moving the `.org` directive backwards, which may stem from the size of the arrays being declared, such as REAL VarX(200001,252) and others, each consuming nearly 400 megabytes. The user is working on a Windows XP 32-bit system with 4GB of RAM, which is likely contributing to the memory limitation issue. Suggestions include breaking the large arrays into smaller pieces or using dynamic memory allocation instead of static arrays, as dynamic allocation may help manage memory more effectively. The user acknowledges the difficulty in breaking the arrays due to the nature of their problem but expresses intent to explore dynamic allocation for a potential solution.
mrz1982
Messages
10
Reaction score
0
Hi!

When I compile I am getting this error:
Code:
C:\libmingw>C:\MinGW\bin\mingw32-make.exe
g77 -c -O2 fgnmod.f
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s: Assembler messages:
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1018: Error: attempt to move .org backwards
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1019: Error: attempt to move .org backwards
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1020: Error: attempt to move .org backwards
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1021: Error: attempt to move .org backwards
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1022: Error: attempt to move .org backwards
C:\DOCUME~1\Z\LOCALS~1\Temp/ccyybaaa.s:1023: Error: attempt to move .org backwards
mingw32-make: *** [fgnmod.o] Error 1
This comes as I am trying to declare these variables
Code:
	REAL VarX(200001,252), VarY(200001,251)
	REAL VarX1(200001,501), VarY1(200001,500)
	REAL VarX2(200001,501), VarY2(200001,500)
	REAL VarX3(200001,501), VarY3(200001,500)
	REAL VarX4(200001,501), VarY4(200001,500)
	REAL VarX5(200001,501), VarY5(200001,500)
I don't get this error and this code works as these variables are (2001,*), i.e. 100 times smaller. I have a feeling this can have something to do with memory limits of the compiler or the computer. Is there any way to increase this limit (if that is the problem)? or how can this otherwise be solved?
I need to run this code with variable of size (350001,*) or larger.

I should add that I am working with a WinXP (i think 32 bit) with 4GB RAM (of course this is not used as WinXP cannot handle 4GB RAM).

/Z
 
Technology news on Phys.org
mrz1982 said:
I don't get this error and this code works as these variables are (2001,*), i.e. 100 times smaller. I have a feeling this can have something to do with memory limits of the compiler or the computer. Is there any way to increase this limit (if that is the problem)? or how can this otherwise be solved?
I need to run this code with variable of size (350001,*) or larger.

I should add that I am working with a WinXP (i think 32 bit) with 4GB RAM (of course this is not used as WinXP cannot handle 4GB RAM).

/Z
Good luck with that! Each of those arrays is nearly 400 megabytes in size.
 
Agreed. I recently started a numerical analysis with around 300k grid points. My grid was split into around 100 blocks and takes 6 days to solve on 16 processors.
 
I don't have any time constraints, let it take 1 week to run the code, that is fine by me as long as it works!
 
The point is that a lot of work and research is done to be able to solve large problems numerically.

Is there any way to break those arrays into smaller pieces? I'm guessing it just simply doesn't like the size of those.

edit: When we do a large CFD run, sometimes involving MILLIONS of grid points, usually the largest allocated array is on the order of 100x100x100.
 
There's a huge difference between dynamically allocated arrays and static arrays. Have you tried going to dynamic allocation?
 
In my case it is not possible to break the arrays into smaller pieces. But I will try to allocate the arrays dynamically (as soon as I find out how :) )
 

Similar threads

Replies
4
Views
3K
Replies
3
Views
5K
Replies
2
Views
2K
Replies
9
Views
5K
Replies
4
Views
4K
Replies
1
Views
3K
Back
Top