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

20001012: Post-enhancement PostProcessing Problems

>From: Joseph Smith <address@hidden>
>Organization: Oregon State University
>Keywords: 200010121833.e9CIXu404250 McIDAS-X LDM ROUTE PostProcess


>As Wayne Gibson previously mentioned, we successfully compiled LDM with
>the new logging enhancements, and LDM is working fine.

Right, I saw that interchange.

>However, there has
>been an unforeseen change in the operation of the McIDAS PostProcessing
>facility.  Scripts that were being successfully executed from PP BATCH
>files via the OS command were no longer functioning correctly.
>Specifically, *.k commands inside mcenv blocks were no longer being found.

This would tell me that something in the user 'ldm's environment changed.

>I set up PP BATCH files to run NORTMAPR commands along with OS commands to
>run the shell scripts that were originally being run from the crontab.  I
>removed the PATH/MCPATH statements from these scripts as they were no
>longer necessary, this info being passed directly to the scripts from the
>ldm batch.k file.  Inside the scripts are shell commands to build
>filenames and move the image files, and two mcenv blocks to create images
>of the desired size:
>   mcenv -g 16 -i 238 -f 750x872 << 'EOF', & 
>   mcenv -g 16 -i 238 -f 375x436 << 'EOF'.


>This arrangement was working fine, creating the topo composite AREA files
>& satellite images, and doing the file manipulation.  However, after Wayne
>and I recompiled and installed ldm with the ulog enhancement, this setup
>quit working.

I have to believe that something changed in the environment.  The
functionality of the LDM to kick off processes from pqact.conf did not
change, and the issuing of ROUTE PostProcess is still controlled by the
decoder reading the ROUTE.SYS file in the output data directory.

>The NORTMAPR & OS commands were still being executed, as
>were the shell commands in the scripts.  However, the commands in the
>mcenv blocks were not being executed, hence no images are created.  
>Specifically, I was getting:
>   imgdisp.k: Command not found.
>   map.k: Command not found.
>   frmlabel.k: Command not found. (etc.)
>error messages in ROUTEPP.LOG.

I think that what is happening is that the PATH being set in batch.k
is not being passed into the mcenv block.  This is caused by .cshrc
being sourced when mcenv is run.

There are at least threee workarounds to this problem:

o remove the "'" from EOF in the mcenv invocation:

  mcenv -g 16 -i 238 -f 750x872 << EOF

o edit the .cshrc file for the user 'ldm' and put in a construct that
  accepts PATH definitions if the exist before setting additional paths

  Consider the following for a modification in .cshrc:

if ( ! ${?PATH} ) then

   set PATH=$PATH:...


   set PATH=...


  (The '...' is the normal PATH set that you already have).

  The change is to not redefine PATH if it is already defined, but to
  define it if it is not already defined.

o pass the appropriate PATH settings into the mcenv block through
  a variable definition outside of the mcenv block

  Something like this might work in batch.k:


<< 'EOF'

imgdisp.k ...


>I printed out the environment from ~decoders/bin/batch.k, OCS_VIS.BAT (the
>PP BATCH file) and ocs_vis.sh (the shell script executed by OS in
>OCS_VIS.BAT).  All seem to have the correct PATHs and MCPATHs to run the
>*.k McIDAS files, but they apparently could not be found.  Example:
> /ucblib:/usr/lib/X11:/usr/lib/X
> home/ocs/ldm/.mctmp/245000
> bin.solaris2x:/usr/local/bin:/h
> :/usr/openwin/bin/xview:/usr/op
> c:/usr/local/etc:/home/server/l
>from ocs_vis.sh.
>I noticed the MCENV_NEGUC & MCENV_POSUC variables and wondered if the
>mcenv blocks might be conflicting with them, so I commented out the mcenv
>lines and images began being created, albeit the wrong size.  I changed
>the OS command from
>OS "/home/ocs/mcidas/scripts/ocs_vis.sh
>OS "mcenv -g 16 -i 238 -f address@hidden /home/ocs/mcidas/scripts/ocs_vis.sh
>and the correct size images were created.
>I know I can split my scripts and pass the mcenv environment to each one
>seperately, but the underlying question remains:  Why did the
>functionality of the scripts run from the PP BATCH facility change after
>ldm was recompiled to use the new ulog override?

I don't know why the functionality changed.  Until assured otherwise, I
have to assume that a change was made to the PATH declaration in 'ldm's
.cshrc file.

>And for a new twist, I removed the link in ~ldm/bin to
>~ldm/decoders/bin/batch.k that I created to get PostProcessing to work in
>the first place, and the PostProcessing worked fine without it.  Looks
>like the recompilation affected this as well.

Since things continue to work without the link, doesn't it tell us that
PATH in .cshrc was changed?

>Any insights?

Let me know if the above does not make sense to you.  If it doesn't,
then inclusion of the set of 'batch.k', the PP BATCH file, and the
script run from the PP BATCH file would help in troubleshooting.

>Thanks for your help,

Tom Yoksas

NOTE: All email exchanges with Unidata User Support are recorded in the Unidata inquiry tracking system and then made publicly available through the web. If you do not want to have your interactions made available in this way, you must let us know in each email you send to us.