Subject: Linking fortran source with g90 util.a

From: <[email-masked]>
Date: Mon, 3 Jan 1994 15:27:18 -0500 (EST)

Dear Net,
I have been trying to link my fortran77 code with the g90 
version of library util.a on the IBM RS6K platform using 
xlf fortran version 3.2.  When I call fopen, to open the existing
checkpoint file, I get a segmentation fault.  I in-lined fopen, finding that
the fault is associated with the character variable fname*(*).
I changed this to character*8 and hardwired fname, only to
get a similar fault from the routine ntropn, called by fopen.
I am pretty sure I am missing a compiler or loader flag, especially 
since everything works so well under UNICOS.

My question: Does anyone out there have a protocol for successfully
             compiling and linking (loading) fortran source with the 
             g90 (or g92) util.a library using xlf fortran that they
             would please, please share with me?

Following is the makefile that I adapted from the g92 make.link.  

Thanks in advance for any pointers,
Matt Challacombe
[email-masked]
-------------------------------------------------------------------------------
FFLAGS = -qextname -qcharlen=1024 -NQ40000 -NT40000 -ND8192 -O
RUNF77 = xlf
FC = xlf -lblas
RECOMPILEUS = rhodos.o readit.o 

rhodos : $(RECOMPILEUS)
	$(FC) -o rhodos $(RECOMPILEUS)  -L/ds5/f/scratch/challa/source -lutil 
rhodos.o : rhodos.f
	$(RUNF77) $(FFLAGS) -c  rhodos.f
readit.o : readit.f
	$(RUNF77) $(FFLAGS) -c  readit.f