This archive contains answers to questions sent to Unidata support through mid-2025. Note that the archive is no longer being updated. We provide the archive for reference; many of the answers presented here remain technically correct, even if somewhat outdated. For the most up-to-date information on the use of NSF Unidata software and data services, please consult the Software Documentation first.
Martin, Check the iacss (aka iflno) file access number you are passing to the gd_rdat routine. You may be stepping on it inadvertantly and the "-4" response is the file number is not open. Often, Solaris is more tolerant to running past an array bounds due to the way memory is positioned, where gcc/g77 shows the problems first. Steve Chiswell Unidata User Support > Institution: Central Michigan University > Package Version: 5.9.2 > Operating System: Linux FC5 > Hardware Information: Dell 380 Poweredge > Inquiry: Hi, > > Gempak was installed on my system via the binary distribution, which does not > include the libraries. So I downloaded the libraries and attempted to link to > them in my program, with the following: > > f77 -o qvect.exe $srcdir/qvect.f $srcdir/maplcc.f $GEMLIB/gemlib.a $GEML > IB/cgemlib.a -fno-second-underscore > > The code compiles but doesn't work correctly with respect to the gempak calls > - after I open a file with gd_opnf and read one variable from it with > gd_rdat, the file then "closes" (attempts to read a subsequent variable give > a -4 file not open message. The same code compiles and runs without this > problem with f77 on Sun Solaris. I have tried some other flags I saw in > Makefile.linux, such as -Df2cFortran, but to no avail. Any thoughts? > > > > Ticket Details =================== Ticket ID: VNL-434404 Department: Support GEMPAK Priority: Normal Status: Closed