Operating System - HP-UX
1852151 Members
7042 Online
104064 Solutions
New Discussion

Problem compiling fortran90 source on itanium machine

 
SOLVED
Go to solution
Rene_17
Regular Advisor

Problem compiling fortran90 source on itanium machine

On the Pa-Risc machines the source is compiled well, but on the itanium machine the source is compiled with error !

[iff4:]/root# f90 header.f
header.f
program HEADER

33 Lines Compiled
ld: Unsatisfied symbol "gethostname_" in file header.o
1 errors.

I don´t know why the system call is not working on the itanium machines ?

Regards,

Re
3 REPLIES 3
Gregory Fruth
Esteemed Contributor
Solution

Re: Problem compiling fortran90 source on itanium machine

gethostname() is actually a C routine in
libc. You have to follow the rules for
C<->Fortran linking. Specifically, Fortran
compilers often add underscores to routine
names. You can tell f90 to not add the
underscore by using the +noppu flag.

The reason the behavior is different is
that on PA-RISC 32-bit the default is
"f90 +noppu", while on PA-RISC 64-bit
and on Itanium the default is "f90 +ppu".

In Fortran you should probably use HOSTNM()
anyway. HOSTNM() is a native Fortran routine. (However it's in libU77, so
use "f90 +U77" to access it.)
Zygmunt Krawczyk
Honored Contributor

Re: Problem compiling fortran90 source on itanium machine

Hi Rene,

try to use +noppu option to the f90 compiler on the Itanium machine.

Regards,
Zygmunt
Rene_17
Regular Advisor

Re: Problem compiling fortran90 source on itanium machine

That´s it !
Thanks for your professional help !

Regards,

Re