Silverfrost Forums

Welcome to our forums

Access violation error in 64-bit; works in 32-bit

2 Aug 2019 2:46 #24145

Quoted from ahalls_dsc

The full program aims to relocate a country's worth of employment and population using a distance deterrence function. If I'm understanding this point in the program correctly, the array is necessary to be able to optimise the entire modelled area at once. The modelled area we are working with is many times larger than any previously, hence the overflow and the need for optimisation.

Quite often, the complexity of the algorithm used for a class of problems is such that when the problem size is increased drastically the previously well-performing algorithm becomes unsuitable. For example, in FEA models, a banded matrix solver is used instead of a dense matrix solver.

Another issue, which has already been discussed somewhat, is that when the problem becomes huge it is no longer feasible to load all the data, process everything in memory, and then write out the results.

Do you have a mathematical description of the problem, and some references to previous work?

3 Aug 2019 6:39 #24151

Paul, By the way the demo example above with SAVE did not increase EXE size. But major question is why /stack:3000 or larger does not make this demo to work as it should be?

3 Aug 2019 7:07 #24152

Paul, By the way the demo example above with SAVE did not increase EXE size. But major question is why /stack:3000 or larger does not make this demo to work as it should be?

4 Aug 2019 7:01 #24154

A local array with the SAVE attribute does not go on the stack.

4 Aug 2019 8:58 #24155

But does it help? When i add SAVE to the code above i get this.

https://i.postimg.cc/8zLFtdVx/Image25.jpg

4 Aug 2019 10:30 #24159

This access violation occurs because of a bug in FTN95 which has already been fixed. When corrected FTN95 provides an error report something like....

error 1207 - AMD backend failure:Insufficient static store for DDFUNCVAL at line 5

This is because there is currently a 1GB limit on the amount of SAVEd data that is allowed.

6 Aug 2019 4:59 #24160

Regarding the use of large arrays in COMMON with FTN95 /64, Silverfrost FTN95 appears to be unique in it's implementation of large COMMON arrays, while most other compilers (including iFort and gFortran) do not allow large COMMON. It is a shame that other compilers do not learn from FTN95's approach. (probably because they want to remove COMMON from the language!!)

If you want to use large arrays, the most portable way is to place them in a MODULE and use ALLOCATE when the required size is known.

This should be preceded by a check of their memory requirement, as the more common problem to occur is that the memory required exceeds either the amount of physical memory installed or the amount of virtual memory enabled in c:\pagefile.sys. Either of these mistakes can freeze the pc and be a difficult crash to recover from.

Please login to reply.