[ncl-install] Fix parallel build for RGB database

Dave Allured - NOAA Affiliate dave.allured at noaa.gov
Mon Jan 7 09:20:49 MST 2019


NCL support,

Here is a solution for safely building the RGB database in parallel build
mode.  This should fix the MacPorts build problem that I reported a few
weeks ago.  This is more efficient than forcing serial build for the entire
NCL package.  This may also benefit NCL within other modern build systems.
Can you please work this into the next NCL release?

The current NCL version uses a make file equivalent to the following.  This
runs two instances of "rgb" at the same time under parallel build.  This
corrupts the two output files, as I explained before:

    rgb.pag rgb.dir: rgb rgb.txt
            ./rgb rgb < rgb.txt

The following recipe is recommended as a parallel-safe alternative.  This
effectively prevents "rgb" from running more than once under parallel
build.  The only change is to add the third line:

    rgb.pag rgb.dir: rgb rgb.txt
            ./rgb rgb < rgb.txt
    rgb.dir: rgb.pag

This method is explained in the GNU Automake FAQ for multiple output
files.  Please see the third code block and description here:
https://www.gnu.org/software/automake/manual/html_node/Multiple-Outputs.html#Multiple-Outputs

I have not had a chance to test this solution because of the federal
shutdown.  Please try this and include in the next NCL release, if it
works.  Thank you.

--Dave
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mailman.ucar.edu/pipermail/ncl-install/attachments/20190107/9a074f21/attachment.html>


More information about the ncl-install mailing list