interpic


Subject: interpic
From: Patrick D. Marquis (pdmarquis@tasc.com)
Date: Mon Jan 04 1999 - 15:30:42 MST


Hi:

I have been trying to compile the "interpic" tool for the CCM 3.6.6 and
am
running into difficulties. I am using Red Hat Linux 5.1 with the
Portland Group's Fortran 90
compiler (pgf90). I have tried both cc and pgcc for the C
compiler/preprocessor.
I ran into several problems along the way, including a double definition
of the function
"main", which I seem to have solved by renaming the main function in
main.c to "MAIN_". In addition, I had to rename the Fortran 90 source
files from .F90 to .f90 in order to get pgf90 to recognize the files.

The tool now compiles, with warnings (caused by pgf90 not allowing a
real*16 type) but
immediately core dumps with a segmentation fault when I attempt to run
it with the
example given on page 28 of the CCM3 users manual. (In the past, the
segmentation
fault has been caused by a too small stack size, but we have changed the
stack to
an unlimited size).

Anyway, any advice anyone can provide would be appreciated.

The output from running the Make and the changes I have made to the
Makefile to run on Linux follow.

Thanks

Patrick Marquis
TASC

Changes I made to the Makefile:

1) Added a Linux section for the compile and link flags
#------------------------------------------------------------------------

# Linux
#------------------------------------------------------------------------

ifeq ($(UNAMES), Linux)

CPP := /usrlocal/lib
CFLAGS := -DLinux -Df2cFortran $(cpp_path)

FFLAGS := -Df2cFortran -DLinux $(cpp_path) -r8 -i4 -O2 -c -Mdalign
-Kieee
LDFLAGS := -L$(LIB_NETCDF) -lnetcdf

endif

2) Added a "building dependency" section for Linux:
#------------------------------------------------------------------------

ifeq ($(UNAMES),Linux)
%.d : %.c
 @echo "Building dependency for $@"
 @ $(SHELL) -ec 'makedepend $(cpp_path) -f- $< \
               | head -1 \
               | sed -e '\''s/\/[^ ]*\///g'\''\
                     -e '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
               [ -s $@ ] || rm -f $@'

%.d: %.f90
 @ echo "Building dependency for $@"
 @ $(SHELL) -ec 'makedepend $(cpp_path) -f- $< \
               | sed -e '\''s/\/[^ ]*\///g'\''\
                     -e '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
               [ -s $@ ] || rm -f $@'

%.d: %.F
 @ echo "Building dependency for $@"
 @ $(SHELL) -ec 'makedepend $(cpp_path) -f- $< \
               | sed -e '\''s/\/[^ ]*\///g'\''\
                     -e '\''s/\($*\)\.o[ :]*/\1.o $@ : /g'\'' > $@; \
               [ -s $@ ] || rm -f $@'

else

%.d : %.c
 @echo "Building dependency for $@"
 @$(CPP) -M $(cpp_path) $< | head -1 | sed -e \
 's/\:.*\//:\ /' > $@

%.d : %.f90
 @echo "Building dependency for $@"
 @$(CPP) -M $(cpp_path) $< | sed -e \
 '/\/usr\/include\//d' -e 's/\:.*\//:\ /' -e 's/$*.o/& $@/g' > $@

%.d : %.F
 @echo "Building dependency for $@"
 @$(CPP) -M $(cpp_path) $< | sed -e \
 '/\/usr\/include\//d' -e 's/\:.*\//:\ /' -e 's/$*.o/& $@/g' > $@
endif

Output from running Make:

Building dependency for wrap_nf.d
Building dependency for main.d
Building dependency for lininterp.d
Building dependency for lencs.d
Building dependency for gauaw.d
Building dependency for fmain.d
Building dependency for bsslzr.d
Building dependency for addglobal.d
pgcc -DLinux -Df2cFortran -I. -I/usr/local/include -c addglobal.c -o
addglobal.o
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee bsslzr.f90
PGF90-W-0031-Illegal data type length specifier for real (bsslzr.f90:
27)
PGF90-W-0031-Illegal data type length specifier for bes (bsslzr.f90: 27)

PGF90-W-0031-Illegal data type length specifier for real (bsslzr.f90:
31)
PGF90-W-0031-Illegal data type length specifier for one (bsslzr.f90: 31)

PGF90-W-0031-Illegal data type length specifier for real (bsslzr.f90:
35)
PGF90-W-0031-Illegal data type length specifier for pi (bsslzr.f90: 35)
PGF90-W-0031-Illegal data type length specifier for real (bsslzr.f90:
36)
PGF90-W-0031-Illegal data type length specifier for bz (bsslzr.f90: 36)
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee fmain.f90
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee gauaw.f90
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 41)

PGF90-W-0031-Illegal data type length specifier for sinlat (gauaw.f90:
41)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 42)

PGF90-W-0031-Illegal data type length specifier for wgt (gauaw.f90: 42)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 43)

PGF90-W-0031-Illegal data type length specifier for one (gauaw.f90: 43)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 44)

PGF90-W-0031-Illegal data type length specifier for eps (gauaw.f90: 44)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 51)

PGF90-W-0031-Illegal data type length specifier for pi (gauaw.f90: 51)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 52)

PGF90-W-0031-Illegal data type length specifier for c (gauaw.f90: 52)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 53)

PGF90-W-0031-Illegal data type length specifier for fk (gauaw.f90: 53)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 54)

PGF90-W-0031-Illegal data type length specifier for xz (gauaw.f90: 54)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 55)

PGF90-W-0031-Illegal data type length specifier for pkm1 (gauaw.f90: 55)

PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 56)

PGF90-W-0031-Illegal data type length specifier for pkm2 (gauaw.f90: 56)

PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 57)

PGF90-W-0031-Illegal data type length specifier for pkmrk (gauaw.f90:
57)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 58)

PGF90-W-0031-Illegal data type length specifier for pk (gauaw.f90: 58)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 59)

PGF90-W-0031-Illegal data type length specifier for sp (gauaw.f90: 59)
PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 60)

PGF90-W-0031-Illegal data type length specifier for avsp (gauaw.f90: 60)

PGF90-W-0031-Illegal data type length specifier for real (gauaw.f90: 61)

PGF90-W-0031-Illegal data type length specifier for fn (gauaw.f90: 61)
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee lencs.f90
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee lininterp.f90
pgcc -DLinux -Df2cFortran -I. -I/usr/local/include -c main.c -o
main.o
pgf90 -Df2cFortran -DLinux -I. -I/usr/local/include -r8 -i4 -O2 -c
-Mdalign -Kieee wrap_nf.f90
pgf90 -o interpic addglobal.o bsslzr.o fmain.o gauaw.o lencs.o
lininterp.o main.o wrap_nf.o -L/usr/local/lib -lnetcdf
Linking:



This archive was generated by hypermail 2b27 : Thu Jun 01 2000 - 09:26:24 MDT