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

20030602: gemplt process problems



Kevin,

I noticed that you have hardcoded a path to gpend in your script:
/usr1/nawips/exe/linux/gpend
rather than having your environment find it in its path, like the
other GEMPAK programs are using.

This is very suspicious. And, if it is not the correct path, or is
the wrong GEMPAK version of the rest of the programs being run,
then you will not sucessfully remove the gplt and device drivers.
If you are running gdplot2 without hardcoding in the path, then
you must have the GEMPAK programs in your path, so you should
not need to hard code a path to gpend in your script.

Also, I would suggest writing the output to files in the temporary
directory you have created, and then after exiting running gpend,
and moving the output to your data directory. This way, you can check
for errors etc befor overwriting a previous vgf file.

If you have a main driver script, it can create your workdir and either
"cd" into it, or pass the name of the directory to your subprocess script.

Steve Chiswell

On Sat, 31 May 2003, Kevin Polston wrote:

> Hi Steve,
>
> You had suggested to me to create a temporary work directory for each
> script I run so there won't be any "running processes" left.  Here is
> the information you sent me:
>
>  As far as running scripts from cron and avoiding gplt problems,
>  you should create a unique work directory for each script so that
>  files are not stepped on. In a csh for example, I typically
>  create a WORK directory such as:
>
>  set WORKDIR=/tmp/gemwrk.$$
>  mkdir $WORKDIR
>  cd $WORKDIR
>  <do stuff>
>  gpend
>  cd /tmp
>  rm -rf $WORKDIR
>
>  The $$ above will be replaced by the process id so that your
> gemglb.nts  and last.nts files are not stepped on by other scripts.
>
>  Also, if you are using a single program, you can avoid the gplt
>  processes by using the _gf and _nc programs which are linked directly
>  to the device drive
>
> I tweaked it slightly to make the workdir /home/gempak/tmp but I don't
> think that would be a big problem.  Anyway....I tried it on one of my
> scripts (that I've attached).  The script ran fine and created the
> output however...it also left 2 processes running.  I tried tweaking it
> a little bit more but the same thing happened so I ended up with 4
> processes total not stopped. I have upgraded to Redhat 9 from 7.3 but
> the same thing happens.  When I manually run it from the command line it
> is fine with no extra processes running.  Perhaps I did something wrong
> with setting up what you said in the script.....so if you could take a
> look at it perhaps you might have some other suggestions for me to try.
>
> One final thing....if I have created a script which invokes several
> other scripts....would I have to have this workdir stuff in just the
> main script or in all of the individual scripts the main one calls?
>
> Thanks...and I hope you can help me here. It is a little frustrating ast
> times to have to manually do this every hour. Thanks and I appreciate
> your help.
>
>
> Kevin Polston
> Senior Instructor, NWSTC
> Kansas City MO 64152
>
> 816-880-9314 ext 273
>