[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GEMPAK #QDO-775031]: Gempak script runs via command line but not cron job



Denna,

crons jobs are not attached to a tty, so the message queue created is based on 
the process id of the parent script and not the tty.  I believe what's 
happening is that your cron job is spawning separate csh processes for each 
gplt call in your product generation. 

your log file begins to show these error messages after the 8th grid file is 
opened (the max number allowed by MMFILE in gemprm.h) 

what you may want to do is generate each of the layers used in your product, 
ensuring that gpend is run after every gplt program call, save each generated 
data layer to a temporary grid file which can then be accessed by one final 
process in order to overlay all of the generated layers.

Michael James
Unidata




It sounds like you are spawning a separate csh process for each part of your 
chart,
> >so the parent process of the gpmap is changing. That could be the problem
> >with your gpend not closing the queue, and overlays failing as well.
> >
> >If this is the case, its probably best for your program to generate all the 
> >layers
> >of your plot as input lines to the gpmap invocation, and then with a single 
> >invocation
> >of the csh script, create the postscript output file.


> Hi Michael
> 
> Please take a look at the attached. This is the script out file. Let me know 
> what you think could be the problem.
> 
> 
> 
> -----Original Message-----
> From: Unidata GEMPAK Support [mailto:address@hidden]
> Sent: Thursday, August 26, 2010 11:29 AM
> To: Demby, Denna
> Cc: address@hidden; Nigh, Pete; James, Curtis N
> Subject: [GEMPAK #QDO-775031]: Gempak script runs via command line but not 
> cron job
> 
> Hi Denna,
> 
> The error message:
> 
> [GEMPLT -101]  NOPROC - Nonexistent executable
> 
> means that either you haven't sourced the $NAWIPS/Gemenviron variables into 
> your shell script environment, or you have a file in your working directory 
> with the name of a GEMPAK executable program such as "gplt" or "ps". It seems 
> that $OS_BIN variable is probably not set, which will be set after 
> successfully sourcing Gemenviron. When you run a script interactively, the 
> script will inherit your environment, but when run from a cron or batch mode, 
> you will have to ensure that the shell sets its environment since it won't be 
> inheriting your logged in environment.
> 
> The error message:
> Error in message send = 22
> itype, ichan, nwords,0,-1,3
> 
> signals that you do have a message queue problem, which is likely due to the 
> program not being able to talk to $OS_BIN/gplt or $OS_BIN/ps due to the above 
> problem.
> 
> To clear this up, exit out of GEMPAK and run "cleanup -c". This command will 
> remove existing message queues (eg, the "ipcrm" command is run to remove 
> message queues found with "ipcs"). It will also look for running "gplt" 
> processes and kill them.
> 
> After running the cleanup command, use the /bin/ps command in linux to see if 
> you have any gempak device drivers still running (eg xw, gf, ps). After 
> clearing the environment, make sure your script is sourcing Gemenviron, and 
> then retry.
> 
> Michael James
> Unidata User Support
> 
> 
> 
> > Hi
> >
> > I have a Gempak script that runs from the command line, but when I run
> > it via a cron job it quits half way through with the following errors.
> > Please see the attached for more information. Any assistance would be
> > appreciated.
> >
> > Thanks
> >
> > dd
> >
> > Device:
> > GF|/home/wx/wrfems/runs/real1/emsprd/gempak/10K300HI.00.gif|1024;768
> >
> > Grid File:
> > /home/wx/wrfems/runs/real1/emsprd/gempak/201008230000_arw_wrfout_d02.gem
> >
> > Satellite File:
> > Radar File:
> > Projection:       lcc
> > Graphics Area:    15;-140;60;-70
> > Panel:            0
> > Clear:            NO
> >
> > Shape:            text
> > Shape Info:       0.75/32////c/HW/AERONAUTICAL UNIVERSITY
> > Shape Points:     0.835;0.01
> > Line:             6
> >
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,1,-1,1
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,1,-1,3
> >
> > [GEMPLT -1]  NMBRER - Mailbox read.
> >
> > [GPANOT -3]  Fatal error initializing GEMPLT.
> >
> > GDFILE    Grid file
> > /home/wx/wrfems/runs/real1/emsprd/gempak/201008230000_arw_wrfout_d02.gem
> >
> > SATFIL    Satellite image filename(s)
> >
> > RADFIL    Radar image filename(s)
> >
> > PROJ      Map projection/angles/margins|dr  lcc
> >
> > GAREA     Graphics area                     15;-140;60;-70
> >
> > PANEL     Panel loc/color/dash/width/regn   0
> >
> > DEVICE    Device|name|x size;y size|color
> > GF|/home/wx/wrfems/runs/real1/emsprd/gempak/10K300HI.00.gif|1024;768
> >
> > CLEAR     Clear screen flag                 no
> >
> > SHAPE     Object to draw                    text
> >
> > INFO      Shape information
> > 0.75/32////c/HW/AERONAUTICAL UNIVERSITY
> >
> > LOCI      Point(s) associated with SHAPE    0.835;0.01
> >
> > LINE      Color/type/width/label/smth/fltr  6
> >
> > CTYPE     Contour type:  C/F                c
> >
> > Parameters requested:
> > GDFILE,SATFIL,RADFIL,PROJ,GAREA,PANEL,DEVICE,CLEAR,
> >
> > SHAPE,INFO,LOCI,LINE,CTYPE.
> >
> > GEMPAK-GPANOT> GEMPAK-GPANOT> GEMPAK-GPANOT> GEMPAK-GPANOT>
> > GEMPAK-GPANOT> GEMPAK-GPANOT> GEMPAK-GPANOT> GEMPAK-GPANOT>Error in
> > message send = 22
> >
> > itype, ichan, nwords,1,-1,3
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,1,-1,1
> >
> > WARNING: csgrab semaphore ID does not match smchan
> >
> > [GPLT -1]  The requested IPC message queue is locked.
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,2,-1,2
> >
> > Reading data directory /home/wx/wrfems/runs/real1/emsprd/gempak
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,1,-1,1
> >
> > Error in message send = 22
> >
> > itype, ichan, nwords,1,-1,3
> >
> > [GEMPLT -1]  NMBRER - Mailbox read.
> >
> > GDATTIM   Grid date/time                    allf00
> >
> > GLEVEL    Grid level                        300
> >
> > GVCORD    Grid vertical coordinate          pres
> >
> > GFUNC     Scalar grid                       sm9s(quo(hght,10.0))
> >
> > GDFILE    Grid file
> > /home/wx/wrfems/runs/real1/emsprd/gempak/201008230000_arw_wrfout_d02.gem
> >
> > CINT      Contour interval/min/max          3/756/1092
> >
> > LINE      Color/type/width/label/smth/fltr  32
> >
> > MAP       Map color/dash/width/filter flag  0
> >
> > MSCALE    fgc;bgc;mask/units/lat;hide/valu
> >
> > TITLE     Title color/line/title            0
> >
> > DEVICE    Device|name|x size;y size|color
> > GF|/home/wx/wrfems/runs/real1/emsprd/gempak/10K300HI.00.gif|1024;768
> >
> > SATFIL    Satellite image filename(s)
> >
> > RADFIL    Radar image filename(s)
> >
> > IMCBAR    Color/ornt/anch/x;y/ln;wd/freq
> >
> >
> >
> 
> 
> Ticket Details
> ===================
> Ticket ID: QDO-775031
> Department: Support GEMPAK
> Priority: Normal
> Status: Open
> 
> 


Ticket Details
===================
Ticket ID: QDO-775031
Department: Support GEMPAK
Priority: Normal
Status: Open