I'm having trouble downloading the g95 source- keeps dying after only a few k. If anyone is willing to put their old g95 source up on a website for a day, I'd like to download it and try it out.
We're having issues with Absoft and Apple. When I try to statically allocate more than 4 GB of RAM, I get a Bus Error.
I would be interested to know if anyone can get this to run with g95...
program test_memory
IMPLICIT NONE
INTEGER NMAX
PARAMETER(NMAX=600)
DOUBLE PRECISION U(NMAX,NMAX,NMAX)
INTEGER i,j,k,n,nh,iter
open(unit=12,file='U.dat')
n=NMAX
nh=n/2
do iter=1,10
do k=1,n
do j=1,n
do i=1,n
U(i,j,k)=dble(i)
enddo
enddo
enddo
enddo
c Write out a sample of the data
do i=1,n
write(12,*)U(i,nh,nh)
enddo
STOP
END
According to Absoft...
--------------------------------
The reason for the runtime failure is actually an issue with the Apple
development environment which we have reported to Apple but which has
not yet been resolved. The example code below basically does the same
thing as your example, but it is written in C and uses only Apple
components to build. The code just creates a large memory space, then
accesses it. The result is a segmentation fault:
// Compile as gcc -m64 large
cblock.c to see the crash
#define N 15000
#define N2 N*N
struct one {
double a[N2];
double b[N2];
double c[N2];
} large_block;
int main()
{
double x,y,z;
x = large_block.a[0];
y = large_block.b[0];
z = large_block.c[0];
return 0;
}
I'm afraid that there is really no workaround I can offer at the present
time.
-----------------------------------
Now it has been shown we can dynamically allocate more than 4 GB of RAM, but given all of our various codes, it would be prohibitive to reprogram everything as opposed to switching our crunching to amds.
The g95 binary from www.g95.org yields this error when compiling the above fortran code...
ld64 failed: library not found for -lf95
I'm assuming that this means I need to compile and install g95 from source for the appropriate 64-bit libraries?
Thanks for any help anyone can give.
Fuzzy