[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
970210: netcdf ftest with PROMULA FORTRAN
- Subject: 970210: netcdf ftest with PROMULA FORTRAN
- Date: Mon, 10 Feb 97 15:05:25 -0700
George,
>Date: Mon, 10 Feb 1997 14:22:19 -0500
>From: "George E. Juras" <address@hidden>
>Organization: PROMULA Development Corporation
>To: Steve Emmerson <address@hidden>
>Subject: Re: 970210: netcdf ftest with PROMULA FORTRAN
>Keywords: 199612121831.AA26117
In the above message you wrote:
> Thanks for sending me the revised promula script for doing the
> ftest test in netcdf. I tried it and this is what I get.
>
> As you can see near the end of the log below, we are still not
> issuing the correct link command.
Ah, the joys of remote support! ;-)
>
> Any help will be much appreciated.
>
> George
>
> Script started on Mon Feb 10 13:39:28 1997
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:make distclean
> rm -f a.out core *.o *.i *.a *.so.* *.sa.* \
> *.so *.u *.pure *.pure_hardlink *.pure_linkinfo conftest* \
> test.out \
> *.aux *.toc *.dvi \
> config.cache *.Z *.log tags TAGS MANIFEST *~ \
> Makefile config.status cc_id
...
> returning to directory /netcdf/netcdf-2.4.3/src
>
> /netcdf/netcdf-2.4.3/src: FC=`pwd`/promula
> /netcdf/netcdf-2.4.3/src: export FC
> /netcdf/netcdf-2.4.3/src:echo $FC
> /netcdf/netcdf-2.4.3/src/promula
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:./configure
> creating cache ./config.cache
> checking for catman... catman
> checking for fill-value usage... new usage
> checking the installation prefix... /netcdf/netcdf-2.4.3
> checking the installation exec-prefix... /netcdf/netcdf-2.4.3
> checking for c89... c89
> checking type of operating system... hpux10
> checking for ranlib... ranlib
> checking how to run the C preprocessor... c89 -E
> checking the C preprocessor... works
> checking for FORTRAN compiler... /netcdf/netcdf-2.4.3/src/promula
> checking for CC... no
> checking for CC... no
> checking for cxx... no
> checking for c++... no
> checking for g++... no
> checking for gcc... no
> checking for yacc... yacc
> checking for neqn... neqn
> checking for tbl... tbl
> checking for ar... ar
> checking for makeinfo... no
> checking for tar flags... -chof
> checking for dependency generation mechanism... c89 -M
> checking for C position-independent-code compile-option... +z
> checking whether cross-compiling... no
> checking size of int... 4
> checking size of long... 4
> checking type of nclong... long
> checking endianess... big endian
> checking type of netlong... long
> checking type of internal netlong... long
> checking for XDR header-file... -I/usr/include/rpc
> checking for XDR library...
> checking for xdr_long in default library... yes
> checking XDR implementation... ok
> checking type pointed to by inline XDR function... netlong
> checking XDR structure xdr_ops for x_getint member... no
> checking which XDR module to use... xdrposix
> checking for function prototype... yes
> checking for working const... yes
> checking for variadic function support... yes
> checking for strerror... yes
> checking compiler options for IEEE arithmetic...
> checking for size of block buffer... 8192
> checking for float.h... yes
> checking for stdlib.h... yes
> checking C header file <stdlib.h> for function malloc()... declared
> checking for package version... 2.4
> checking binary distribution directory... /home/ftp/pub/binary/hp9000-hpux10
> updating cache ./config.cache
> creating ./config.status
> creating Makefile
> creating xdr/Makefile
> creating libsrc/Makefile
> creating fortran/Makefile
> creating cxx/Makefile
> creating ncgen/Makefile
> creating ncdump/Makefile
> creating nctest/Makefile
> creating doc/Makefile
> creating port/master.mk
> creating port/Makefile
> creating libsrc/local_nc.h
> expanding `include's in file `Makefile'
> expanding `include's in file `xdr/Makefile'
> expanding `include's in file `libsrc/Makefile'
> expanding `include's in file `fortran/Makefile'
> expanding `include's in file `cxx/Makefile'
> expanding `include's in file `ncgen/Makefile'
> expanding `include's in file `ncdump/Makefile'
> expanding `include's in file `nctest/Makefile'
> expanding `include's in file `doc/Makefile'
> expanding `include's in file `port/master.mk'
> expanding `include's in file `port/Makefile'
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:make all
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/port
>
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/xdr
>
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/libsrc
>
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE array.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE attr.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE cdf.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE dim.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE file.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE iarray.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE error.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE globdef.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE putget.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE putgetg.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE sharray.c
> case `uname -sv` in \
> 'AIX 3') \
> CFLAGS=`echo +z -O | sed 's/-O[23]//g;s/-O//g'`; \
> c89 -c $CFLAGS -D_HPUX_SOURCE -D_POSIX_SOURCE string.c; \
> ;; \
> *) \
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE string.c; \
> ;; \
> esac
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE var.c
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE xdrposix.c
> ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o error.o
> globdef.o putget.o putgetg.o sharray.o string.o var.o xdrposix.o
> a - array.o
> a - attr.o
> a - cdf.o
> a - dim.o
> a - file.o
> a - iarray.o
> a - error.o
> a - globdef.o
> a - putget.o
> a - putgetg.o
> a - sharray.o
> a - string.o
> a - var.o
> a - xdrposix.o
> case "" in \
> '') ;; \
> *) ar rucv libnetcdf.a ;; \
> esac
> ranlib libnetcdf.a
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/fortran
>
> ./fortc -L . -O hpux10 common.inc > netcdf.inc
> ./fortc -L . -O hpux10 jackets.src > jackets.c
> c89 -c +z -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE jackets.c
> ar rcuv ../libsrc/libnetcdf.a jackets.o
> a - jackets.o
> ranlib ../libsrc/libnetcdf.a
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/ncdump
>
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE ncdump.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vardata.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE dumplib.c
> c89 -o ncdump -O ncdump.o vardata.o dumplib.o ../libsrc/libnetcdf.a
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/ncgen
>
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE main.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE load.c
> lex ncgen.l
> 524/1000 nodes(%e), 1695/6000 positions(%p), 234/500 (%n), 14134
> transitions, 301/1000 packed char classes(%k), 962/2000 packed
> transitions(%a), 1151/3000 output slots(%o)
> mv lex.yy.c ncgenyy.c
> yacc -d ncgen.y
> mv y.tab.c ncgentab.c
> mv y.tab.h ncgentab.h
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE ncgentab.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE escapes.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE getfill.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE init.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE close.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE genlib.c
> c89 -o ncgen -O main.o load.o ncgentab.o escapes.o getfill.o init.o close.o
> genlib.o ../libsrc/libnetcdf.a
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/nctest
>
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE varget.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vargetg.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE varput.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE varputg.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vardef.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vartests.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vputget.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE vputgetg.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE driver.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE cdftests.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE dimtests.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE rec.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE atttests.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE misctest.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE add.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE error.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE emalloc.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE val.c
> c89 -c -O -I../libsrc -D_HPUX_SOURCE -D_POSIX_SOURCE slabs.c
> c89 -o nctest -O varget.o vargetg.o varput.o varputg.o vardef.o vartests.o
> vputget.o vputgetg.o driver.o cdftests.o dimtests.o rec.o atttests.o
> misctest.o add.o error.o emalloc.o val.o slabs.o ../libsrc/libnetcdf.a
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `all' in directory /netcdf/netcdf-2.4.3/src/doc
>
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
> /netcdf/netcdf-2.4.3/src:
> /netcdf/netcdf-2.4.3/src:make test
>
> making `test' in directory /netcdf/netcdf-2.4.3/src/xdr
>
> c89 -c +z -O -I/usr/include/rpc -D_HPUX_SOURCE -D_POSIX_SOURCE
> xdrtest.c
> c89 -o xdrtest +z -O xdrtest.o
> ./xdrtest > xdrtest_out.new
> diff xdrtest_out.new testout.sav
> *** XDR passes formatted test ***
> cmp test.xdr test_xdr.sav
> *** XDR passes binary test ***
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `test' in directory /netcdf/netcdf-2.4.3/src/libsrc
>
> c89 -c +z -O -D_HPUX_SOURCE -D_POSIX_SOURCE cdftest.c
> ar rcuv libnetcdf.a array.o attr.o cdf.o dim.o file.o iarray.o error.o
> globdef.o putget.o putgetg.o sharray.o string.o var.o xdrposix.o
> case "" in \
> '') ;; \
> *) ar rucv libnetcdf.a ;; \
> esac
> ranlib libnetcdf.a
> c89 -o cdftest +z -O cdftest.o libnetcdf.a
> ./cdftest > cdftest_out.new
> diff cdftest_out.new testout.sav
> *** netCDF passes formatted test ***
> cmp test.nc test_cdf.sav
> *** netCDF passes binary test ***
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `test' in directory /netcdf/netcdf-2.4.3/src/nctest
>
> c89 -o nctest -O varget.o vargetg.o varput.o varputg.o vardef.o vartests.o
> vputget.o vputgetg.o driver.o cdftests.o dimtests.o rec.o atttests.o
> misctest.o add.o error.o emalloc.o val.o slabs.o ../libsrc/libnetcdf.a
> ./nctest
> *** Testing nccreate ... ok ***
> *** Testing ncopen ... ok ***
> *** Testing ncredef ... ok ***
> *** Testing ncendef ... ok ***
> *** Testing ncclose ... ok ***
> *** Testing ncinquire ... ok ***
> *** Testing ncsync ... ok ***
> *** Testing ncabort ... ok ***
> *** Testing ncdimdef ... ok ***
> *** Testing ncdimid ... ok ***
> *** Testing ncdiminq ... ok ***
> *** Testing ncdimrename ... ok ***
> *** Testing ncvardef ... ok ***
> *** Testing ncvarid ... ok ***
> *** Testing ncvarinq ... ok ***
> *** Testing ncvarput1 ... ok ***
> *** Testing ncvarget1 ... ok ***
> *** Testing ncvarput ... ok ***
> *** Testing ncvarget ... ok ***
> *** Testing ncvarputg ... ok ***
> *** Testing ncvargetg ... ok ***
> *** Testing ncrecinq ... ok ***
> *** Testing ncrecput ... ok ***
> *** Testing ncrecget ... ok ***
> *** Testing ncvarrename ... ok ***
> *** Testing ncattput ... ok ***
> *** Testing ncattinq ... ok ***
> *** Testing ncattget ... ok ***
> *** Testing ncattcopy ... ok ***
> *** Testing ncattname ... ok ***
> *** Testing ncattrename ... ok ***
> *** Testing ncattdel ... ok ***
> *** Testing nctypelen ... ok ***
>
> returning to directory /netcdf/netcdf-2.4.3/src
>
>
> making `test' in directory /netcdf/netcdf-2.4.3/src/fortran
>
> ar rcuv ../libsrc/libnetcdf.a jackets.o
> ranlib ../libsrc/libnetcdf.a
> ./fortc -L . -O hpux10 ftest.src > ftest.f
> /netcdf/netcdf-2.4.3/src/promula -c ftest.f
> PROMULA.FORTRAN to C V6.10 (01/28/97) (c) 1988-97 PROMULA Development Corp.
>
> Steve, this is where the script does not work.
>
> /netcdf/netcdf-2.4.3/src/promula -o ftest ftest.o -L../libsrc -lnetcdf
> /netcdf/netcdf-2.4.3/src/promula: Usage:
> /netcdf/netcdf-2.4.3/src/promula file_or_option ...
Ok. Replace the script (again) with the enclosed one and try again.
(You should just be able to do a `make' -- don't bother with `make
distclean').
--------
Steve Emmerson <address@hidden>
--------Begin new promula script
# Script for emulating a FORTRAN utility using the PROMULA `pfc'
# FORTRAN-to-C translator.
# Customizations. Modify as necessary.
#
translator=pfc
compiler=cc
# Print a message to standard error.
#
# Internal function.
#
errmsg()
{
echo 1>&2 $arg0: "$@"
}
# Translate and compile a file.
#
translate_and_compile()
{
file=$1
if eval $translator $tflags $file; then
name=`basename $file .f`
if eval $compiler -c $cflags $name.c; then
rm $name.c
else
errmsg "Unable to compile $file"
return 1
fi
else
errmsg "Unable to translate $file"
return 1
fi
}
# Decode the arguments.
#
arg0=$0
compile_only=no
args=
tflags=
cflags=
while :; do
case $# in
0)
break
;;
*)
case $1 in
-c)
compile_only=yes
;;
*)
args="$args $1"
;;
esac
;;
esac
shift
done
# Perform the action.
#
case $compile_only in
yes)
for file in $args; do
case "$file" in
*.f)
name=`basename $file .f`
if eval translate_and_compile $file; then
: true
else
break
fi
;;
*)
if eval $compiler -c $cflags $file; then
: true
else
errmsg "Unable to compile $file"
break
fi
;;
esac
done
;;
no)
garbage=
objs=
for file in $args; do
case "$file" in
*.f)
if eval translate_and_compile $file; then
obj=`basename $file .f`.o
objs="$objs $obj"
garbage="$garbage $obj"
else
break
fi
;;
*)
objs="$objs $file"
esac
done
case $? in
0)
$compiler $cflags $objs -lpfc -lm
;;
esac
rm -f $garbage
;;
esac
exit