Difference between revisions of "Running UCVM on Discovery"

From SCECpedia
Jump to navigationJump to search
 
(36 intermediate revisions by 2 users not shown)
Line 3: Line 3:
 
*[https://carc.usc.edu/user-information/user-guides/high-performance-computing CARC Cluster Documentation]
 
*[https://carc.usc.edu/user-information/user-guides/high-performance-computing CARC Cluster Documentation]
 
*[https://carc.usc.edu/user-information/user-guides/high-performance-computing/running-jobs CARC Running Jobs]
 
*[https://carc.usc.edu/user-information/user-guides/high-performance-computing/running-jobs CARC Running Jobs]
 +
*[https://software-carpentry.org/ Software Carpentry Training Materials]
  
== 1D Vertical Profile ==
+
== Setting Up UCVM Environment on Discovery ==
Create 1D vertical profile for:
+
On discovery, setup your ucvm environment. This is only needed the first time. Commands on Linux command line are preceded by %. Don't type the %
* 33.8628
 
* -118.2525
 
* 0-10k
 
* 100m
 
  
*Create Plot using Website
+
Confirm your test directory exists, if not create it with mkdir command
  
point browser to http://moho.scec.org/UCVM_web/web/viewer.php
+
%cd /home1/<username>/test_ucvm
  
select "1D Vertical Profile"
+
if not, create a test directory in your account
  
enter 33.8628  for Latitude
+
%mkdir /home1/<username/test_ucvm
  
enter -118.2525  for Longitude
+
For this training session, copy /home1/maechlin/test_ucvm to your /home1/<username>/test_ucvm
  
enter 0  for Z start
+
%cd /home1/<username>/test_ucvm
  
enter 1000 for Z ends
+
%cp /home1/maechlin/test_ucvm/* .
  
enter 100 for Z step
+
Confirm the files were copied
  
== Create Plot using Discovery ==
+
%ls
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
 
  
== UCVM Basin Query ==
+
then return to your login directory
*[https://github.com/SCECcode/UCVMC/wiki/Test-Cases-Basin-Query Basin Query Examples]
+
%cd ~
  
== Running UCVM Plotting on Discovery ==
 
On discovery, setup your plotting environment. This is only needed the first time
 
%mkdir /home1/maechlin/ucvm_test
 
 
Then add these aliases into .bashrc file
 
Then add these aliases into .bashrc file
"alias 2test='cd /project/scec_608/chukwueb/ucvm_test'"
+
 
"alias 2project='cd /project/scec_608/chukwueb'"
+
*alias 2test="cd /home1/<username>/test_ucvm"
Save the updated .bashrc file
+
*alias 2project="cd /project/scec_608/<username>/ucvm/ucvm_bin"
then,..
+
 
 +
Save the updated .bashrc file and run the updated .bashrc file
 +
 
 
%source ~/.bashrc
 
%source ~/.bashrc
 +
 
then,..
 
then,..
 +
 
%env |grep UCVM
 
%env |grep UCVM
 +
 
should see setting of UCVM related environment variable like these..
 
should see setting of UCVM related environment variable like these..
  
 
UCVM_SRC_PATH=...
 
UCVM_SRC_PATH=...
 +
 
UCVM_INSTALL_PATH=...
 
UCVM_INSTALL_PATH=...
  
 
then, these command should return useful information..
 
then, these command should return useful information..
 +
 
%which ucvm_query
 
%which ucvm_query
 +
 
%ucvm_query -H
 
%ucvm_query -H
%conda env list
 
  
 +
This alias should move you to your ucvm installation directory
 +
 +
%2project
 +
 +
This alias should move you to your test_ucvm directory
 +
 +
%2test
 +
 +
== Technique to reduce auto logouts ==
 +
$ ssh -o "ServerAliveInterval 60" broadband
 +
 +
== Running ucvm_query on Discovery ==
 +
This is the contents of the README.md on discovery
 
<pre>
 
<pre>
if you see ucvmPlotting,
+
(base) [maechlin@discovery1 test_ucvm]$ cat README.md
do this,
+
== Linux Command Syntax ==
  %conda activate ucvmPlotting
+
Example commands on Linux system. Don't type the % sign
  skip to  NEXT
+
%ls
else,
+
%pwd
  %conda env create -f ucvmPlotting.yml
 
  this will take a while..
 
  
  %conda env list
+
== ucvm query Input format ==
 +
lon, lat, depth
 +
-118.0, 34.0 0.0
  
  should see ucvmPlotting as one of the environment
+
== Example query format ==
 +
move into your test_ucvm directory where you copied files from /home1/maechlin/test_ucvm
  
  %conda activate ucvmPlotting
+
You can use alias setup earliers
 +
%2test
  
  %2project
+
confirm files referenced are in the current directory
  %git clone https://github.com/SCECcode/ucvm_plotting.git
+
%pwd
  %cd ucvm_plotting
 
  %./unpack-dist
 
  
NEXT:
+
%ucvm_query -f /project/scec_608/<username>/ucvm_bin/conf/ucvm.conf -m cvmh < test_pts.in
check if ucvm_plotting is there,
+
 
 +
== UCVM Basin Query ==
 +
*[https://github.com/SCECcode/UCVMC/wiki/Test-Cases-Basin-Query Basin Query Examples]
  
%2project
+
== Example basin_query Command on Discovery ==
%cd ucvm_plotting/ucvm_plotting
+
%basin_query -f /project/maechlin_162/ucvm_bin/conf/ucvm.conf -m cvmh -v 2500 < basin_pts.in > basin_pts_cvmh.out
%./run_depth.sh
+
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.
  
to run manually,
+
== Transfer files between Discovery and laptop ==
%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
+
Assume file on laptop, copy it to directory on discovery
%view_png.py -f horizontal.png
+
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/*
 
</pre>
 
</pre>
  

Latest revision as of 02:53, 22 April 2021

CARC Getting Started Documentation

Setting Up UCVM Environment on Discovery

On discovery, setup your ucvm environment. This is only needed the first time. Commands on Linux command line are preceded by %. Don't type the %

Confirm your test directory exists, if not create it with mkdir command

%cd /home1/<username>/test_ucvm

if not, create a test directory in your account

%mkdir /home1/<username/test_ucvm

For this training session, copy /home1/maechlin/test_ucvm to your /home1/<username>/test_ucvm

%cd /home1/<username>/test_ucvm

%cp /home1/maechlin/test_ucvm/* .

Confirm the files were copied

%ls

then return to your login directory %cd ~

Then add these aliases into .bashrc file

  • alias 2test="cd /home1/<username>/test_ucvm"
  • alias 2project="cd /project/scec_608/<username>/ucvm/ucvm_bin"

Save the updated .bashrc file and run the updated .bashrc file

%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

This alias should move you to your ucvm installation directory

%2project

This alias should move you to your test_ucvm directory

%2test

Technique to reduce auto logouts

$ ssh -o "ServerAliveInterval 60" broadband

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 ==
move into your test_ucvm directory where you copied files from /home1/maechlin/test_ucvm

You can use alias setup earliers
%2test

confirm files referenced are in the current directory
%pwd

%ucvm_query -f /project/scec_608/<username>/ucvm_bin/conf/ucvm.conf -m cvmh < test_pts.in

== 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/* 

Related Entries