aslam@m.cs.uiuc.edu (08/03/88)
Has the NCAR, version 2, graphics package been ported to the Encore? If so, I would like to hear about the experience. I tried to port the UNIX version running on the sun to the encore. Everything compiles fine but the test utilities fail upon execution. Here's the blurb from the fortran compiler to indicate which version of F77 I am using: Fortran-32000 1.8.4 Copyright (C) 1983,1984,1985,1986,1987 Green Hills Software, Inc. All rights reserved. Release 2.0.r051 Sohail Aslam Department of Computer Science University of Illinois arpa aslam@cs.uiuc.edu usenet uiucdcs!aslam bitnet aslam@uiucdcs.BITNET
aslam@m.cs.uiuc.edu (08/04/88)
Well, I decided to dig in and find out what is causing problem with the NCAR graphics package. A number of routines take their default values from fortran blockdata. The files containing blockdata are compiled as other .f files and archived in .a libraries. For some reason, Fortran Blockdata doesn't work if loaded from a library. Could someone tell me if I need to do anything special? Here is an example of what I mean. Consider the following two tiny files: % % cat bd.f blockdata dummy common / A / ncp, mio data ncp, mio /10, 11/ end % % cat test.f c test whether block data works common/A/ ncp, mio print *, 'ncp =', ncp, ' mio = ', mio stop end First try compiling the files directly: % f77 -v test.f bd.f F77 release: 02.00.r051 test.f: /usr/lib/fcom test.f -X110 -X154 -X85 -X22 -X64 -X74 -X151 -X88 -X100 -X9 -X39 -X230 -X211 -Z54 -X183 -X80 -ga -X71 -X102 -X50 -X193 -X75 Fortran-32000 1.8.4 Copyright (C) 1983,1984,1985,1986,1987 Green Hills Software, Inc. All rights reserved. Release 2.0.r051 bd.f: /usr/lib/fcom bd.f -X110 -X154 -X85 -X22 -X64 -X74 -X151 -X88 -X100 -X9 -X39 -X230 -X211 -Z54 -X183 -X80 -ga -X71 -X102 -X50 -X193 -X75 Fortran-32000 1.8.4 Copyright (C) 1983,1984,1985,1986,1987 Green Hills Software, Inc. All rights reserved. Release 2.0.r051 /bin/ld /lib/crt0.o test.o bd.o -lF77 -lI77 -lU77 -ltermcap -lm -lc % % a.out ncp = 10 mio = 11 *** This is correct *** Put the blockdata containing file into a library and then use it. % ar rv bdlib.a bd.o a - bd.o ar: creating bdlib.a % ranlib bdlib.a % f77 test.o bdlib.a % a.out ncp = 0 mio = 0 *** What!!! *** % Is there something I need to specifiy on the f77 or the `ar' command to get to the block data and have it initialize the common area? Sohail Aslam Department of Computer Science University of Illinois arpa aslam@cs.uiuc.edu usenet uiucdcs!aslam bitnet aslam@uiucdcs.BITNET
timv@IMAX.ENG.UIOWA.EDU (Tim VanFosson) (08/05/88)
We ran into the same problem with another code and simply resorted to loading them as object modules. The problem, as I understand it, is that since nothing references the block data modules (i.e., calls them), the loader will not pick them up out of a library. Loading them as object modules forces the loader to include them. Is there something akin to the /INCLUDE option that the VMS LINK command employs to force load object modules in libraries out there? I don't think so, but I've often been wrong before. --- Timothy VanFosson Internet : timv@imax.eng.uiowa.edu Systems Analyst US Mail : CAD-Research University of Iowa 1405 Engineering Building Phone : (319) 335 - 5728 Iowa City, Iowa 52242