[gradsusr] GrADS Return Code 141

Jonas Kaufmann me at j0nes.de
Fri Jul 22 11:03:04 EDT 2011


Hello,

I have examined the environment of the calls on both my grads machine
and my remote machines. There are three machines involved in this: two
remote machines where WRF computations are run (these are located in
different data centers and have a slightly different setup) and my
grads machine where the output of the WRF computation is pushed and
then a script is started via ssh.

So the basic script on the remote machine looks like this:
- wait for new data from the forecast model
- scp the data to the grads machine
- ssh grads_machine image_generation_script.sh

The image_generation_script.sh running on the grads server is also quite easy:
- set up environment variables
- perl script to generate a grads script
- grads -b -l -c my_generated_script.gs

I have compared the environments on both the remote machines as the
script is run via cron, and the environment variables are exactly the
same on both machines. On the grads machine, I have also done this,
and the environment also matches there when being called from both
remote machines. There are two things that I don't get:
- on one remote machine everything is working fine, and the other one fails
- if I start the script on my failing remote machine manually,
everything works fine, but not when it gets executed by cron

Is there a way to get any additional output or debug information from
grads? Do you have any other hints what I could try?

Best regards and thank you for your help!

Jonas Kaufmann


On Fri, Jul 22, 2011 at 16:31, Huddleston, John
<Huddleston at cira.colostate.edu> wrote:
> Jonas
>
> There could be a number of reasons. Bernd's reply is true in that a cron script does not set a PATH and so by sourcing your profile or .bashrc files it will establish your environment. It is easier to put those PATH assignments in the cron script itself. Add the GrADS variables (GADDIR and GASCRP) as well to find the library scripts.
>
> Second, the error code 141 means it is a SIGPIPE error. 141=128+13. 13 indicates a pipe error. 128 is the bash script error.
>
> Third, it could be related to the resources on your machine itself could be the problem.
>
> Can you give us your script?
>
> John Huddleston
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Becker, Bernd
> Sent: Friday, July 22, 2011 6:50 AM
> To: GrADS Users Forum
> Subject: Re: [gradsusr] GrADS Return Code 141
>
>
> Normalerweise liegt das an nicht gesetzten Umgebungsvariablen.
>
> Einfach im Script oben nochmal
> . ~/profile
> . ~/kshrc
>
> ausfuehren. Dann klappt das. (Meistens)
>
> --
> Bernd Becker   Climate Impacts Product Development
> Met Office Hadley Centre    FitzRoy Road  Exeter   Devon EX1 3PB  United
> Kingdom
> Tel.: +44 (0) 1392 884511 Fax: +44 (0)870 900 5050 E-mail:bernd.becker at metoffice.gov.uk - http://www.metoffice.gov.uk/research/our-scientists/seasonal-to-decadal/
> bernd-becker
>
>
> -----Original Message-----
> From: gradsusr-bounces at gradsusr.org
> [mailto:gradsusr-bounces at gradsusr.org] On Behalf Of Jonas Kaufmann
> Sent: 22 July 2011 12:52
> To: GrADS Users Forum
> Subject: [gradsusr] GrADS Return Code 141
>
> Hello,
>
> in my setup I am running into a strange problem right now. I am calling a shell script containing a call to grads from a remote server. When I invoke my shell script manually from the remote server, everything is working fine - however when running through cron, grads silently crashes. Nothing is written on both STDOUT or STDERR. The only thing that I can get is that grads gives a return code 141 in the shell after failing.
>
> Can you tell me what this return code means? Do you have any idea why my job can be run manually but not from cron?
>
> Best regards,
> Jonas Kaufmann
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>
> _______________________________________________
> gradsusr mailing list
> gradsusr at gradsusr.org
> http://gradsusr.org/mailman/listinfo/gradsusr
>




More information about the gradsusr mailing list