<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>https://www.geol.umd.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tolumorayo</id>
	<title>GeoWiki - User contributions [en]</title>
	<link rel="self" type="application/atom+xml" href="https://www.geol.umd.edu/wiki/api.php?action=feedcontributions&amp;feedformat=atom&amp;user=Tolumorayo"/>
	<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php/Special:Contributions/Tolumorayo"/>
	<updated>2026-06-17T03:09:55Z</updated>
	<subtitle>User contributions</subtitle>
	<generator>MediaWiki 1.45.3</generator>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=40</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=40"/>
		<updated>2017-08-30T21:40:17Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Build parameter files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
=Build parameter files=&lt;br /&gt;
&#039;&#039;&#039;Run [{{#filelink: single_job.sh}} run_pythonSbatch.sh] script, which calls the single job sbatch shell  [{{#filelink: single_job.sh}} runSingle_PhaseExpt.sh], and the python code &amp;lt;code&amp;gt; bldParamSingle.py&amp;lt;/code&amp;gt; [{{#filelink: single_job.sh}} bldParamSingle.py] &#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: run_pythonSbatch.sh}}&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
#!/bin/tcsh&lt;br /&gt;
# run_pythonSbatch.sh&lt;br /&gt;
# Author: Tolulope Olugboji&lt;br /&gt;
# Date:  March 6, 2015&lt;br /&gt;
#&lt;br /&gt;
#  Used to build parameter files, by running them on umd&#039;s deepthought2&lt;br /&gt;
&lt;br /&gt;
module load python/2.7.8&lt;br /&gt;
&lt;br /&gt;
# remplace with the following output directory for 3 expts - 1. Expt1_All 2. Expt2_RadialRal 3. Expt3_Seasons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
set expts = (newExpts/RadialRal/ newExpts/Summer/ newExpts/Winter/)&lt;br /&gt;
set saveAs = (Expt2_RadialRal/  Expt3_Seasons/Sum/  Expt4_Seasons/Win/)&lt;br /&gt;
set use4slrm = (expt2 expt3 expt4)&lt;br /&gt;
set indxExpts = `seq 1 $#expts`  # experiment iterator&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Single in Directory ...&amp;quot; $expts[1]&lt;br /&gt;
echo $saveAs[1]&lt;br /&gt;
echo $#expts&lt;br /&gt;
&lt;br /&gt;
foreach iExpt ($indxExpts)&lt;br /&gt;
&lt;br /&gt;
    set inDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/Measure/&#039;&lt;br /&gt;
    set outDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/THBIParams/&#039;&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;START !!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
    echo &amp;quot;Input Dir ...&amp;quot; $inDirX$expts[$iExpt]&lt;br /&gt;
    echo &amp;quot;Output Dir    &amp;quot; $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inDir = $inDirX$expts[$iExpt]&lt;br /&gt;
    set outDir = $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inLove = `ls $inDir`&lt;br /&gt;
    set indxPhase = `seq 1 $#inLove`&lt;br /&gt;
    #set indxPhase = `seq 12 21`&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;all Love&amp;quot; $inLove[1] &amp;quot;length&amp;quot; $#inLove&lt;br /&gt;
    echo $indxPhase&lt;br /&gt;
&lt;br /&gt;
    foreach iPhase ($indxPhase)&lt;br /&gt;
&lt;br /&gt;
        set file = $inLove[$iPhase]&lt;br /&gt;
        echo $iPhase &amp;quot; : &amp;quot; $inLove[$iPhase]&lt;br /&gt;
        setenv JOBNAME &amp;quot;$file&amp;quot;&lt;br /&gt;
        setenv INDIR &amp;quot;$inDir&amp;quot;&lt;br /&gt;
        setenv OUTDIR &amp;quot;$outDir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        set slurmOut = &amp;quot;/lustre/olugboji/buildParamFiles/USANT15/mpiOUT/slurm-$use4slrm[$iExpt]-$file.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        #sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=JOBNAME ./runSingle_PhaseExpt.sh&lt;br /&gt;
        sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=ALL ./runSingle_PhaseExpt.sh&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;END!!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: runSingle_PhaseExpt.sh}}&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
#!/bin/tcsh&lt;br /&gt;
# runSingle_PhaseExpt.sh}&lt;br /&gt;
# Adjust memory/walltime/ncpus as necessary&lt;br /&gt;
#&lt;br /&gt;
#&lt;br /&gt;
#SBATCH --ntasks=1&lt;br /&gt;
#SBATCH --mail-user=tolumorayo@gmail.com&lt;br /&gt;
#SBATCH --mail-type=ALL&lt;br /&gt;
#SBATCH -A ved-prj-hi&lt;br /&gt;
#SBATCH --share&lt;br /&gt;
&lt;br /&gt;
module load python/2.7.8&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;*********SBATCH called on  ... $JOBNAME $INDIR $OUTDIR&amp;quot;&lt;br /&gt;
&lt;br /&gt;
ipython  bldParamSingle.py $JOBNAME $INDIR $OUTDIR&lt;br /&gt;
&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: bldParamSingle.py}}&lt;br /&gt;
&amp;lt;source lang=python&amp;gt;&lt;br /&gt;
# coding: utf-8&lt;br /&gt;
&lt;br /&gt;
# bldParamSingle.py&lt;br /&gt;
&lt;br /&gt;
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
# Author: Tolulope Olugboji&lt;br /&gt;
# Date:  Nov. 17, 2014 | Original: - | updated July, 17&lt;br /&gt;
# !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!&lt;br /&gt;
#&lt;br /&gt;
# Objective:   Parse Ekstrom USarry phase velocity data:&lt;br /&gt;
#              construct files used by transdimensional tomography code tomo- Bodin etal&lt;br /&gt;
#&lt;br /&gt;
#              sources.txt - file containing source lat and lon locations&lt;br /&gt;
#              receivers.txt - fle containing receiver lat and lon locations&lt;br /&gt;
#              paths.txt - file containing path vectors...&lt;br /&gt;
#&lt;br /&gt;
# use module load python/2.7.8 on deepthought2&lt;br /&gt;
&lt;br /&gt;
import numpy as np&lt;br /&gt;
import math&lt;br /&gt;
from obspy.core.util.geodetics import gps2DistAzimuth&lt;br /&gt;
from geographiclib.geodesic import Geodesic&lt;br /&gt;
from os import listdir&lt;br /&gt;
from os.path import isfile, join&lt;br /&gt;
import os&lt;br /&gt;
import sys&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# parse directory and read sort files into Love and Raleigh txt files&lt;br /&gt;
def parseDir(inDir):&lt;br /&gt;
    outLove = []&lt;br /&gt;
    outRal = []&lt;br /&gt;
    &lt;br /&gt;
    onlyfiles = [ f for f in listdir(inDir) if isfile(join(inDir,f)) ]&lt;br /&gt;
    #print onlyfiles&lt;br /&gt;
    &lt;br /&gt;
    for curFile in onlyfiles:&lt;br /&gt;
        phaseCode = curFile[0:1]&lt;br /&gt;
        &lt;br /&gt;
        if phaseCode == &#039;L&#039;:&lt;br /&gt;
            outLove.append(curFile)&lt;br /&gt;
        if phaseCode == &#039;R&#039;:&lt;br /&gt;
            outRal.append(curFile)&lt;br /&gt;
    &lt;br /&gt;
    return outLove, outRal&lt;br /&gt;
&lt;br /&gt;
# Check if Directory exists, if it does return, otherwise create dir&lt;br /&gt;
def mkDirIfNE(inPath):&lt;br /&gt;
    if not os.path.exists(inPath):&lt;br /&gt;
        print &amp;quot;making directory ..&amp;quot;&lt;br /&gt;
        os.makedirs(inPath)&lt;br /&gt;
    else:&lt;br /&gt;
        print &amp;quot;Directory already exists&amp;quot;&lt;br /&gt;
        &lt;br /&gt;
&lt;br /&gt;
# function that returns nPoints on great circle path between locA(lat, lon) and locB(lat2, lon2)&lt;br /&gt;
def returnPtsOnGCPath(locA, locB, nPoints=2, delta=0.2):&lt;br /&gt;
    EARTH_R = 6371.000000      # Earth Radius&lt;br /&gt;
    # Coordinates of airports&lt;br /&gt;
    lat1, lon1 = locA[0], locA[1]  # source&lt;br /&gt;
    lat2, lon2 = locB[0], locB[1]  # receiver&lt;br /&gt;
&lt;br /&gt;
    # Compute path information from locA to locB&lt;br /&gt;
    p = Geodesic.WGS84.Inverse(lat1, lon1, lat2, lon2)&lt;br /&gt;
    # define line information&lt;br /&gt;
    l=Geodesic.WGS84.Line(p[&#039;lat1&#039;],p[&#039;lon1&#039;],p[&#039;azi1&#039;])&lt;br /&gt;
    # Compute midpoint starting at 1&lt;br /&gt;
    &lt;br /&gt;
    dlon = (lon2 - lon1)&lt;br /&gt;
    dlat = (lat2 - lat1)&lt;br /&gt;
    n = int(math.ceil(math.sqrt(dlon*dlon + dlat*dlat)/delta))&lt;br /&gt;
    &lt;br /&gt;
    if ( n &amp;lt; nPoints ):&lt;br /&gt;
        nPoints = 1&lt;br /&gt;
    else:&lt;br /&gt;
        nPoints = n&lt;br /&gt;
&lt;br /&gt;
    pntsOnPath = []&lt;br /&gt;
    for i in range(nPoints+1):&lt;br /&gt;
        b=l.Position(i*p[&#039;s12&#039;]/nPoints)&lt;br /&gt;
        pntsOnPath.append([ b[&#039;lon2&#039;], b[&#039;lat2&#039;], EARTH_R ])&lt;br /&gt;
&lt;br /&gt;
    return np.asarray(pntsOnPath), nPoints+1&lt;br /&gt;
&lt;br /&gt;
#Define Data Directories -- Ekstrom phase velocity files... UPDATE ! POINT TO USANT15&lt;br /&gt;
# see if arguments where passed successfully ...&lt;br /&gt;
print &amp;quot;!!!!!!!!!!! Called Build with argument !!!!!!!: &amp;quot;, sys.argv[1]&lt;br /&gt;
&lt;br /&gt;
#RalFile = inRal[iFile]&lt;br /&gt;
RalFile = sys.argv[1]&lt;br /&gt;
inDir = sys.argv[2]&lt;br /&gt;
outDir = sys.argv[3]&lt;br /&gt;
&lt;br /&gt;
nxtDir = RalFile[0:3] &lt;br /&gt;
mkDirIfNE(outDir + nxtDir)&lt;br /&gt;
&lt;br /&gt;
### Out Data File for transdimensional codee&lt;br /&gt;
outLoc = outDir+nxtDir+&#039;/sources.dat&#039;&lt;br /&gt;
outLocRec = outDir+nxtDir+&#039;/receivers.dat&#039;&lt;br /&gt;
outPaths = outDir+nxtDir+&#039;/paths.dat&#039;&lt;br /&gt;
outObsv = outDir+nxtDir+&#039;/observations.dat&#039;&lt;br /&gt;
outCodes = outDir+nxtDir+&#039;/sourcesAnot.dat&#039;&lt;br /&gt;
&lt;br /&gt;
#### Read columnns of the data file&lt;br /&gt;
fileLoc = inDir + RalFile&lt;br /&gt;
staCodes = np.loadtxt(fileLoc, dtype=&#039;str&#039;, usecols= (0,))&lt;br /&gt;
recCodes = np.loadtxt(fileLoc, dtype=&#039;str&#039;, usecols= (1,))&lt;br /&gt;
staLocs = np.loadtxt(fileLoc, usecols= (2,3))&lt;br /&gt;
recLocs = np.loadtxt(fileLoc, usecols=(4,5))&lt;br /&gt;
&lt;br /&gt;
#### Load observational data&lt;br /&gt;
pathDist = np.loadtxt(fileLoc,  usecols= (6,)) # distance in km along source-receiver path&lt;br /&gt;
pathVel = np.loadtxt(fileLoc,  usecols= (10,)) # phase velocity in km/sec along source-receiver path&lt;br /&gt;
pathDV = np.loadtxt(fileLoc, usecols= (11,)) # phase velocity error in sec along source-receiver path&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
allStaCode = len(staCodes)&lt;br /&gt;
allRecCode = len(recCodes)&lt;br /&gt;
#print &amp;quot;statAll:, &amp;quot;, allStaCode, allRecCode, staCodes[1], staLocs[1]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
staSet = list(set(staCodes))&lt;br /&gt;
recSet = list(set(recCodes))&lt;br /&gt;
&lt;br /&gt;
uniqLen = len(staSet)&lt;br /&gt;
uniqLenRec = len(recSet)&lt;br /&gt;
print &amp;quot;Unique Set: &amp;quot;, uniqLen, uniqLenRec, staSet[0:3], recSet[0:3]&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
storeStatCode = []&lt;br /&gt;
storeStaLoc = []&lt;br /&gt;
&lt;br /&gt;
for indxUniq in range(uniqLen):&lt;br /&gt;
    #print staSet[indxUniq]&lt;br /&gt;
    for lookUp in range(allStaCode):&lt;br /&gt;
        if (staSet[indxUniq] == staCodes[lookUp]): &lt;br /&gt;
            #print staCodes[lookUp], staLocs[lookUp]&lt;br /&gt;
            storeStatCode.append(staCodes[lookUp])&lt;br /&gt;
            storeStaLoc.append(staLocs[lookUp])&lt;br /&gt;
            break&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;After Parse: &amp;quot;, len(storeStatCode), len(storeStaLoc)&lt;br /&gt;
print &amp;quot;After Parse: &amp;quot;, storeStatCode[0:3], storeStaLoc[0:3]&lt;br /&gt;
&lt;br /&gt;
headVal = len(storeStaLoc)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
# save station and receiver locations [stations double as receivers in ambient noise tomography]..&lt;br /&gt;
#&lt;br /&gt;
# - uncomment below to save arrays to file&lt;br /&gt;
np.savetxt(outLoc, np.fliplr(storeStaLoc), header= str(headVal), fmt=&#039;%.3f&#039;, comments=&#039;&#039;)&lt;br /&gt;
np.savetxt(outLocRec, np.fliplr(storeStaLoc), header= str(headVal), fmt=&#039;%.3f&#039;, comments=&#039;&#039;)&lt;br /&gt;
&lt;br /&gt;
# Save all possible paths and &lt;br /&gt;
&lt;br /&gt;
nPointsOnPath = 2&lt;br /&gt;
lenObserv = allStaCode&lt;br /&gt;
searchLen = lenObserv&lt;br /&gt;
lenPaths = len(storeStaLoc)*len(storeStaLoc)&lt;br /&gt;
&lt;br /&gt;
countPath = 0&lt;br /&gt;
countObsvPath = 0&lt;br /&gt;
&lt;br /&gt;
staCodeList = staCodes.tolist()&lt;br /&gt;
recCodeList = recCodes.tolist()&lt;br /&gt;
&lt;br /&gt;
listPathDist = pathDist.tolist()&lt;br /&gt;
listPathVel = pathVel.tolist()&lt;br /&gt;
listPathDV = pathDV.tolist()&lt;br /&gt;
&lt;br /&gt;
print lenPaths&lt;br /&gt;
observTable = []&lt;br /&gt;
with file(outPaths, &#039;w&#039;) as outFilePath:&lt;br /&gt;
    outFilePath.write( &#039;%d \n&#039; % lenPaths  )&lt;br /&gt;
&lt;br /&gt;
    obsRow = [0, 0.0, 0.0]&lt;br /&gt;
    for staCode, staLoc in zip(storeStatCode, storeStaLoc):&lt;br /&gt;
        for recCode, recLoc in zip(storeStatCode, storeStaLoc):&lt;br /&gt;
            valProgress = float(countPath)/float(lenPaths) * 100.0&lt;br /&gt;
            #print &amp;quot;%0.5f &amp;quot;  %valProgress,  &amp;quot;%... done (&amp;quot;, countPath, &amp;quot;of&amp;quot;, lenPaths , &amp;quot;)&amp;quot;&lt;br /&gt;
&lt;br /&gt;
            obsRow = [0, 0.0, 0.0]&lt;br /&gt;
            if staCode == recCode:&lt;br /&gt;
                #print &#039;self Path&#039;&lt;br /&gt;
                nPoints= 1&lt;br /&gt;
                nPointsOnPath = 2&lt;br /&gt;
                path, nPointsOnPath = returnPtsOnGCPath(staLoc, staLoc,1, delta=0.2)&lt;br /&gt;
                outFilePath.write( &#039;%d \n&#039; % nPointsOnPath  )&lt;br /&gt;
                np.savetxt(outFilePath, path, fmt=&#039;%.3f&#039;)&lt;br /&gt;
            else:&lt;br /&gt;
                #scanConnectingPath(staCode, recCode)&lt;br /&gt;
                #print &amp;quot;Look-Up&amp;quot;, staCode, recCode, staLoc, recLoc&lt;br /&gt;
                path,nPointsOnPath = returnPtsOnGCPath(staLoc, recLoc,2, delta=0.2)&lt;br /&gt;
&lt;br /&gt;
                nPoints= nPointsOnPath&lt;br /&gt;
                outFilePath.write( &#039;%d \n&#039; % nPoints  )&lt;br /&gt;
                np.savetxt(outFilePath, path, fmt=&#039;%.3f&#039;)&lt;br /&gt;
&lt;br /&gt;
                for iObserv in range(len(staCodeList)):&lt;br /&gt;
                    pathSta = staCodeList[iObserv]&lt;br /&gt;
                    pathRec = recCodeList[iObserv]&lt;br /&gt;
&lt;br /&gt;
                #for pathSta, pathRec in zip(staCodes, recCodes):&lt;br /&gt;
                    #print &amp;quot;Searching: &amp;quot;, pathSta, pathRec&lt;br /&gt;
                    if (staCode == pathSta and recCode == pathRec) or (staCode == pathRec and recCode == pathSta):&lt;br /&gt;
&lt;br /&gt;
                        #timeObs = float(pathDist[iObserv]) / float(pathVel[iObserv])&lt;br /&gt;
                        timeObs = listPathDist[iObserv] / listPathVel[iObserv]&lt;br /&gt;
                        #delObs = (timeObs / float(pathVel[iObserv]) ) * float(pathDV[iObserv])&lt;br /&gt;
                        delObs = (timeObs / listPathVel[iObserv] ) * listPathDV[iObserv]&lt;br /&gt;
                        obsRow = [1, timeObs, delObs]&lt;br /&gt;
&lt;br /&gt;
                        countObsvPath = countObsvPath + 1&lt;br /&gt;
                        &lt;br /&gt;
                        print &amp;quot;%0.5f &amp;quot;  %valProgress,  &amp;quot;%... done (&amp;quot;, countPath, &amp;quot;of&amp;quot;, lenPaths , &amp;quot;)&amp;quot;&lt;br /&gt;
                        print &amp;quot;Found: &amp;quot;, pathSta, pathRec&lt;br /&gt;
                        # Delete search index to make search smaller and tractable&lt;br /&gt;
                        del staCodeList[iObserv]&lt;br /&gt;
                        del recCodeList[iObserv]&lt;br /&gt;
                        &lt;br /&gt;
                        del listPathDist[iObserv]&lt;br /&gt;
                        del listPathVel[iObserv]&lt;br /&gt;
                        del listPathDV[iObserv]&lt;br /&gt;
                        # End delete of search list ....&lt;br /&gt;
&lt;br /&gt;
                        ### If path has valid observation then put code 1 in observation file, otherwise 0.&lt;br /&gt;
                        #searchLen = lenObserv - 1;&lt;br /&gt;
                        break&lt;br /&gt;
&lt;br /&gt;
            observTable.append(obsRow)&lt;br /&gt;
            countPath  = countPath + 1&lt;br /&gt;
            #clear_output(wait=True)&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
print &amp;quot;Done: Total Valid Paths = &amp;quot;, countObsvPath&lt;br /&gt;
np.savetxt(outObsv, observTable, fmt=&#039;%d %.3f  %.3f&#039;)&lt;br /&gt;
        &lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml: &amp;lt;/code&amp;gt;&lt;br /&gt;
Parameter file used by tomo single.sh for setting up all the required input parameters used by tomo mpi. It sets up parameters like file paths, number of steps, distribution range, perturbation parameters, seed values for probability distribution, state of starting models etc. Note that we provide another parameter file: &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml &amp;lt;/code&amp;gt;for setting up parameters if the chain is to be restart from a specified initial model state (typically a high-resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh: &amp;lt;/code&amp;gt;&lt;br /&gt;
Script used to download results data from the remote deepthought2 cluster machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=39</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=39"/>
		<updated>2017-08-30T21:33:22Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Build parameter files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
=Build parameter files=&lt;br /&gt;
&#039;&#039;&#039;Run [{{#filelink: single_job.sh}} run_pythonSbatch.sh] script, the single shell python caller, and the python code&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: run_pythonSbatch.sh}}&lt;br /&gt;
&amp;lt;source lang=bash&amp;gt;&lt;br /&gt;
#!/bin/tcsh&lt;br /&gt;
#&lt;br /&gt;
# Author: Tolulope Olugboji&lt;br /&gt;
# Date:  March 6, 2015&lt;br /&gt;
#&lt;br /&gt;
#  Used to build parameter files, by running them on umd&#039;s deepthought2&lt;br /&gt;
&lt;br /&gt;
module load python/2.7.8&lt;br /&gt;
&lt;br /&gt;
# remplace with the following output directory for 3 expts - 1. Expt1_All 2. Expt2_RadialRal 3. Expt3_Seasons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
set expts = (newExpts/RadialRal/ newExpts/Summer/ newExpts/Winter/)&lt;br /&gt;
set saveAs = (Expt2_RadialRal/  Expt3_Seasons/Sum/  Expt4_Seasons/Win/)&lt;br /&gt;
set use4slrm = (expt2 expt3 expt4)&lt;br /&gt;
set indxExpts = `seq 1 $#expts`  # experiment iterator&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Single in Directory ...&amp;quot; $expts[1]&lt;br /&gt;
echo $saveAs[1]&lt;br /&gt;
echo $#expts&lt;br /&gt;
&lt;br /&gt;
foreach iExpt ($indxExpts)&lt;br /&gt;
&lt;br /&gt;
    set inDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/Measure/&#039;&lt;br /&gt;
    set outDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/THBIParams/&#039;&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;START !!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
    echo &amp;quot;Input Dir ...&amp;quot; $inDirX$expts[$iExpt]&lt;br /&gt;
    echo &amp;quot;Output Dir    &amp;quot; $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inDir = $inDirX$expts[$iExpt]&lt;br /&gt;
    set outDir = $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inLove = `ls $inDir`&lt;br /&gt;
    set indxPhase = `seq 1 $#inLove`&lt;br /&gt;
    #set indxPhase = `seq 12 21`&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;all Love&amp;quot; $inLove[1] &amp;quot;length&amp;quot; $#inLove&lt;br /&gt;
    echo $indxPhase&lt;br /&gt;
&lt;br /&gt;
    foreach iPhase ($indxPhase)&lt;br /&gt;
&lt;br /&gt;
        set file = $inLove[$iPhase]&lt;br /&gt;
        echo $iPhase &amp;quot; : &amp;quot; $inLove[$iPhase]&lt;br /&gt;
        setenv JOBNAME &amp;quot;$file&amp;quot;&lt;br /&gt;
        setenv INDIR &amp;quot;$inDir&amp;quot;&lt;br /&gt;
        setenv OUTDIR &amp;quot;$outDir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        set slurmOut = &amp;quot;/lustre/olugboji/buildParamFiles/USANT15/mpiOUT/slurm-$use4slrm[$iExpt]-$file.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        #sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=JOBNAME ./runSingle_PhaseExpt.sh&lt;br /&gt;
        sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=ALL ./runSingle_PhaseExpt.sh&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;END!!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml: &amp;lt;/code&amp;gt;&lt;br /&gt;
Parameter file used by tomo single.sh for setting up all the required input parameters used by tomo mpi. It sets up parameters like file paths, number of steps, distribution range, perturbation parameters, seed values for probability distribution, state of starting models etc. Note that we provide another parameter file: &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml &amp;lt;/code&amp;gt;for setting up parameters if the chain is to be restart from a specified initial model state (typically a high-resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh: &amp;lt;/code&amp;gt;&lt;br /&gt;
Script used to download results data from the remote deepthought2 cluster machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=38</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=38"/>
		<updated>2017-08-30T21:32:08Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Build parameter files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
=Build parameter files=&lt;br /&gt;
&#039;&#039;&#039;Run [{{#filelink: single_job.sh}} run_pytnonSbatch.sh] script, the single shell python caller, and the python code&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: run_pytnonSbatch.sh}}&lt;br /&gt;
&amp;lt;source lang=csh&amp;gt;&lt;br /&gt;
#!/bin/tcsh&lt;br /&gt;
#&lt;br /&gt;
# Author: Tolulope Olugboji&lt;br /&gt;
# Date:  March 6, 2015&lt;br /&gt;
#&lt;br /&gt;
#  Used to build parameter files, by running them on umd&#039;s deepthought2&lt;br /&gt;
&lt;br /&gt;
module load python/2.7.8&lt;br /&gt;
&lt;br /&gt;
# remplace with the following output directory for 3 expts - 1. Expt1_All 2. Expt2_RadialRal 3. Expt3_Seasons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
set expts = (newExpts/RadialRal/ newExpts/Summer/ newExpts/Winter/)&lt;br /&gt;
set saveAs = (Expt2_RadialRal/  Expt3_Seasons/Sum/  Expt4_Seasons/Win/)&lt;br /&gt;
set use4slrm = (expt2 expt3 expt4)&lt;br /&gt;
set indxExpts = `seq 1 $#expts`  # experiment iterator&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Single in Directory ...&amp;quot; $expts[1]&lt;br /&gt;
echo $saveAs[1]&lt;br /&gt;
echo $#expts&lt;br /&gt;
&lt;br /&gt;
foreach iExpt ($indxExpts)&lt;br /&gt;
&lt;br /&gt;
    set inDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/Measure/&#039;&lt;br /&gt;
    set outDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/THBIParams/&#039;&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;START !!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
    echo &amp;quot;Input Dir ...&amp;quot; $inDirX$expts[$iExpt]&lt;br /&gt;
    echo &amp;quot;Output Dir    &amp;quot; $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inDir = $inDirX$expts[$iExpt]&lt;br /&gt;
    set outDir = $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inLove = `ls $inDir`&lt;br /&gt;
    set indxPhase = `seq 1 $#inLove`&lt;br /&gt;
    #set indxPhase = `seq 12 21`&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;all Love&amp;quot; $inLove[1] &amp;quot;length&amp;quot; $#inLove&lt;br /&gt;
    echo $indxPhase&lt;br /&gt;
&lt;br /&gt;
    foreach iPhase ($indxPhase)&lt;br /&gt;
&lt;br /&gt;
        set file = $inLove[$iPhase]&lt;br /&gt;
        echo $iPhase &amp;quot; : &amp;quot; $inLove[$iPhase]&lt;br /&gt;
        setenv JOBNAME &amp;quot;$file&amp;quot;&lt;br /&gt;
        setenv INDIR &amp;quot;$inDir&amp;quot;&lt;br /&gt;
        setenv OUTDIR &amp;quot;$outDir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        set slurmOut = &amp;quot;/lustre/olugboji/buildParamFiles/USANT15/mpiOUT/slurm-$use4slrm[$iExpt]-$file.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        #sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=JOBNAME ./runSingle_PhaseExpt.sh&lt;br /&gt;
        sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=ALL ./runSingle_PhaseExpt.sh&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;END!!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml: &amp;lt;/code&amp;gt;&lt;br /&gt;
Parameter file used by tomo single.sh for setting up all the required input parameters used by tomo mpi. It sets up parameters like file paths, number of steps, distribution range, perturbation parameters, seed values for probability distribution, state of starting models etc. Note that we provide another parameter file: &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml &amp;lt;/code&amp;gt;for setting up parameters if the chain is to be restart from a specified initial model state (typically a high-resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh: &amp;lt;/code&amp;gt;&lt;br /&gt;
Script used to download results data from the remote deepthought2 cluster machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=37</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=37"/>
		<updated>2017-08-30T21:31:32Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
=Build parameter files=&lt;br /&gt;
&#039;&#039;&#039;Run [{{#filelink: single_job.sh}} run_pytnonSbatch.sh] script, the single shell python caller, and the python code&#039;&#039;&#039; &lt;br /&gt;
&lt;br /&gt;
{{#fileanchor: run_pytnonSbatch.sh}}&lt;br /&gt;
&amp;lt;source lang=tcsh&amp;gt;&lt;br /&gt;
#!/bin/tcsh&lt;br /&gt;
#&lt;br /&gt;
# Author: Tolulope Olugboji&lt;br /&gt;
# Date:  March 6, 2015&lt;br /&gt;
#&lt;br /&gt;
#  Used to build parameter files, by running them on umd&#039;s deepthought2&lt;br /&gt;
&lt;br /&gt;
module load python/2.7.8&lt;br /&gt;
&lt;br /&gt;
# remplace with the following output directory for 3 expts - 1. Expt1_All 2. Expt2_RadialRal 3. Expt3_Seasons&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
set expts = (newExpts/RadialRal/ newExpts/Summer/ newExpts/Winter/)&lt;br /&gt;
set saveAs = (Expt2_RadialRal/  Expt3_Seasons/Sum/  Expt4_Seasons/Win/)&lt;br /&gt;
set use4slrm = (expt2 expt3 expt4)&lt;br /&gt;
set indxExpts = `seq 1 $#expts`  # experiment iterator&lt;br /&gt;
&lt;br /&gt;
echo &amp;quot;Single in Directory ...&amp;quot; $expts[1]&lt;br /&gt;
echo $saveAs[1]&lt;br /&gt;
echo $#expts&lt;br /&gt;
&lt;br /&gt;
foreach iExpt ($indxExpts)&lt;br /&gt;
&lt;br /&gt;
    set inDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/Measure/&#039;&lt;br /&gt;
    set outDirX = &#039;/lustre/olugboji/buildParamFiles/USANT15/THBIParams/&#039;&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;START !!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
    echo &amp;quot;Input Dir ...&amp;quot; $inDirX$expts[$iExpt]&lt;br /&gt;
    echo &amp;quot;Output Dir    &amp;quot; $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inDir = $inDirX$expts[$iExpt]&lt;br /&gt;
    set outDir = $outDirX$saveAs[$iExpt]&lt;br /&gt;
&lt;br /&gt;
    set inLove = `ls $inDir`&lt;br /&gt;
    set indxPhase = `seq 1 $#inLove`&lt;br /&gt;
    #set indxPhase = `seq 12 21`&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;all Love&amp;quot; $inLove[1] &amp;quot;length&amp;quot; $#inLove&lt;br /&gt;
    echo $indxPhase&lt;br /&gt;
&lt;br /&gt;
    foreach iPhase ($indxPhase)&lt;br /&gt;
&lt;br /&gt;
        set file = $inLove[$iPhase]&lt;br /&gt;
        echo $iPhase &amp;quot; : &amp;quot; $inLove[$iPhase]&lt;br /&gt;
        setenv JOBNAME &amp;quot;$file&amp;quot;&lt;br /&gt;
        setenv INDIR &amp;quot;$inDir&amp;quot;&lt;br /&gt;
        setenv OUTDIR &amp;quot;$outDir&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        set slurmOut = &amp;quot;/lustre/olugboji/buildParamFiles/USANT15/mpiOUT/slurm-$use4slrm[$iExpt]-$file.txt&amp;quot;&lt;br /&gt;
&lt;br /&gt;
        #sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=JOBNAME ./runSingle_PhaseExpt.sh&lt;br /&gt;
        sbatch --job-name=$JOBNAME --time=2-0 --output=$slurmOut --export=ALL ./runSingle_PhaseExpt.sh&lt;br /&gt;
    end&lt;br /&gt;
&lt;br /&gt;
    echo &amp;quot;END!!!!! Expt &amp;quot; $iExpt &amp;quot;-----------------------------------------------------&amp;quot;&lt;br /&gt;
end&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml: &amp;lt;/code&amp;gt;&lt;br /&gt;
Parameter file used by tomo single.sh for setting up all the required input parameters used by tomo mpi. It sets up parameters like file paths, number of steps, distribution range, perturbation parameters, seed values for probability distribution, state of starting models etc. Note that we provide another parameter file: &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml &amp;lt;/code&amp;gt;for setting up parameters if the chain is to be restart from a specified initial model state (typically a high-resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh: &amp;lt;/code&amp;gt;&lt;br /&gt;
Script used to download results data from the remote deepthought2 cluster machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=31</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=31"/>
		<updated>2017-08-28T23:18:17Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Setting up parameter and data files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml: &amp;lt;/code&amp;gt;&lt;br /&gt;
Parameter file used by tomo single.sh for setting up all the required input parameters used by tomo mpi. It sets up parameters like file paths, number of steps, distribution range, perturbation parameters, seed values for probability distribution, state of starting models etc. Note that we provide another parameter file: &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml &amp;lt;/code&amp;gt;for setting up parameters if the chain is to be restart from a specified initial model state (typically a high-resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh: &amp;lt;/code&amp;gt;&lt;br /&gt;
Script used to download results data from the remote deepthought2 cluster machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=30</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=30"/>
		<updated>2017-08-28T23:13:32Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Setting up parameter and data files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter files needed to start the &amp;lt;code&amp;gt;tomompi&amp;lt;/code? code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; &amp;lt;/code&amp;gt; where &amp;lt;code&amp;gt;&amp;lt;folder&amp;gt;&amp;lt;/code&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&amp;lt;/code?&lt;br /&gt;
Holds the important observation data, source-receiver configuration and path location files e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, Voronoi-partition location and velocity history, misfit history, model save state, etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart &amp;lt;/code&amp;gt;&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell &amp;lt;code&amp;gt;SBATCH&amp;lt;/code&amp;gt; scripts for staging the code on the cluster Here are the files in this directory:&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this script to run single maps, specify an initial number of partitions, or to determine if you want to restart chains from set stages or particular input models. This is actually a wrapper script to tomo single.sh that does all the heavy lifting.&lt;br /&gt;
* &amp;lt;code&amp;gt;&amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh &amp;lt;/code&amp;gt;:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml:&lt;br /&gt;
Parameter �le used by tomo single.sh for setting up all the required in-&lt;br /&gt;
put parameters used by tomo mpi. It sets up parameters like �le paths,&lt;br /&gt;
number of steps, distribution range, perturbation parameters, seed values&lt;br /&gt;
for probability distribution, state of starting models etc. Note that we&lt;br /&gt;
provide another parameter �le:&lt;br /&gt;
&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml for setting&lt;br /&gt;
up parameters if the chain is to be restart from a speci�ed initial model&lt;br /&gt;
state (typically a high resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh:&lt;br /&gt;
Script used to download results data from the remote deepthought2 clus-&lt;br /&gt;
ter machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-&lt;br /&gt;
processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=29</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=29"/>
		<updated>2017-08-28T23:10:12Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Running tomo mpi with parameter/data �files */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
= Setting up parameter and data files=&lt;br /&gt;
&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is to set up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here:&lt;br /&gt;
&lt;br /&gt;
The First is the &amp;lt;code&amp;gt; &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt; &amp;lt;/code&amp;gt; that stores the input data, parameter �les needed to start the tomo mpi code and results output generated after successful completion of the analysis. The datasets are organized by phase-velocity e.g. &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt; where &amp;lt;folder&amp;gt; represents the 22 phase velocity datasets: L05-L40 and R05-R40. Here is a listing of the data directory:&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;&lt;br /&gt;
Holds the important observation data, source-receiver con�guration and&lt;br /&gt;
path location �les e.g. observations.dat, paths.dat, sources.dat, etc.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/results&lt;br /&gt;
Stores the saved output after completed run e.g. output mean, voroni-&lt;br /&gt;
partition location and velocity history, mis�t history, model save state,&lt;br /&gt;
etc.)&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;Input/Output-Data/Exhaust-directory&amp;gt;/&amp;lt;folder&amp;gt;/restart&lt;br /&gt;
Stores the model states (i.e. high resolution tesselated model states or&lt;br /&gt;
intermediate model states) to be used in the case of a restart-able chain.&lt;br /&gt;
&lt;br /&gt;
The second is the &amp;lt;run-shell-execute-directory&amp;gt; where the shell SBATCH&lt;br /&gt;
scripts for staging the code on the cluster Here are the �les in this directory:&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/tomo sbatch.sh:&lt;br /&gt;
Script runs tomo mpi for all 22 phase velocity maps. You can tweak this&lt;br /&gt;
script to run single maps, specify initial number of partitions, or to de-&lt;br /&gt;
termine if you want to restart chains from set stages or particular imput&lt;br /&gt;
models. This is actually a wrapper script to tomo single.sh that does&lt;br /&gt;
all the heavy lifting.&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/tomo single.sh:&lt;br /&gt;
Script used by tomo sbatch.sh above for running the tomo mpi on single&lt;br /&gt;
phase velocity maps, it also sets up all the required environment variables,&lt;br /&gt;
determines how many chains to run and sets up the required &lt;br /&gt;
ags.&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/tomoParamMPI.nml:&lt;br /&gt;
Parameter �le used by tomo single.sh for setting up all the required in-&lt;br /&gt;
put parameters used by tomo mpi. It sets up parameters like �le paths,&lt;br /&gt;
number of steps, distribution range, perturbation parameters, seed values&lt;br /&gt;
for probability distribution, state of starting models etc. Note that we&lt;br /&gt;
provide another parameter �le:&lt;br /&gt;
&amp;lt;run-shell-execute-directory&amp;gt;/rstrtTomoParamMPI.nml for setting&lt;br /&gt;
up parameters if the chain is to be restart from a speci�ed initial model&lt;br /&gt;
state (typically a high resolution near-mean state).&lt;br /&gt;
&lt;br /&gt;
* &amp;lt;run-shell-execute-directory&amp;gt;/dwnldRslts.sh:&lt;br /&gt;
Script used to download results data from the remote deepthought2 clus-&lt;br /&gt;
ter machine to the &amp;lt;outputData-prjDir&amp;gt; on the local machine for post-&lt;br /&gt;
processing and visualization.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=28</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=28"/>
		<updated>2017-08-28T23:05:07Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;br /&gt;
&lt;br /&gt;
= Directory Listing =&lt;br /&gt;
Here is a listing of the important directories that need to be set up on the&lt;br /&gt;
cluster to organize and set things up.&lt;br /&gt;
&lt;br /&gt;
&amp;lt;source&amp;gt;&lt;br /&gt;
1 &amp;lt;Home􀀀directory&amp;gt;&lt;br /&gt;
2 /homes/username(olugboji)&lt;br /&gt;
3 &amp;lt;Code􀀀data􀀀directory&amp;gt;&lt;br /&gt;
4 /lustre/username(olugboji)/transdimsurfacewavetomography/&lt;br /&gt;
5 &amp;lt;Code􀀀binary􀀀directory&amp;gt;&lt;br /&gt;
6 /home/deepthought2/username(olugboji)/bin/&lt;br /&gt;
7 &amp;lt;Run􀀀shell􀀀execute􀀀directory&amp;gt;&lt;br /&gt;
8 /homes/username(olugboji)/binShell&lt;br /&gt;
9 &amp;lt;Input/Output􀀀Data/Exhaust􀀀directory&amp;gt;&lt;br /&gt;
10 /lustre/username(olugboji)/tomoParamFiles/&lt;br /&gt;
11 &amp;lt;rjMcMC􀀀library􀀀directory&amp;gt;&lt;br /&gt;
12 /home/deepthought2/olugboji&lt;br /&gt;
13&lt;br /&gt;
14 % Data that need to be backed up from the local store to the ...&lt;br /&gt;
cluster directory ..&lt;br /&gt;
15&lt;br /&gt;
16 &amp;lt;local􀀀prjDir&amp;gt;&lt;br /&gt;
17 :/Documents/UMD Seismo/&lt;br /&gt;
18 &amp;lt;local􀀀code􀀀store&amp;gt;&lt;br /&gt;
19 &amp;lt;local􀀀prjDir&amp;gt;iEarthSoftware/transdimsurfacewavetomography&lt;br /&gt;
20 &amp;lt;local􀀀data􀀀store&amp;gt;&lt;br /&gt;
21 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/&lt;br /&gt;
22 &amp;lt;local􀀀restrt􀀀models&amp;gt;&lt;br /&gt;
23 &amp;lt;local􀀀prjDir&amp;gt;transdimUSANT/All Ta Sta/VorModels/inModels&lt;br /&gt;
24&lt;br /&gt;
25 %.. Data from cluster exhaust to local directory&lt;br /&gt;
26 0.11&lt;br /&gt;
27 0.22&lt;br /&gt;
&amp;lt;/source&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Login into deepthought2 =&lt;br /&gt;
&amp;lt;code&amp;gt; ssh -X username@login.deepthought2.umd.edu &amp;lt;/code&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Updating and compiling source code =&lt;br /&gt;
The followng are the sequence of steps necessary to compile the and install the&lt;br /&gt;
required libraries and other source code �les:&lt;br /&gt;
2&lt;br /&gt;
• Update the &amp;lt;code-data-directory&amp;gt; with the latest version of the source&lt;br /&gt;
code (available on &amp;lt;local-prjDir&amp;gt; or @ &amp;lt;gitHub directory&amp;gt; (see direc-&lt;br /&gt;
tory listing in 2 above)&lt;br /&gt;
• Compile and install the RJMCMC library (&amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/)&lt;br /&gt;
also see README �le. On the cluster this involves the following steps:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;code-data-directory&amp;gt;/RJMCMC 1.0.11/&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure --prefix=&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; make install&lt;br /&gt;
This is the only way to install the RJMCMC library on the cluster. Attempt-&lt;br /&gt;
ing to do a sudo make install will fail since the user does not have root&lt;br /&gt;
access on the cluster.&lt;br /&gt;
• On successfull install of the RJMCMC library, the user can then go ahead to&lt;br /&gt;
compile and install the tomo mpi and tomo code into the &amp;lt;code-binary-directory&amp;gt;.&lt;br /&gt;
It is from this directory that the SBATCH shell scripts in &amp;lt;run-shell-execute-directory&amp;gt;&lt;br /&gt;
load the binary executables. Here are the steps to do this:&lt;br /&gt;
&amp;gt; cd path to &amp;lt;Code-data-directory&amp;gt;/tomo-0.9.16 2&lt;br /&gt;
&amp;gt; setenv PKG CONFIG PATH /home/deepthought2/olugboji/lib/pkg-config&lt;br /&gt;
&amp;gt; module load openmpi&lt;br /&gt;
&amp;gt; ./configure -RJMCMC FLAGS=-I&amp;lt;rjMcMC-library-directory&amp;gt;&lt;br /&gt;
-I&amp;lt;$MPI INC&amp;gt; - RJMCMC LIBS=-L&amp;lt;$MPI LIB&amp;gt; -lm -lmpi -lrjmcmc&lt;br /&gt;
&amp;gt; make&lt;br /&gt;
&amp;gt; cp tomo* &amp;lt;code-binary-directory&amp;gt;&lt;br /&gt;
*Note: if the configure command fails, then just run the command with&lt;br /&gt;
empty values for the parameter &lt;br /&gt;
ags RJMCMC FLAGS and RJMCMC LIBS, and&lt;br /&gt;
then go into the makefile and update the relevant &lt;br /&gt;
ags with the speci�ed&lt;br /&gt;
include and load &lt;br /&gt;
ags. Also note that the two MPI environment variables:&lt;br /&gt;
$MPI INC and $MPI LIB are only set after the module load mpi command&lt;br /&gt;
has been used. These two environment variables are absolutely crucial for&lt;br /&gt;
compiling the mpi version of the code i.e. tomo mpi.&lt;br /&gt;
&lt;br /&gt;
= Running tomo mpi with parameter/data �files =&lt;br /&gt;
Now that the libraries and executable (binaries) environment is set up, the next stage is setting up the input parameters and the data environment necessary to stage the code on the cluster. There are two directories here: First is the&lt;br /&gt;
Input/Output-Data/Exhaust-directory and the second is the&lt;br /&gt;
&lt;br /&gt;
Tolulope Olugboji (oluboji@umd.edu)&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=27</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=27"/>
		<updated>2017-08-28T23:01:11Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; on the deepthought2 cluster at the University of Maryland.  This version of &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt; is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy &amp;lt;code&amp;gt;transtomo&amp;lt;/code&amp;gt;. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=26</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=26"/>
		<updated>2017-08-28T22:59:40Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of transtomo on the deepthought2 cluster at the University of Maryland.  This version of transtomo is a personal adaptation and improvement of the freely distributed copy on [http://www.iearth.org.au/ iEarth geophysics scientific software]. This version includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ASCII files&lt;br /&gt;
* Functionality to resample and save full chain history in ASCII files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy transtomoAni. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=25</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=25"/>
		<updated>2017-08-28T22:57:43Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: &lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
= Overview =&lt;br /&gt;
This documentation outlines steps for compiling and running the extended version of transtomo on the deepthought2 cluster at the University of Maryland. &lt;br /&gt;
&lt;br /&gt;
This version of transtomo is a personal adaptation and improvement of the freely distributed copy on iEarth geophysics scientific software. This version&lt;br /&gt;
includes the following improvements:&lt;br /&gt;
&lt;br /&gt;
* Functionality to load, initialize, and restart chains from models stored in ascii files&lt;br /&gt;
* Functionality to resample and save full chain history in ascii files&lt;br /&gt;
* Functionality to lock cells that do not participate in the update of travel time data&lt;br /&gt;
&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy transtomoAni. This documentation will provide details on this update when it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of Maryland.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=24</id>
		<title>Transtomo</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Transtomo&amp;diff=24"/>
		<updated>2017-08-28T22:54:49Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: Created page with &amp;quot;Compile and Run Transtomo on Deepthought2 Tolulope Olugboji, olugboji@umd.edu March 31, 2016 1. Overview This documentation outlines steps for compiling and running the extend...&amp;quot;&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;Compile and Run Transtomo on Deepthought2&lt;br /&gt;
Tolulope Olugboji, olugboji@umd.edu&lt;br /&gt;
March 31, 2016&lt;br /&gt;
1. Overview&lt;br /&gt;
This documentation outlines steps for compiling and running the extended ver-&lt;br /&gt;
sion of transtomo on the deepthought2 cluster at the University of Maryland.&lt;br /&gt;
This version of transtomo is a personal adaptation and improvement of the&lt;br /&gt;
freely distributed copy on iEarth geophysics scienti�c software1. This version&lt;br /&gt;
includes the following improvements:&lt;br /&gt;
• Functionality to load, initialize, and restart chains from models stored in&lt;br /&gt;
ascii �les&lt;br /&gt;
• Functionality to resample and save full chain history in ascii �les&lt;br /&gt;
• Functionality to lock cells that do not participate in the update of travel&lt;br /&gt;
time data&lt;br /&gt;
Work is also ongoing to extend the code to invert for azimuthal anisotropy&lt;br /&gt;
transtomoAni. This documentation will provide details on this update when&lt;br /&gt;
it&#039;s available. Feel free to contact me for any other questions on how to use&lt;br /&gt;
this code and set it up on the deepthought2 cluster here at the University of&lt;br /&gt;
Maryland.&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
	<entry>
		<id>https://www.geol.umd.edu/wiki/index.php?title=Main_Page&amp;diff=23</id>
		<title>Main Page</title>
		<link rel="alternate" type="text/html" href="https://www.geol.umd.edu/wiki/index.php?title=Main_Page&amp;diff=23"/>
		<updated>2017-08-28T22:53:24Z</updated>

		<summary type="html">&lt;p&gt;Tolumorayo: /* Popular Pages */&lt;/p&gt;
&lt;hr /&gt;
&lt;div&gt;&lt;br /&gt;
&amp;lt;strong&amp;gt;Welcome to GeoWiki - The Department of Geology Wiki&amp;lt;/strong&amp;gt;&lt;br /&gt;
&lt;br /&gt;
&lt;br /&gt;
This is a repository for all tidbits of knowledge that should be passed on among members of the department.&lt;br /&gt;
&lt;br /&gt;
The success of this wiki depends on &#039;&#039;&#039;YOU&#039;&#039;&#039;. To contribute, you need to request permissions to edit and create new content using your normal UMD account. If you see anything that is wrong, or if you can think of &#039;&#039;&#039;anything&#039;&#039;&#039; that you think would be useful to the other people in our department, please don&#039;t hesitate to add what you know. Being a wiki, everything is archived, so don&#039;t worry about messing anything up, I promise you that you can&#039;t do any damage.&lt;br /&gt;
&lt;br /&gt;
==Popular Pages==&lt;br /&gt;
* [[Deepthought2]]&lt;br /&gt;
* [[Transtomo]]&lt;/div&gt;</summary>
		<author><name>Tolumorayo</name></author>
	</entry>
</feed>