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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with 64bit app

Status
Not open for further replies.

BStopp

Programmer
Dec 29, 2003
29
US
First some background:

Server type: unknown
OS: Sun Solaris 8
OS Support: sparcv9 & sparc

I converted this application from 32bit to 64bit. From what i can tell it compiles & links in 64 bit. (All the flags necessary for 64bit are being passed to compiler, ie: -xarch=v9 for CC/f77 & -64 for ild). However when i run the application in 64 bit it has a Segmentation fault & core dumps. I've debugged the code in Forte and found that the specific line that dies is the following:

Code:
READ(CSTRNG(VARSTR:VARSTR+VARLEN-1),'(I<VARLEN>)') VARCHR

Where CSTRNG is a character pointer to a rather large block of memory passed from the main module(C), VARSTR = 1 & VARLEN = 4

Now I spent a month getting the application to actually compile then a week to get it to link, finding out that i needed certian libraries specified in the LD_LIBRARY_PATH_64 environment variable for it to link to the correct ELFCLASS. I also know that if these library locations aren't specified in the LD_LIBRARY_PATH_64 at runtime, the application will die with the ELFCLASS error.


My current thinking is that the dynamic library being called to execute the Fortran READ() function is incorrect. I get the impression that it's still pointing at the 32bit version and not the 64bit.

Is there a way to force Fortran to use the 64bit library? IS there a 64 bit library, and if so, where would it "normally" be located, and what's it called?

Anyone had this problem before or know something to help me out?

Thanks
-B
 
Oh two more questions:

Is there a place or website out there that has the API for all Fortran's standard library functions?

did the READ() function specifications change from 32bit to 64bit.

-B
 
I haven't used Solaris for a few years so the info may be slightly out.

1) Is there a 64 bit equivalent of ldd?
2) On 32 bits, what I'd normally do is to type ldd <executable>

This will show you what libraries it is picking up. That way, you know exactly what it is doing without guessing.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top