Subject: GOPWK error message

From: [email-masked] (Fred Clare)
Date: Sat, 30 May 92 15:28:09 MDT

> Another, possibly related, problem:
> The following program crashes with the following msgs:
> (as you can see, this is using ncarg3.1.3) 
> 
> 41 shavano> !cf
> cf77 -Wl"-L /lib,/usr/lib,/usr/local/ncarg3.1.3/lib,/usr/local/lib -l ncarg,ncarg_loc,ncarg_gks -i /u0/foster/segdir" opwk.f
> 42 shavano> a.out < opwk.inp
> lutitle=  4
>  GKS ERROR NUMBER  26 ISSUED FROM SUBROUTINE GOPWK :
>  --SPECIFIED WORKSTATION CANNOT BE OPENED
>  GKS ERROR NUMBER  25 ISSUED FROM SUBROUTINE GCLWK :
>  --SPECIFIED WORKSTATION IS NOT OPEN
>  STOP  (called by OPWK )
>  CP: 0.119s,  Wallclock: 0.379s,  3.9% of 8-CPU Machine
>  HWM mem: 457367, HWM stack: 7302, Stack overflows: 0
> 
>       program opwk
>       data idflash/90/, luflash/20/
> c
>       call opngks
>       call gopwk(idflash,luflash,3)
> c
>       call slgeti('LOG',lutitle)
>       write(6,"('lutitle=',i3)") lutitle
>       call ftitle(1)
> c
>       call gclwk(idflash)
>       call clsgks
>       stop
>       end
> c
> 
> It does not crash if I comment out the ftitle call.
> If I comment out the gopwk and gclwk calls and leave
> ftitle, then ftitle produces frames as expected.

  This error is coming from your trying to open WISS with the call

      call gopwk(idflash,luflash,3) 

  Since STITLE (and FTITLE) open WISS internally the error is issued
  when STITLE tries to open WISS since there can be only one open
  WISS workstation.  I do not like this situation, but I am not sure
  what I can do about it.  In order to use WISS, I need to know its
  workstation ID.  If you open WISS I can see no way that I can retrieve
  the workstation ID you used.  The only workaround I can see is that 
  if you want to use WISS, then you will have to close it before calling 
  STITLE or FTITLE.

> I have tried changing the 'LOG' parameter for ftitle,
> with same results. I guess the msgs are coming from
> ftitle attempts to gopwk and gclwk. BTW, the New Utilities
> guide says default value for 'LOG' is 9 (bottom pg. 6-34),
> but in this program it appears to be 4.

  This is an error in the documentation.  The correct default value is
  4 as you observed.  I have marked the documentation for correction.

  Thanks,

  Fred