ASGS Troubleshooting - StormSurgeLive/asgs GitHub Wiki

Troubleshooting By Topic

Below we have debugging and troubleshooting steps below, topics will be added as needed.

Suggested Debugging of an ASGS Installation Step

Based on comments provided directly in #1119.

Given,

prompt> ./init-asgs.sh -b -x "--list-steps"
           setup-env - Updates current environment with variables needed for subsequent steps. It only affects the environment within the asgs-brew.pl environment.
             openmpi - Downloads and builds OpenMPI on all platforms for ASGS. Note: gfortran is required, so any compiler option causes this step to be skipped.
                hdf5 - Downloads and builds the version of HDF5 that has been tested to work on all platforms for ASGS.
             netcdf4 - Downloads and builds the versions of NetCDF and NetCFD-Fortran that have been tested to work on all platforms for ASGS.
              wgrib2 - Downloads and builds wgrib2 on all platforms for ASGS. Note: gfortran is required, so any compiler option passed is overridden.
       cpra-postproc - Runs the makefile and builds associated utilities in the output/cpra_postproc directory
              output - Runs the makefile and builds associated utilities in the output/ directory.
                util - Runs the makefile and builds all associated utilities in the util/ directory.
          input-mesh - Runs the makefile and builds all associated util/input/mesh in the input-mesh/ directory.
     input-nodalattr - Runs the makefile and builds associated utilities in the util/input/nodalattr directory.
                perl - Install local Perl version used for ASGS.
        perl-modules - Install Perl modules used for ASGS.
        image-magick - Install local ImageMagick tools and Perl module Image::Magick.
             python3 - install python 3 locally and install required modules
              ffmpeg - Install ffmpeg and required libraries (nasm)
             gnuplot - Install gnuplot (commandline only)
               units - Install GNU Units utility
                 nco - Install The netCDF Operators (NCO) Toolkit
                pigz - Install pigz, unpigz - parallel gzip
              adcirc - Builds ADCIRC and SWAN if $HOME/adcirc-cg exists.

You can straight up skip breaking steps for debugging purposes. For example,

./init-asgs.sh -x "--skip-steps input-mesh"

You can skip multiple steps, via:

./init-asgs.sh -x "--skip-steps input-mesh,image-magick,..."

This is how I debug. Basically I skip whatever is breaking, then the given command build; then you can run ./asgsh and manually debug the "build" commands present in ./cloud/general/asgs-brew.pl inside of the proper environment.

Also, look at the created ./update-asgs script - it contains the full asgs-brew.pl, which lets you then run it instead of ./init-asgs.sh,

./update-asgs "flags passed to asgs-brew.pl command ..."

An extreme command to immediately get to the shell, with nothing built but the environment set up would be:

prompt> ./init-asgs.sh -b -x "--update-shell"
...
prompt> ./asgsh