Re: Error unit in GOPKS.

From: fred (fred@XXXXXX)
Date: Mon May 19 2003 - 15:51:33 MDT


Unfortunately the error handler for the lower-level utilities
written on top of GKS, viz. SETER, does not behave in the same way
as the GKS error handler. In your sample code, if an error occurs
at the GKS level, it will indeed be written to "junk.err."
However, errors generated by SETER calls (basically all errors
at a higher level than GKS) are written to the Fortran logical
unit number specified for error output in the support routine
I1MACH which is defined at installation time.

This situation is not desirable and what we will do is have
the error unit specified in a GOPKS call also be used as the
error unit for SETER. In the meantime, there is a very
uncool kludge you could use to get around this, and that is
to change the value of the SETER error unit number by way
of changing a value in a SETER common block.

For example, modifying your code:

      PROGRAM JUNK
C
C Insert a SETER common block for the purpose of changing
C the SETER error unit number.
C
      COMMON /SECOMI/ IERRU,IERRF,IRECF,LOMSG
C
      OPEN( UNIT=77, FILE="junk.err" )
C
C Set the logical unit number for SETER output.
C
      IERRU = 77
C
C Open GKS also with error unit 77.
C
      CALL GOPKS( 77, 1 )
      CALL GOPWK( 1, 2, 1 )
      CALL GACWK( 1 )
      CALL SETER( "ERROR", 1, 2 )
      CALL GDAWK( 1 )
      CALL GCLWK( 1 )
      CALL GCLKS()
      END

will produce the desired result.

Fred Clare

---------------------------------------------
Fred Clare fred@ucar.edu 303-497-1284
Visualization & Enabling Technologies Section
NCAR Scientific Computing Division
---------------------------------------------
_______________________________________________
ncarg-talk mailing list
ncarg-talk@ucar.edu
http://mailman.ucar.edu/mailman/listinfo/ncarg-talk



This archive was generated by hypermail 2b29 : Mon May 19 2003 - 19:02:21 MDT