Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

problem with external subroutine E01BAF

Status
Not open for further replies.

olena

Technical User
Sep 26, 2006
2
CZ
Please help me, I'm at the begining with learning of Fortran and couldn't solve a problem with my program by myself.

I need to use external subroutine from library NAG E01BAF for interpolation, but it doesn'n work because of problems with definition of WRK(LWRK):
WRK WORKSPACE ARRAY, OF LENGTH LWRK.
LWRK ACTUAL DECLARED DIMENSION OF WRK.

I used the allocate command in the sobrputine
allocate(WRK(LWRK))
after definition of LWRK, but the program stopped at this line and write an error:
forrtl: severe (174): SIGSEGV, segmentation fault occurred

I don't see any mistake in programme, can somebody help me, please?
 
Code:
real, allocatable, dimension (:):: wrk
....
allocate (wrk(lwrk))
...
call E01BAF (...)
 
thank you a lot,
but I have exactly the same in my program (real(8), allocatable :: WRK:)) in module) and it doesn't work :-(
I thought if there is not some special rules for WRK, the program don't. like the row with allocate.
 
I'm not sure but I think real(8) and real*8 are two different things. One is an array of 8 elements and the other is a real of 8 bytes. Try this
Code:
real*8, allocatable, dimension(:):: WRK
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top