Running UCVM on Discovery
Contents
CARC Getting Started Documentation
Running ucvm_query on Discovery
This is the contents of the README.md on discovery
(base) [maechlin@discovery1 test_ucvm]$ cat README.md == Linux Command Syntax == Example commands on Linux system. Don't type the % sign %ls %pwd == ucvm query Input format == lon, lat, depth -118.0, 34.0 0.0 == Example query format == %ucvm_query -f /project/maechlin_162/ucvm_bin/conf/ucvm.conf -m cvmh < test_pts.in == allocation interactive nodes == %salloc --ntasks=1 --time=1:00:00 --account=scec_608 == Example profile query == %ucvm_query -f /project/maechlin_162/ucvm_bin/conf/ucvm.conf -m cvmsi < rpv.in > rpv_cvmsi.out == slurm batch script == %cat ucvm_query.job then.. %sbatch ucvm_query.job then .. %squeue -u maechlin then .. %cat rpv_cvmsi.out == UCVM Basin Query == *[https://github.com/SCECcode/UCVMC/wiki/Test-Cases-Basin-Query Basin Query Examples] == Example basin_query Command on Discovery == %basin_query -f /project/maechlin_162/ucvm_bin/conf/ucvm.conf -m cvmh -v 2500 < basin_pts.in > basin_pts_cvmh.out then.. %cat basin_pts_cvmh.out which shows returns 3 depth values tuple that is, first-crossing, second crossing and the last crossing with the threshold. == Transfer files between Discovery and laptop == Assume file on laptop, copy it to directory on discovery Issue this command from directory on laptop that contains the file ucvmPlotting.yml that you want to copy %scp ucvmPlotting.yml maechlin@discovery.usc.edu:/home1/maechlin/test_ucvm/. or, copy files from directory on discovery.usc.edu to laptop in a directory on laptop, run this command %scp maechlin@discovery.usc.edu:/home1/maechlin/test_ucvm/*
Create Plot using Website - 1D Vertical Profile
Create 1D vertical profile for location in LA Basin (CSU Dominquez Hills):
- 33.8628
- -118.2525
- 0-10k
- 100m
Create Plot using Website:
- point browser to http://moho.scec.org/UCVM_web/web/viewer.php
- select "1D Vertical Profile"
- enter 33.8628 for Latitude
- enter -118.2525 for Longitude
- enter 0 for Z start
- enter 10000 for Z ends
- enter 100 for Z step
Create Plot using Discovery
Setup the plotting environment
%2test
then..
%plot_depth_profile.py -s 33.8628,-118.2525 -b 0 -e 10000 -d vs,vp,density -v 100 -c cvmh -o depth.png
Then, you can view the plots with
%view_png.py -f depth.png
Running UCVM Plotting on Discovery
On discovery, setup your plotting environment. This is only needed the first time
%mkdir /project/scec_608/chukwueb/ucvm_test
Then add these aliases into .bashrc file
"alias 2test='cd /project/scec_608/chukwueb/ucvm_test'"
"alias 2project='cd /project/scec_608/chukwueb'"
Save the updated .bashrc file
then,..
%source ~/.bashrc
then,..
%env |grep UCVM
should see setting of UCVM related environment variable like these..
UCVM_SRC_PATH=...
UCVM_INSTALL_PATH=...
then, these command should return useful information..
%which ucvm_query
%ucvm_query -H
%conda env list
This alias should move you to your ucvm installation directory
%2project
if you see ucvmPlotting, do this, %conda activate ucvmPlotting skip to NEXT else, %conda env create -f ucvmPlotting.yml this will take a while.. %conda env list should see ucvmPlotting as one of the environment %conda activate ucvmPlotting %2project %git clone https://github.com/SCECcode/ucvm_plotting.git %cd ucvm_plotting %./unpack-dist NEXT: check if ucvm_plotting is there, %2project %cd ucvm_plotting/ucvm_plotting %./run_depth.sh to run manually, %plot_horizontal_slice.py -b 33.35,-118 -u 34.35,-117 -e 1000 -d vs -c cvmh -a s -s 0.01 -o horizontal.png %view_png.py -f horizontal.png