Error: attempt to move .org backwards

  • Thread starter Thread starter mrz1982
  • Start date Start date
  • Tags Tags
    Error
Click For Summary

Discussion Overview

The discussion revolves around an error encountered during compilation related to large array declarations in a Fortran program. Participants explore potential causes of the error, including memory limits of the compiler and the operating system, as well as strategies for managing large data arrays.

Discussion Character

  • Technical explanation
  • Debate/contested
  • Mathematical reasoning

Main Points Raised

  • One participant reports an error message indicating an attempt to move .org backwards when declaring large arrays, suggesting a possible memory limit issue.
  • Another participant notes that their similar code works with smaller arrays, implying that size may be a critical factor in the error.
  • Concerns are raised about the feasibility of running large numerical simulations with significant memory requirements, with one participant mentioning a numerical analysis involving around 300k grid points.
  • Suggestions are made to break large arrays into smaller pieces to avoid memory issues, with one participant recalling experiences with large computational fluid dynamics (CFD) runs.
  • A distinction is made between dynamically allocated arrays and static arrays, with a suggestion to consider dynamic allocation as a potential solution.
  • One participant expresses a willingness to let the code run for an extended period if it resolves the issue, indicating a focus on finding a working solution rather than speed.

Areas of Agreement / Disagreement

Participants express varying opinions on how to address the memory issue, with some advocating for dynamic allocation while others suggest breaking arrays into smaller pieces. There is no consensus on the best approach to resolve the error.

Contextual Notes

The discussion highlights limitations related to the operating system's handling of memory and the implications of array size on compilation and execution. Specific assumptions about memory allocation and compiler behavior are not fully resolved.

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 ·
Replies
4
Views
3K
  • · Replies 4 ·
Replies
4
Views
2K
  • · Replies 3 ·
Replies
3
Views
4K
  • · Replies 3 ·
Replies
3
Views
6K
  • · Replies 2 ·
Replies
2
Views
2K
  • · Replies 9 ·
Replies
9
Views
5K
  • · Replies 10 ·
Replies
10
Views
6K
  • · Replies 4 ·
Replies
4
Views
4K
  • · Replies 1 ·
Replies
1
Views
3K
  • · Replies 1 ·
Replies
1
Views
3K