Building the PSUADE diagnostics library on Linux

The PSUADE library contains a suite of methods for sensitivity analysis, uncertainty analysis, and response surface methods. It was created by Charles Tong and Lawrence Livermore National Lab and is freely available for download at: https://computation.llnl.gov/casc/uncertainty_quantification/.

This post will describe how to build the library in a Linux environment. The process is already described in the user documentation included with the package, but I will try to add some more detail.

First, untar the package and run the script install_psuade (if you copied to the cluster, you may need to chmod +x first). You will be prompted with the following message:

****************** Read this important information first **********************
* Multivariate Adaptive Regression Splines (MARS) is currently not installed.
To install MARS, first exit install_psuade, search and download mars35_fort.f,
mars36_fort.f or mars36_fort.c, put it in the External/MARS directory, and run
install_psuade again.
* The TPROS library is currently not installed. If you would like to use the
TPROS Gaussian process response surface tool, you will need to download
the TPROS library (if needed, send us email on details of how to install.)
*******************************************************************************
Now exit install_psuade or press ENTER to continue
*********************************************************

The MARS and TPROS libraries are optional. It seems like they may only be needed for the response surface tools, which we aren’t planning to use at the moment. Press enter to ignore this warning and continue the build without these optional libraries.

Next, you’ll be presented with a short list of options:

*********************************************************
Verify the following and make changes as needed :
a. Platform = LINUX
l. MPI Build = no
m. User provides simulator function = no
z. This setting is good, move on.
———————————————————
Enter the item (a – m) to change or z to quit:

You can modify the options as needed by pressing the relevant key, followed by enter. (That’s a lowercase “L” for the MPI option). For right now, I opted not to use the MPI build. I originally changed the “user provides simulator function” option, because I suspect that’s how we will use the library. But then when I ran make, I got the following error:

Makefile:16: *** Recursive variable `CXXFLAGS’ references itself (eventually). Stop.
make[1]: Leaving directory `/gpfs/work/j/jdh33/PSUADE/Src/Main’
make: *** [main] Error 2

Martha was able to get it to work without changing that option, so that’s what we’ll go with for now. I’m still not clear on what the option even means, so we may need to re-build later if necessary.

The install_psuade script should finish running. Stay in the same directory and run make. It will look like it’s working for a while, and hopefully you won’t get any errors.

Now you can follow the example shown in the short manual. cd to Examples/Bungee and compile the example file, simulator:

cc -o simulator simulator.c -lm

Take a look at the configuration file psuade.in. This breaks the options into three main parts: the sampling, application, and analysis (which is similar to how we have been running Sobol’s method). We’re still working on figuring out what all these options actually mean. For now, you can run the problem like this, passing in the configuration file as a command line option:

./../../bin/psuade psuade.in

All of the input and output data will be stored in the file psuadeData.

More details to come as we figure out how to use different methods and how to extend the output format to accomodate larger-scale runs.

 

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s