Commit 4fb6297c authored by Alex Breuer's avatar Alex Breuer

Added LOH.3 solutions.

parent d623d29f
.. image:: http://i.creativecommons.org/p/zero/1.0/88x31.png
:alt: CC0
:target: http://creativecommons.org/publicdomain/zero/1.0/
To the extent possible under law, `Alexander Nikolas Breuer <https://dial3343.org/>`_ has waived all copyright and related or neighboring rights to the following work:
* `loh3_plots_o4_v3.pdf`
* `loh3_plots_o4_v5.pdf`
* `loh3_plots_o5_v3.pdf`
* `o4_v3.tar.xz`
* `o4_v5.tar.xz`
* `o5_v3.tar.xz`
This work is published from: Germany.
Runs of the LOH.3 Benchmark
===========================
* Instance type: Google Cloud Platform c2-standard-16 (Cascade Lake, 8 cores, 64 GB memory)
* OS Image: centos-7-v20190619
* EDGE version: 4cb09fa
* Contact: Alex Breuer
Builds
------
.. code-block:: bash
sudo yum install tmux
tmux
bash <(curl -s https://raw.githubusercontent.com/3343/edge/develop/tools/build/install_tools.sh)
source /etc/bashrc
bash <(curl -s https://raw.githubusercontent.com/3343/edge/develop/tools/build/install_libs.sh)
source /etc/bashrc
git clone https://github.com/3343/edge.git
cd edge
git checkout develop
git submodule init
git submodule update
CXX=mpiCC scons order=4 cfr=1 xsmm=yes zlib=yes hdf5=yes moab=yes arch=skx equations=viscoelastic3 -j16
mv build/edge edge_o4_v3
CXX=mpiCC scons order=4 cfr=1 xsmm=yes zlib=yes hdf5=yes moab=yes arch=skx equations=viscoelastic5 -j16
mv build/edge edge_o4_v5
CXX=mpiCC scons order=5 cfr=1 xsmm=yes zlib=yes hdf5=yes moab=yes arch=skx equations=viscoelastic3 -j16
mv build/edge edge_o5_v3
Runs
----
.. code-block:: bash
bash runs.sh
Visualization
-------------
.. code-block:: bash
wget http://www.sismowine.org/WP2_LOH3/ref.zip
unzip ref.zip
python vis.py
Reformat
--------
Reformats the receivers for http://sismowine.org/:
.. code-block:: bash
cd sismowine
bash extract.sh 2>&1 | tee extract.sh.log
#!/bin/bash
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2019, Alexander Breuer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Runs the LOH.3 configs.
##
for conf in o4_v3 o4_v5 o5_v3
do
echo "running ${conf}"
cd ${conf}
OMP_DISPLAY_ENV=TRUE OMP_NUM_THREADS=8 GOMP_CPU_AFFINITY=0-7 OMP_SCHEDULE=static ./edge_${conf} -x configs/tet4_200.xml 2>&1 | tee 19_07_18_edge_${conf}.log
cd ..
done
#!/usr/bin/python3
##
# @file This file is part of EDGE.
#
# @author Alexander Breuer (anbreuer AT ucsd.edu)
#
# @section LICENSE
# Copyright (c) 2019, Alexander Breuer
# All rights reserved.
#
# Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution.
#
# 3. Neither the name of the copyright holder nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
#
# @section DESCRIPTION
# Compares the LOH.3 solutions to the SISMOWINE reference (Axitra).
##
import pandas
import numpy as np
import matplotlib.pyplot as plt
from obspy.signal.tf_misfit import plot_tf_misfits, plot_tfr
import matplotlib.backends.backend_pdf
for l_config in ['o4_v3', 'o4_v5', 'o5_v3']:
print( 'config: ' + l_config )
l_pdf = matplotlib.backends.backend_pdf.PdfPages( 'loh3_plots_' + l_config + '.pdf' )
for l_st in range(9):
for l_qt in range(3):
l_dirs = ['x', 'y', 'z']
l_ref = pandas.read_csv( l_dirs[l_qt]+'.dat',
header=None,
skiprows=1 )
print( ' plotting station ' + str(l_st+1) + ' ' + l_dirs[l_qt] )
l_path = l_config + '/loh3_uns_200/0/loh3_'+str(l_st+1)+'.csv'
l_edge = pandas.read_csv( l_path,
skiprows=6 )
l_signalRef = np.array(l_ref[0][l_st*450:(l_st+1)*450])
l_signalEdge = np.array(l_edge['Q'+str(6+l_qt)+'_C0'])
l_ax = plt.subplot( 111, label=str(l_st), title='LOH.3, station #'+str(l_st+1) + ', ' + l_dirs[l_qt] + ' particle velocity' )
l_ax.plot( np.arange(0, 9, 0.02), l_signalRef, label='reference', color='black' )
l_ax.plot( np.array(l_edge['time']), l_signalEdge, label='EDGE', color='red' )
l_ax.legend()
l_pdf.savefig()
plt.close()
plot_tfr( l_signalEdge, 0.005, fmin=0.1, fmax=10, show=False )
l_pdf.savefig()
plt.close()
if( max(l_signalRef) > 1E-2 ):
plot_tf_misfits( l_signalRef, l_signalEdge[::4], dt=0.02, fmin=0.1, fmax=20, show=False )
l_pdf.savefig()
plt.close()
l_pdf.close()
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment