Difference between revisions of "UCVM Install"
From SCECpedia
Jump to navigationJump to searchLine 1: | Line 1: | ||
+ | == Installation on discovery.usc.edu == | ||
+ | <pre> | ||
+ | 0) confirm login and home directory /home1/<username> | ||
+ | 1) create test_ucvm subdirectory for use later | ||
+ | |||
+ | 2) confirm /project/<username>_xxx exists | ||
+ | 1) copy Anaconda Linux install script from /project/maechlin_162 | ||
+ | 2) run script and give installation directory as | ||
+ | /project/<username>_xxx/anaconda3 as install path | ||
+ | 3) When it prompts to update .bashrc (or .bash_profile) say yes | ||
+ | |||
+ | Confirm .bashrc contiains | ||
+ | # >>> conda initialize >>> | ||
+ | # !! Contents within this block are managed by 'conda init' !! | ||
+ | __conda_setup="$('/project/maechlin_162/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" | ||
+ | if [ $? -eq 0 ]; then | ||
+ | eval "$__conda_setup" | ||
+ | else | ||
+ | if [ -f "/project/maechlin_162/anaconda3/etc/profile.d/conda.sh" ]; then | ||
+ | . "/project/maechlin_162/anaconda3/etc/profile.d/conda.sh" | ||
+ | else | ||
+ | export PATH="/project/maechlin_162/anaconda3/bin:$PATH" | ||
+ | fi | ||
+ | fi | ||
+ | unset __conda_setup | ||
+ | # <<< conda initialize <<< | ||
+ | |||
+ | 4) 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/<username_xxx>/ucvm_bin/conf/ucvm_env.sh | ||
+ | |||
+ | 4) log out and log back in | ||
+ | 5) confirm anaconda python is picked up | ||
+ | which python | ||
+ | 6) create /project/<username>_xxx/ucvm directory | ||
+ | 7) cd into directory and type | ||
+ | git clone --branch toPython3 https://github.com/SCECcode/UCVMC.git | ||
+ | |||
+ | run setup | ||
+ | 8) give src directory as /project/<username>_xxx/ucvm_src | ||
+ | 9) give bin directory as /project/<username>_xxx/ucvm | ||
+ | |||
+ | 10) Confirm entry in .bash_profile has Setup path | ||
+ | env | grep ucvm | ||
+ | env | grep UCVM | ||
+ | |||
+ | 11) 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 | ||
+ | </pre> | ||
== Terminal Message to User - Successful Installation Completes == | == Terminal Message to User - Successful Installation Completes == |
Revision as of 00:48, 25 March 2021
Contents
Installation on discovery.usc.edu
0) confirm login and home directory /home1/<username> 1) create test_ucvm subdirectory for use later 2) confirm /project/<username>_xxx exists 1) copy Anaconda Linux install script from /project/maechlin_162 2) run script and give installation directory as /project/<username>_xxx/anaconda3 as install path 3) When it prompts to update .bashrc (or .bash_profile) say yes Confirm .bashrc contiains # >>> conda initialize >>> # !! Contents within this block are managed by 'conda init' !! __conda_setup="$('/project/maechlin_162/anaconda3/bin/conda' 'shell.bash' 'hook' 2> /dev/null)" if [ $? -eq 0 ]; then eval "$__conda_setup" else if [ -f "/project/maechlin_162/anaconda3/etc/profile.d/conda.sh" ]; then . "/project/maechlin_162/anaconda3/etc/profile.d/conda.sh" else export PATH="/project/maechlin_162/anaconda3/bin:$PATH" fi fi unset __conda_setup # <<< conda initialize <<< 4) 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/<username_xxx>/ucvm_bin/conf/ucvm_env.sh 4) log out and log back in 5) confirm anaconda python is picked up which python 6) create /project/<username>_xxx/ucvm directory 7) cd into directory and type git clone --branch toPython3 https://github.com/SCECcode/UCVMC.git run setup 8) give src directory as /project/<username>_xxx/ucvm_src 9) give bin directory as /project/<username>_xxx/ucvm 10) Confirm entry in .bash_profile has Setup path env | grep ucvm env | grep UCVM 11) 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. 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: cd /project/maechlin_162/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