Code Comments
Programming Forum and web based access to our favorite programming groups.I hope this post is located in the correct group, if not I apologize in advance. I'm trying to compile a code on a Mac-(G5, OS X 10.3 Panther) using xlf90 (IBM XL Fortran 8.1). The code uses BLAS/LAPACK extensively and I've attempted linking with both the vecLib Framework and compiling my own libraries both yielding the same result. The problem appears to be related to the call of malloc or malloc_create_zone. I've compiled smaller test codes in an effort to hunt down the problem but gdb prints the error message "Program received signal EXC_BAD_ACCESS, Could not access memory. 0x9001f654 in malloc_create_zone ()" for anything I try using any set of linked libraries. I've set breakpoints at the earliest stages of the code with no success. To get the code to compile, I must link with the System.B, and crt1.o OS X libraries. I've also tried compiling a very simple code (shown below) pulled off of lang.fortran that uses ALLOCATE/DEALLOCATE with no problems. Any help or suggestion would certainly be appreciated. -Chris ------------code below------------ PROGRAM testmem2 REAL, ALLOCATABLE :: A(:,:) integer i,e,j print *,'Press a numeric key & enter to start' read *,e allocate (A(10000,10000)) do 100 i=1, 10000, 1 do 200 j=1, 10000, 1 a(i,j)=4 200 continue 100 continue print *,'Press a numeric key & enter to deallocate' read *, e deallocate(A, STAT=e) print *, 'Error',e call sleep(5) END PROGRAM testmem2
Post Follow-up to this messagePowered by vBulletin
Copyright 2000-2006 Jelsoft Enterprises Limited.