Commit 197009ef authored by Alex Breuer's avatar Alex Breuer

Added HSP2a solution.

parent 4fb6297c
.. 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:
* `hsp2a_plots_o4_v2.pdf`
* `hsp2a_plots_o4_v3.pdf`
* `hsp2a_plots_o4_v4.pdf`
* `hsp2a_plots_o4_v5.pdf`
* `hsp2a_plots_o5_v2.pdf`
* `hsp2a_plots_o5_v3.pdf`
* `hsp2a_plots_o5_v4.pdf`
* `hsp2a_plots_o5_v5.pdf`
* `o4_v2.tar.xz`
* `o4_v3.tar.xz`
* `o4_v4.tar.xz`
* `o4_v5.tar.xz`
* `o5_v2.tar.xz`
* `o5_v3.tar.xz`
* `o5_v4.tar.xz`
* `o5_v5.tar.xz`
This work is published from: Germany.
Runs of the HSP2a benchmark
===========================
* Instance type: Google Cloud Platform c2-standard-16 (Cascade Lake, 8 cores, 64 GB memory)
* OS Image: centos-7-v20190619
* EDGE version: 02d338652eb8bceaac6dba90dfb1c65916360e96
* 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
# runs provided build script (see runs directory)
bash build.sh
Runs
----
.. code-block:: bash
bash run_v2.sh
bash run_v3.sh
bash run_v4.sh
bash run_v5.sh
Visualization
-------------
.. code-block:: bash
wget http://www.sismowine.org/WP1_HSP2a/ref.zip
unzip ref.zip
python vis.py
#!/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
# Builds EDGE with different order and number of viscoelastic mechanisms.
##
for order in 4 5
do
for mechs in 2 3 4 5
do
echo "Building ${order}_${mechs}"
CXX=mpiCC scons order=${order} cfr=1 xsmm=yes zlib=yes hdf5=yes moab=yes arch=skx equations=viscoelastic${mechs} -j16
mv build/edge edge_o${order}_v${mechs}
done
done
#!/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 H2P2a settings with two mechanisms.
##
for conf in o4_v2 o5_v2
do
echo "running ${conf}"
mkdir ${conf}
cd ${conf}
ln -s ~/edge/edge_${conf} .
ln -s ../../meshes .
ln -s ../../configs .
ln -s ../../sources .
OMP_DISPLAY_ENV=TRUE OMP_NUM_THREADS=8 GOMP_CPU_AFFINITY=0-7 OMP_SCHEDULE=static ./edge_${conf} -x configs/tet4_300.xml 2>&1 | tee 19_07_20_edge_${conf}.log
cd ..
done
#!/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 H2P2a settings with three mechanisms.
##
for conf in o4_v3 o5_v3
do
echo "running ${conf}"
mkdir ${conf}
cd ${conf}
ln -s ~/edge/edge_${conf} .
ln -s ../../meshes .
ln -s ../../configs .
ln -s ../../sources .
OMP_DISPLAY_ENV=TRUE OMP_NUM_THREADS=8 GOMP_CPU_AFFINITY=0-7 OMP_SCHEDULE=static ./edge_${conf} -x configs/tet4_300.xml 2>&1 | tee 19_07_20_edge_${conf}.log
cd ..
done
#!/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 H2P2a settings with four mechanisms.
##
for conf in o4_v4 o5_v4
do
echo "running ${conf}"
mkdir ${conf}
cd ${conf}
ln -s ~/edge/edge_${conf} .
ln -s ../../meshes .
ln -s ../../configs .
ln -s ../../sources .
OMP_DISPLAY_ENV=TRUE OMP_NUM_THREADS=8 GOMP_CPU_AFFINITY=0-7 OMP_SCHEDULE=static ./edge_${conf} -x configs/tet4_300.xml 2>&1 | tee 19_07_20_edge_${conf}.log
cd ..
done
#!/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 H2P2a settings with five mechanisms.
##
for conf in o4_v5 o5_v5
do
echo "running ${conf}"
mkdir ${conf}
cd ${conf}
ln -s ~/edge/edge_${conf} .
ln -s ../../meshes .
ln -s ../../configs .
ln -s ../../sources .
OMP_DISPLAY_ENV=TRUE OMP_NUM_THREADS=8 GOMP_CPU_AFFINITY=0-7 OMP_SCHEDULE=static ./edge_${conf} -x configs/tet4_300.xml 2>&1 | tee 19_07_20_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 HSP2a 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_v2', 'o4_v3', 'o4_v4', 'o4_v5', 'o5_v2', 'o5_v3', 'o5_v4', 'o5_v5']:
print( 'config: ' + l_config )
l_pdf = matplotlib.backends.backend_pdf.PdfPages( 'hsp2a_plots_' + l_config + '.pdf' )
for l_st in range(12):
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 + '/hsp2a_uns_300/0/hsp2a_'+str(l_st+1)+'.csv'
l_edge = pandas.read_csv( l_path,
skiprows=6 )
l_signalRef = np.array(l_ref[0][l_st*250:(l_st+1)*250])
l_signalEdge = np.array(l_edge['Q'+str(6+l_qt)+'_C0'])
l_ax = plt.subplot( 111, label=str(l_st), title='HSP2a, station #'+str(l_st+1) + ', ' + l_dirs[l_qt] + ' particle velocity' )
l_ax.plot( np.arange(0, 5, 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