Difference between revisions of "UCVM Install"

From SCECpedia
Jump to navigationJump to search
Line 89: Line 89:
 
Done installing UCVM!
 
Done installing UCVM!
 
Thank you for installing UCVM.  
 
Thank you for installing UCVM.  
 +
 +
Log out log back
 +
 
Once you have set these environment variables, return to the UCVM source directory and type
 
Once you have set these environment variables, return to the UCVM source directory and type
 
make check
 
make check
 
This will run the UCVM unit and acceptance tests. If all tests pass. UCVM is correctly installed
 
This will run the UCVM unit and acceptance tests. If all tests pass. UCVM is correctly installed
 
and ready to use on your computer.
 
and ready to use on your computer.
 +
 
To try out ucvm, once the tests pass, move to the UCVM installation directory, and run an example query.
 
To try out ucvm, once the tests pass, move to the UCVM installation directory, and run an example query.
As an example:
+
 
cd /project/maechlin_162/ucvm_bin
+
As an example, you can run ucvm_query:
 +
 
 +
cd /project/scec_608/chukwueb/ucvm_bin
 
./bin/ucvm_query -f ./conf/ucvm.conf -m cvms < ./tests/inputs/test_latlons.txt
 
./bin/ucvm_query -f ./conf/ucvm.conf -m cvms < ./tests/inputs/test_latlons.txt
 +
 +
 
You will then see the following output:
 
You will then see the following output:
 
Using Geo Depth coordinates as default mode.
 
Using Geo Depth coordinates as default mode.

Revision as of 19:25, 25 March 2021

Installation on discovery.usc.edu

0) confirm login and home directory /home1/<username>
1) create test_ucvm subdirectory for use later
3) confirm /project/scec_608/<username> exists
4) copy Anaconda Linux install script from /project/maechlin_162
5) run script and give installation directory as
  /project/scec_608/<username>/anaconda3 as install path
6) When it prompts to update .bashrc (or .bash_profile) say yes

7) Confirm .bashrc contiains
# >>> conda initialize >>>
# !! Contents within this block are managed by 'conda init' !!
__conda_setup="$('/project/scec_608/<username>/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)"
if [ $? -eq 0 ]; then
    eval "$__conda_setup"
else
    if [ -f "/project/scec_608/<username>/anaconda3/etc/profile.d/conda.sh" ]; then
        . "/project/scec_608/<username>/anaconda3/etc/profile.d/conda.sh"
    else
        export PATH="/project/scec_608/<username>/anaconda3/bin:$PATH"
    fi
fi
unset __conda_setup
# <<< conda initialize <<<

8) add module unload/load command into .bash_profile
module purge
module load gcc/8.3.0
module load openmpi/4.0.2
module load pmix/3.1.3
# Setup UCVM Environment
export LD_PRELOAD=/spack/apps/gcc/8.3.0/lib64/libstdc++.so.6
source /project/scec_608/<username>/ucvm_bin/conf/ucvm_env.sh

9) log out and log back in
10) confirm anaconda python is picked up
which python
11) create /project/scec_608/<username>/ucvm directory
12) cd into directory and type
git clone --branch toPython3 https://github.com/SCECcode/UCVMC.git

13) cd into /project/scec_608/<username>/ucvm_src/

Currently, we stage the largefiles externally, giving the user options on how they
assemble the list of needed files.

The script are designed to be run in the UCVMC/largefiles dirctory

First, the user runs a script to get the largefiles.
This script asks user which model should be downloaded then  the selected model 
files and other large files are copied from USC into the local directory.
./get_large_files.py

== We may copy these from my account to speed up the download

Second, the user runs a script to confirm the largefiles are intact.
This script prints out the number of OK files and the number of files with errors.
If any files have errors, those files should be re-downloaded.
./check_largefiles_md5.py

Third, the user runs the stage_files script:
This copies the files from the largefiles directory into the ucvm directory tree
./stage_large_files.py


Finally, the user moves out of the UCVMC/largefiles directory, into the UCVM home directory.
From the UCVM/ home directory, the user runs:
./ucvm_setup.py

This will run the configure, make, install commands to build the libraries and models.


13) give src directory as /project/scec_608/<username>/ucvm_src
14) give bin directory as /project/scec_608/<username>/ucvm_bin
15) Confirm entry in .bash_profile has Setup path 
env | grep ucvm
env | grep UCVM

16) run tests

12) move to /home1/<username>/test_ucvm
ucvm_query -H list the installed modules
ucvm_query -f /project/username/ucvm_bin/conf/ucvm.conf -m cvmsi

Terminal Message to User - Successful Installation Completes

Done installing UCVM!
Thank you for installing UCVM. 

Log out log back

Once you have set these environment variables, return to the UCVM source directory and type
make check
This will run the UCVM unit and acceptance tests. If all tests pass. UCVM is correctly installed
and ready to use on your computer.

To try out ucvm, once the tests pass, move to the UCVM installation directory, and run an example query.

As an example, you can run ucvm_query:

cd /project/scec_608/chukwueb/ucvm_bin
./bin/ucvm_query -f ./conf/ucvm.conf -m cvms < ./tests/inputs/test_latlons.txt


You will then see the following output:
Using Geo Depth coordinates as default mode.
 -118.0000  34.0000   0.000  280.896  390.000    cvms  696.491  213.000  1974.976    none   0.000   0.000   0.000   crust  696.491  213.000  1974.976
 -118.0000  34.0000   50.000  280.896  390.000    cvms  1669.540  548.000  2128.620    none   0.000   0.000   0.000   crust  1669.540  548.000  2128.620
 -118.0000  34.0000  100.000  280.896  390.000    cvms  1683.174  603.470  2130.773    none   0.000   0.000   0.000   crust  1683.174  603.470  2130.773
-118.0000  34.0000  500.000  280.896  390.000    cvms  3097.562  1656.495  2354.105    none   0.000   0.000   0.000   crust  3097.562  1656.495  2354.105
 -118.0000  34.0000  1000.000  280.896  390.000    cvms  3660.809  2056.628  2443.042    none   0.000   0.000   0.000   crust  3660.809  2056.628  2443.042
Installation complete. Installation log file saved at ./setup_log.sh

After Install Completes

  • which ucvm_query’ to see if your environment is setup
  • source conf/ucvm_env.sh script from either install directory or source directory
  • ucvm_query -H
  • installed_models.py
(base) [maechlin@discovery2 ~]$ installed_models.py
[b'1d', b'bbp1d', b'cvms', b'cvmh', b'cencal', b'cvmsi', b'albacore', b'cvms5', b'cca', b'cs173', b'cs173h']
  • Now, you can delete src directory if you do not plan to review, modify UCVM source code, or debug UCVM software. Deleting it saves about 150GB of disk storage if you were doing a complete install of all models.
  • goto <install>/tests directory: CARC: /project/maechlin_162/ucvm_bin/tests
  • ./run-testing

/project/maechlin_162/ucvm_bin/tests
(base) [maechlin@discovery2 tests]$ ./run-testing
Test: UCVM lib initialization
PASS
Test: UCVM lib add model 1D
PASS
Test: UCVM lib query 1D
PASS
Test: UCVM lib get model label 1D
PASS
Test: UCVM lib setparam querymode geo-depth 1D
PASS
Test: UCVM lib setparam querymode geo-elev 1D
PASS
Test: UCVM lib model version 1D
PASS
Test: UCVM lib add model USGS CenCal
PASS
Test: UCVM lib add model SCEC CVM-H
PASS
Test: UCVM lib add model SCEC CVM-S
PASS
Test: UCVM lib add model SCEC CVM-SI
PASS
Test: UCVM lib add model CVMS5
PASS
Test: UCVM lib add model CCA
PASS
Test: UCVM lib add model CS173
WARNING: Could not load model into memory. Reading the model from the
hard disk may result in slow performance.
PASS
Test: UCVM lib add model CS173H
WARNING: Could not load model into memory. Reading the model from the
hard disk may result in slow performance.
PASS
Test: ucvm library 1d model w/ large grid
PASS
Runnning test test_ssh_generate
[SUCCESS]
Runnning test test_vs30_query
[SUCCESS]
Running examples_api query_1d_gtl
[SUCCESS]
Running examples_programs_basin z2500 basin_query_cvmh
[SUCCESS]
Running examples_programs_basin z1000 basin_query_cvmh
[SUCCESS]
Running examples_programs_basin basin_query_mpi_cvms5
[SUCCESS]
Running examples_programs_basin basin_query_mpi_complete_cencal_cvms
[SUCCESS]
Running examples_programs_basin basin_query_mpi_complete_cencal_cvms5
[SUCCESS]
Running examples_programs_basin basin_query_mpi_complete_cencal_cvmsi
[SUCCESS]
Running examples_programs_ucvm ucvm_query_cvmh
[SUCCESS]
Running examples_programs_ucvm ucvm_query_cencal_cvms5
[SUCCESS]
Running examples_programs_ucvm ucvm_query_cencal_cvms
[SUCCESS]
Running examples_programs_ucvm2etree ucvm2etree_cvmh
[SUCCESS]
Running examples_programs_ucvm2mesh ucvm2mesh_cvmh
[SUCCESS]
Running examples_programs_mesh ucvm2mesh_mpi_cvmh
[SUCCESS]
Running examples_programs_mesh ucvm2mesh_mpi_cvmsi
[SUCCESS]
Running examples_programs_mesh ucvm2mesh_mpi_layer_cvmsi
[SUCCESS]
Running examples_programs_mesh ucvm2mesh_mpi_layer_cvms
[SUCCESS]

Testing Notes

  • Testing on CARC discovery:
  • Download onto /project filesystem - 20 minutes
  • Compiled on headnode - 20 minutes
  • Tests run on headnode - 20 minutes

Test Additions

Confirm each commmand line parameter

(base) [maechlin@discovery2 ~]$ ucvm_query -H
Usage: ucvm_query [-m models<:ifunc>] [-p user_map] [-c coordtype] [-f config] [-z zmin,zmax] [-b] < file.in

Flags:
	-h This help message.
	-H Detail help message.
	-m Comma delimited list of crustal/GTL models to query in order
	   of preference. GTL models may optionally be suffixed with ':ifunc'
	   to specify interpolation function.
	-c Z coordinate mode: geo-depth (gd, default), geo-elev (ge).
	-f Configuration file. Default is ./ucvm.conf.
	-p User-defined map to use for elevation and vs30 data.
	-v Display model version information only.
	-z Optional depth range for gtl/crust interpolation.

	-b Optional output in json format

	-l Optional input lon,lat,Z(depth/elevation)

Input format is:
	lon lat Z

Output format is:
	lon lat Z surf vs30 crustal cr_vp cr_vs cr_rho gtl gtl_vp gtl_vs gtl_rho cmb_algo cmb_vp cmb_vs cmb_rho

Notes:
	- If running interactively, type Cntl-D to end input coord list.

Version: 19.4.0

Installed Resources:
          1d : crustal model
       bbp1d : crustal model
    cmuetree : crustal model
       1dgtl : gtl
      elygtl : gtl
        cvms : crustal model
        cvmh : crustal model
      cencal : crustal model
       cvmsi : crustal model
    albacore : crustal model
       cvms5 : crustal model
         cca : crustal model
       cs173 : crustal model
      cs173h : crustal model
      linear : ifunc
         ely : ifunc
        ucvm : map
        yong : map
 model_etree : model i/f
 model_patch : model i/f
   map_etree : map i/f

Related Entries