Commit 39ec32db authored by sfritschi's avatar sfritschi
Browse files

Updated scripts

parent e89b3562
......@@ -7,8 +7,8 @@ from netflow import *
from time import perf_counter
def main():
if len(sys.argv) != 4:
raise AssertionError("Usage: python3 perf.py <n1> <n2> <n3>")
if len(sys.argv) != 6:
raise AssertionError("Usage: python3 perf.py <2^min threads> <2^max threads> <n1> <n2> <n3>")
basenet = netflow.load_network_from('../netflow/network/network.h5')
print("Network statistics:")
......@@ -18,13 +18,13 @@ def main():
print("Min. number of throats per pore: %d" % min(pore_throat_counts))
print("Avg. number of throats per pore: %f" % (sum(pore_throat_counts) / len(pore_throat_counts)))
target = [int(sys.argv[1]), int(sys.argv[2]), int(sys.argv[3])]
target = [int(sys.argv[3]), int(sys.argv[4]), int(sys.argv[5])]
print("Target size: {}".format(target))
cutoff = 0.5 * max([basenet.ub[i] - basenet.lb[i] \
for i in range(len(basenet.ub))])
i = 0
max_ = 5
i = int(sys.argv[1])
max_ = int(sys.argv[2])
speedups = []
threads = []
......@@ -39,6 +39,7 @@ def main():
end = perf_counter()
elapsed = end - start
print("Elapsed: %e" % elapsed)
print("Generated network statistics:")
print("Throats: %d" % len(dendro.throats))
print("Pores: %d" % len(dendro.pores))
......
#!/bin/bash
bsub -n 48 -W 00:30 -R fullnode python3 perf.py 4 4 4
# Targets Xeon Gold 6150 nodes with 36 cores/node
bsub -n 36 -W 01:00 -R fullnode python3 perf.py 0 5 3 3 3
gen/plots/strong_scaling.png

21.2 KB | W: | H:

gen/plots/strong_scaling.png

21.2 KB | W: | H:

gen/plots/strong_scaling.png
gen/plots/strong_scaling.png
gen/plots/strong_scaling.png
gen/plots/strong_scaling.png
  • 2-up
  • Swipe
  • Onion skin
......@@ -805,11 +805,11 @@ def generate_dendrogram(basenet: Network, targetsize: List[int], \
serialThresh = nthreads * 4
# Pores in interior that are not fully-connected yet
poresRemain = pores[:n]
while (throatsLeft != 0):
while (throatsUnrealized > 0):
if (not mute):
print("Throats left: %d Throats Unrealized: %d (%.2f%%)" % \
(throatsLeft, throatsUnrealized, throatsUnrealized / totalThroats * 100.))
(throatsLeft, throatsUnrealized, throatsLeft / totalThroats * 100.))
nRemain = len(poresRemain)
if (nRemain > serialThresh):
......@@ -938,12 +938,12 @@ def generate_dendrogram(basenet: Network, targetsize: List[int], \
cellList.connPores[pore.index].clear()
poresRemain = nextPores
throatsUnrealized = throatCount // 2 # Counted all throats twice
throatsLeft = totalThroats - len(throats)
throatsLeft = throatCount // 2 # Counted all throats twice
throatsUnrealized = totalThroats - len(throats)
# Unrealized throats
nUnrealized = throatsUnrealized
nUnrealized = throatsLeft
# Free memory (not needed anymore)
del cellList
......
......@@ -48,10 +48,11 @@
\@writefile{lof}{\defcounter {refsection}{0}\relax }\@writefile{lof}{\contentsline {figure}{\numberline {2}{\ignorespaces Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.\relax }}{5}{figure.caption.2}\protected@file@percent }
\newlabel{fig:cell}{{2}{5}{Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.\relax }{figure.caption.2}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {subsection}{\numberline {3.2}Iterative Algorithm}{5}{subsection.3.2}\protected@file@percent }
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {subsection}{\numberline {3.3}Results}{6}{subsection.3.3}\protected@file@percent }
\@writefile{loa}{\defcounter {refsection}{0}\relax }\@writefile{loa}{\contentsline {algorithm}{\numberline {1}{\ignorespaces Connect pores in parallel\relax }}{6}{algorithm.1}\protected@file@percent }
\newlabel{alg:connect}{{1}{6}{Connect pores in parallel\relax }{algorithm.1}{}}
\@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }}{7}{table.caption.3}\protected@file@percent }
\newlabel{table:iter}{{1}{7}{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.\relax }{table.caption.3}{}}
\@writefile{lot}{\defcounter {refsection}{0}\relax }\@writefile{lot}{\contentsline {table}{\numberline {1}{\ignorespaces Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 27 were not realized due to there being no possible candidates left for these remaining pores.\relax }}{7}{table.caption.3}\protected@file@percent }
\newlabel{table:iter}{{1}{7}{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 27 were not realized due to there being no possible candidates left for these remaining pores.\relax }{table.caption.3}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {A}PETSc Installation}{7}{appendix.A}\protected@file@percent }
\newlabel{appendix:install}{{A}{7}{PETSc Installation}{appendix.A}{}}
\@writefile{toc}{\defcounter {refsection}{0}\relax }\@writefile{toc}{\contentsline {section}{\numberline {B}Base Network}{7}{appendix.B}\protected@file@percent }
......@@ -61,3 +62,5 @@
\abx@aux@defaultrefcontext{0}{MEYER2021101592}{none/global//global/global}
\abx@aux@defaultrefcontext{0}{petsc-web-page}{none/global//global/global}
\abx@aux@defaultrefcontext{0}{hypre-web-page}{none/global//global/global}
\@writefile{lof}{\defcounter {refsection}{0}\relax }\@writefile{lof}{\contentsline {figure}{\numberline {3}{\ignorespaces Network consisting of 2636 pores and 4291 throats, inscribed within a cube extending $1.07\cdot 10^{-3}$m in each spatial direction. The pore-arrangement is obviously \emph {not uniform}, as can be seen by the clustering of pores in some regions, while others are mostly undisturbed. The \emph {porosity}, measured as the relative fraction of volume taken up by the void-space geometry, is roughly $32\%$.\relax }}{8}{figure.caption.4}\protected@file@percent }
\newlabel{fig:base}{{3}{8}{Network consisting of 2636 pores and 4291 throats, inscribed within a cube extending $1.07\cdot 10^{-3}$m in each spatial direction. The pore-arrangement is obviously \emph {not uniform}, as can be seen by the clustering of pores in some regions, while others are mostly undisturbed. The \emph {porosity}, measured as the relative fraction of volume taken up by the void-space geometry, is roughly $32\%$.\relax }{figure.caption.4}{}}
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.4.27) 1 DEC 2021 12:30
This is pdfTeX, Version 3.14159265-2.6-1.40.20 (TeX Live 2019/Debian) (preloaded format=pdflatex 2021.4.27) 2 DEC 2021 23:24
entering extended mode
restricted \write18 enabled.
%&-line parsing enabled.
......@@ -983,38 +983,38 @@ LaTeX Info: Redefining \nameref on input line 29.
[1
{/var/lib/texmf/fonts/map/pdftex/updmap/pdftex.map}] [2]
<plots/flux_PETSC.png, id=75, 462.528pt x 346.896pt>
<plots/flux_PETSC.png, id=79, 462.528pt x 346.896pt>
File: plots/flux_PETSC.png Graphic file (type png)
<use plots/flux_PETSC.png>
Package pdftex.def Info: plots/flux_PETSC.png used on input line 74.
(pdftex.def) Requested size: 276.00105pt x 207.01175pt.
[3] [4 <./plots/flux_PETSC.png>]
Overfull \vbox (5.3285pt too high) has occurred while \output is active []
Overfull \vbox (8.34245pt too high) has occurred while \output is active []
[5]
[3] [4 <./plots/flux_PETSC.png>] [5]
Package hyperref Info: bookmark level for unknown algorithm defaults to 0 on in
put line 231.
[6] [7] [8]
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 303.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 303.
(./thesis.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 303.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 303.
put line 224.
[6]
<plots/base.png, id=120, 462.528pt x 346.896pt>
File: plots/base.png Graphic file (type png)
<use plots/base.png>
Package pdftex.def Info: plots/base.png used on input line 297.
(pdftex.def) Requested size: 276.00105pt x 207.01175pt.
[7] [8 <./plots/base.png>]
Package atveryend Info: Empty hook `BeforeClearDocument' on input line 306.
Package atveryend Info: Empty hook `AfterLastShipout' on input line 306.
(./thesis.aux)
Package atveryend Info: Executing hook `AtVeryEndDocument' on input line 306.
Package atveryend Info: Executing hook `AtEndAfterFileList' on input line 306.
Package rerunfilecheck Info: File `thesis.out' has not changed.
(rerunfilecheck) Checksum: 1B7571DBFF6EC6A1298F38F07740F126;630.
(rerunfilecheck) Checksum: E25FA12DB519AB2249909CDF24D9E27D;687.
Package logreq Info: Writing requests to 'thesis.run.xml'.
\openout1 = `thesis.run.xml'.
)
Here is how much of TeX's memory you used:
26209 strings out of 483107
491571 string characters out of 5964630
1149035 words of memory out of 5000000
40803 multiletter control sequences out of 15000+600000
491544 string characters out of 5964630
1146485 words of memory out of 5000000
40800 multiletter control sequences out of 15000+600000
540150 words of font info for 51 fonts, out of 8000000 for 9000
59 hyphenation exceptions out of 8191
60i,8n,60p,2036b,1256s stack positions out of 5000i,500n,10000p,200000b,80000s
......@@ -1032,10 +1032,10 @@ s/cm/cmsl10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/c
msy10.pfb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmsy7.p
fb></usr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmti10.pfb></u
sr/share/texlive/texmf-dist/fonts/type1/public/amsfonts/cm/cmtt10.pfb>
Output written on thesis.pdf (8 pages, 225772 bytes).
Output written on thesis.pdf (8 pages, 335697 bytes).
PDF statistics:
197 PDF objects out of 1000 (max. 8388607)
168 compressed objects within 2 object streams
30 named destinations out of 1000 (max. 500000)
106 words of extra memory for PDF output out of 10000 (max. 10000000)
206 PDF objects out of 1000 (max. 8388607)
175 compressed objects within 2 object streams
32 named destinations out of 1000 (max. 500000)
119 words of extra memory for PDF output out of 10000 (max. 10000000)
......@@ -7,5 +7,6 @@
\BOOKMARK [1][-]{section.3}{Parallel Network Generation}{}% 7
\BOOKMARK [2][-]{subsection.3.1}{Cell Lists}{section.3}% 8
\BOOKMARK [2][-]{subsection.3.2}{Iterative Algorithm}{section.3}% 9
\BOOKMARK [1][-]{appendix.A}{PETSc Installation}{}% 10
\BOOKMARK [1][-]{appendix.B}{Base Network}{}% 11
\BOOKMARK [2][-]{subsection.3.3}{Results}{section.3}% 10
\BOOKMARK [1][-]{appendix.A}{PETSc Installation}{}% 11
\BOOKMARK [1][-]{appendix.B}{Base Network}{}% 12
No preview for this file type
No preview for this file type
......@@ -111,108 +111,99 @@
\node[anchor=east, black] at (-3, 2.5) {$5$};
% Points
\node[red] at (-0.5, 0.5) {\textbullet};
\node[black] at (0.79, 1.48) {\textbullet};
\node[black] at (0.79, -2.52) {\textbullet};
\node[black] at (0.30, -0.55) {\textbullet};
\node[black] at (-1.02, 0.86) {\textbullet};
\node[black] at (2.98, 0.86) {\textbullet};
\node[black] at (-1.73, 1.53) {\textbullet};
\node[black] at (2.27, 1.53) {\textbullet};
\node[black] at (-1.73, -2.47) {\textbullet};
\node[black] at (0.44, 1.26) {\textbullet};
\node[black] at (0.44, -2.74) {\textbullet};
\node[black] at (-0.64, 0.77) {\textbullet};
\node[black] at (0.72, -0.05) {\textbullet};
\node[black] at (-0.16, 1.25) {\textbullet};
\node[black] at (-0.16, -2.75) {\textbullet};
\node[black] at (-1.92, -0.76) {\textbullet};
\node[black] at (2.08, -0.76) {\textbullet};
\node[black] at (-1.95, 1.75) {\textbullet};
\node[black] at (2.05, 1.75) {\textbullet};
\node[black] at (-1.95, -2.25) {\textbullet};
\node[black] at (-0.90, -0.11) {\textbullet};
\node[black] at (-1.20, 1.88) {\textbullet};
\node[black] at (2.80, 1.88) {\textbullet};
\node[black] at (-1.20, -2.12) {\textbullet};
\node[black] at (-0.90, 0.70) {\textbullet};
\node[black] at (-1.65, 0.10) {\textbullet};
\node[black] at (2.35, 0.10) {\textbullet};
\node[black] at (1.49, 0.63) {\textbullet};
\node[black] at (-2.51, 0.63) {\textbullet};
\node[black] at (0.31, -0.98) {\textbullet};
\node[black] at (-0.24, 0.58) {\textbullet};
\node[black] at (-1.73, 1.63) {\textbullet};
\node[black] at (2.27, 1.63) {\textbullet};
\node[black] at (-1.73, -2.37) {\textbullet};
\node[black] at (1.25, 1.28) {\textbullet};
\node[black] at (-2.75, 1.28) {\textbullet};
\node[black] at (1.25, -2.72) {\textbullet};
\node[black] at (1.67, 1.06) {\textbullet};
\node[black] at (-2.33, 1.06) {\textbullet};
\node[black] at (1.67, -2.94) {\textbullet};
\node[black] at (1.32, -0.71) {\textbullet};
\node[black] at (-2.68, -0.71) {\textbullet};
\node[black] at (1.94, 1.21) {\textbullet};
\node[black] at (-2.06, 1.21) {\textbullet};
\node[black] at (1.94, -2.79) {\textbullet};
\node[black] at (0.15, 0.63) {\textbullet};
\node[black] at (-0.22, 1.79) {\textbullet};
\node[black] at (-0.22, -2.21) {\textbullet};
\node[black] at (1.76, 1.90) {\textbullet};
\node[black] at (-2.24, 1.90) {\textbullet};
\node[black] at (1.76, -2.10) {\textbullet};
\node[black] at (0.70, -1.21) {\textbullet};
\node[black] at (0.70, 2.79) {\textbullet};
\node[black] at (-1.78, 1.07) {\textbullet};
\node[black] at (2.22, 1.07) {\textbullet};
\node[black] at (-1.78, -2.93) {\textbullet};
\node[black] at (-1.67, 1.98) {\textbullet};
\node[black] at (2.33, 1.98) {\textbullet};
\node[black] at (-1.67, -2.02) {\textbullet};
\node[black] at (-1.84, 0.88) {\textbullet};
\node[black] at (2.16, 0.88) {\textbullet};
\node[black] at (1.33, 0.09) {\textbullet};
\node[black] at (-2.67, 0.09) {\textbullet};
\node[black] at (-0.28, -0.39) {\textbullet};
\node[black] at (-0.11, 1.31) {\textbullet};
\node[black] at (-0.11, -2.69) {\textbullet};
\node[black] at (1.62, -1.47) {\textbullet};
\node[black] at (-2.38, -1.47) {\textbullet};
\node[black] at (1.62, 2.53) {\textbullet};
\node[black] at (-0.44, 1.14) {\textbullet};
\node[black] at (-0.44, -2.86) {\textbullet};
\node[black] at (-1.50, 1.32) {\textbullet};
\node[black] at (2.50, 1.32) {\textbullet};
\node[black] at (-1.50, -2.68) {\textbullet};
\node[black] at (0.83, -1.10) {\textbullet};
\node[black] at (0.83, 2.90) {\textbullet};
\node[black] at (-1.63, -0.59) {\textbullet};
\node[black] at (2.37, -0.59) {\textbullet};
\node[black] at (-0.36, -1.09) {\textbullet};
\node[black] at (-0.36, 2.91) {\textbullet};
\node[black] at (-1.07, 1.10) {\textbullet};
\node[black] at (2.93, 1.10) {\textbullet};
\node[black] at (-1.07, -2.90) {\textbullet};
\node[black] at (0.62, -0.39) {\textbullet};
\node[black] at (1.34, -0.01) {\textbullet};
\node[black] at (-2.66, -0.01) {\textbullet};
\node[black] at (0.62, -1.62) {\textbullet};
\node[black] at (0.62, 2.38) {\textbullet};
\node[black] at (0.71, -1.45) {\textbullet};
\node[black] at (0.71, 2.55) {\textbullet};
\node[black] at (-1.70, 0.74) {\textbullet};
\node[black] at (2.30, 0.74) {\textbullet};
\node[black] at (0.78, 1.77) {\textbullet};
\node[black] at (0.78, -2.23) {\textbullet};
\node[black] at (-0.89, -1.07) {\textbullet};
\node[black] at (-0.89, 2.93) {\textbullet};
\node[black] at (-1.91, -0.38) {\textbullet};
\node[black] at (2.09, -0.38) {\textbullet};
\node[black] at (-1.74, 1.62) {\textbullet};
\node[black] at (2.26, 1.62) {\textbullet};
\node[black] at (-1.74, -2.38) {\textbullet};
\node[black] at (0.59, -1.09) {\textbullet};
\node[black] at (0.59, 2.91) {\textbullet};
\node[black] at (-1.04, 1.78) {\textbullet};
\node[black] at (2.96, 1.78) {\textbullet};
\node[black] at (-1.04, -2.22) {\textbullet};
\node[black] at (2.96, -2.22) {\textbullet};
\node[black] at (-0.10, 0.20) {\textbullet};
\node[black] at (-0.13, -0.03) {\textbullet};
\node[black] at (0.44, 0.23) {\textbullet};
\node[black] at (-0.02, 1.70) {\textbullet};
\node[black] at (-0.02, -2.30) {\textbullet};
\node[black] at (-1.33, 1.17) {\textbullet};
\node[black] at (2.67, 1.17) {\textbullet};
\node[black] at (-1.33, -2.83) {\textbullet};
\node[black] at (2.67, -2.83) {\textbullet};
\node[black] at (0.63, -0.33) {\textbullet};
\node[black] at (-1.05, 1.71) {\textbullet};
\node[black] at (2.95, 1.71) {\textbullet};
\node[black] at (-1.05, -2.29) {\textbullet};
\node[black] at (2.95, -2.29) {\textbullet};
\node[black] at (-1.33, 0.53) {\textbullet};
\node[black] at (2.67, 0.53) {\textbullet};
\node[black] at (-0.86, 0.14) {\textbullet};
\node[black] at (-1.43, -0.91) {\textbullet};
\node[black] at (2.57, -0.91) {\textbullet};
\node[black] at (0.20, 1.58) {\textbullet};
\node[black] at (0.20, -2.42) {\textbullet};
\node[black] at (1.08, 1.53) {\textbullet};
\node[black] at (-2.92, 1.53) {\textbullet};
\node[black] at (1.08, -2.47) {\textbullet};
\node[black] at (-2.92, -2.47) {\textbullet};
\node[black] at (-0.83, -1.07) {\textbullet};
\node[black] at (-0.83, 2.93) {\textbullet};
\node[black] at (1.51, -0.19) {\textbullet};
\node[black] at (-2.49, -0.19) {\textbullet};
\node[black] at (1.25, 0.25) {\textbullet};
\node[black] at (-2.75, 0.25) {\textbullet};
\node[black] at (0.24, -1.89) {\textbullet};
\node[black] at (0.24, 2.11) {\textbullet};
\node[black] at (1.64, -1.59) {\textbullet};
\node[black] at (-2.36, -1.59) {\textbullet};
\node[black] at (1.64, 2.41) {\textbullet};
\node[black] at (-2.36, 2.41) {\textbullet};
\node[black] at (0.81, -0.14) {\textbullet};
\node[black] at (0.99, 1.11) {\textbullet};
\node[black] at (0.99, -2.89) {\textbullet};
\node[black] at (1.56, 0.19) {\textbullet};
\node[black] at (-2.44, 0.19) {\textbullet};
\node[black] at (0.00, 0.29) {\textbullet};
\node[black] at (-0.59, 1.98) {\textbullet};
\node[black] at (-0.59, -2.02) {\textbullet};
\node[black] at (0.69, 0.22) {\textbullet};
\node[black] at (1.72, -0.51) {\textbullet};
\node[black] at (-2.28, -0.51) {\textbullet};
\node[black] at (1.46, 0.32) {\textbullet};
\node[black] at (-2.54, 0.32) {\textbullet};
\node[black] at (-1.95, -1.76) {\textbullet};
\node[black] at (2.05, -1.76) {\textbullet};
\node[black] at (-1.95, 2.24) {\textbullet};
\node[black] at (2.05, 2.24) {\textbullet};
\node[black] at (-1.17, 0.31) {\textbullet};
\node[black] at (2.83, 0.31) {\textbullet};
\node[black] at (0.55, -0.60) {\textbullet};
\node[black] at (0.38, -1.83) {\textbullet};
\node[black] at (0.38, 2.17) {\textbullet};
\node[black] at (-0.87, 1.61) {\textbullet};
\node[black] at (-0.87, -2.39) {\textbullet};
\node[black] at (-0.72, -1.95) {\textbullet};
\node[black] at (-0.72, 2.05) {\textbullet};
\node[black] at (0.23, -0.43) {\textbullet};
\node[black] at (-1.72, 1.11) {\textbullet};
\node[black] at (2.28, 1.11) {\textbullet};
\node[black] at (-1.72, -2.89) {\textbullet};
\node[black] at (2.28, -2.89) {\textbullet};
\node[black] at (-0.03, -0.16) {\textbullet};
\node[black] at (1.77, 1.06) {\textbullet};
\node[black] at (-2.23, 1.06) {\textbullet};
\node[black] at (1.77, -2.94) {\textbullet};
\node[black] at (-2.23, -2.94) {\textbullet};
\node[black] at (-0.79, 0.18) {\textbullet};
\node[black] at (-1.34, -0.35) {\textbullet};
\node[black] at (2.66, -0.35) {\textbullet};
\node[black] at (-1.77, -1.49) {\textbullet};
\node[black] at (2.23, -1.49) {\textbullet};
\node[black] at (-1.77, 2.51) {\textbullet};
\node[black] at (2.23, 2.51) {\textbullet};
\node[black] at (-0.13, -0.43) {\textbullet};
\node[black] at (-0.28, 0.22) {\textbullet};
\node[black] at (1.69, 0.74) {\textbullet};
\node[black] at (-2.31, 0.74) {\textbullet};
\node[black] at (0.16, -0.40) {\textbullet};
\node[black] at (1.73, -1.17) {\textbullet};
\node[black] at (-2.27, -1.17) {\textbullet};
\node[black] at (1.73, 2.83) {\textbullet};
\node[black] at (-2.27, 2.83) {\textbullet};
\end{tikzpicture}
\caption{Cell lists visualized in 2D. The neighborhood of the pore highlighted in red is marked in blue. Because the cell-size is the maximally permissible throat length $L_m$, only the pores contained within the blue region must be considered during neighbor search. Finally, the periodic buffer layers, containing copies of pores on the opposite side from the interior, are painted in orange.}
\label{fig:cell}
......@@ -224,7 +215,9 @@
\begin{equation}
j^* = \argmin_{j \in \mathcal{N}(i)}\Bigr| ||\mathbf{p}_i - \mathbf{p}_j||_2 - L_t \Bigr|
\end{equation}
Where $\mathcal{N}(i)$ is the set of all pores in adjacent cells to pore $i$. Finding $j^*$ for different pores is \emph{embarrassingly parallel} and can therefore be computed by a large number of threads, storing their results in shared memory. Each thread works on an even chunk of the pores located \emph{inside} the domain. Subsequently, these ideal matches are connected, while avoiding \textbf{conflicts} of pores seeking a neighbor that is already fully-connected. Finally we repeat the two steps from above, now only considering pores that still have throats left in \emph{random} order (for improved \textbf{load balancing}), until only a specified \textbf{fraction of total feasible throats} are left e.g. $1\%$. Empirically, this process converges very fast and consistently, for different target sizes of the full domain, after merely 3-4 iterations. The first iteration alone leaves only $\approx 18\%$ of all possible throats left, see Table ~\ref{table:iter}. The procedure is summarized as pseudo-code in Algorithm ~\ref{alg:connect}.
Where $\mathcal{N}(i)$ is the set of all pores in adjacent cells to pore $i$. Finding $j^*$ for different pores is \emph{embarrassingly parallel} and can therefore be computed by a large number of threads, storing their results in shared memory. Each thread works on an even chunk of the pores located \emph{inside} the domain. Subsequently, these ideal matches are connected, while avoiding \textbf{conflicts} of pores seeking either a neighbor that is already fully-connected or that was previously connected to them. Finally we repeat the two steps from above, now only considering pores that still have throats left in \emph{random} order (for improved \textbf{load balancing}), until \textbf{no more connections} can be found. Empirically, this process converges very fast and consistently, for different target sizes of the full domain, after merely 7-8 iterations. The first iteration alone leaves only $\approx 18\%$ of all possible throats left, see Table ~\ref{table:iter}. Final iterations may be performed serially if only few pores remain as to avoid costly spawning of threads without speed gain. The procedure is summarized as pseudo-code in Algorithm ~\ref{alg:connect}.
\subsection{Results}
\hspace{0.5cm}The parallel algorithm achieves
\end{multicols}
\begin{algorithm}[ht]
......@@ -233,9 +226,8 @@
\State Initialize $cellList$ using $pores$ and compute $totalThroats$
\State $poresRemain \gets pores$
\State $throatsLeft \gets totalThroats$
\State $iterCount \gets 0$
\State $throatThreshold \gets \lfloor 0.01 * totalThroats\rfloor$ \Comment{at most 1\% of $totalThroats$}
\While{$iterCount < maxIters$ \textbf{and} $throatsLeft > throatThreshold$}
\State $throatsUnrealized \gets totalThroats$
\While{$throatsUnrealized > 0$}
\State Spawn $nthreads$ threads
\State Compute best matches for all pores in $poresRemain$ using threads
\State Store result in shared memory location $poreMatchTable$
......@@ -251,7 +243,6 @@
\State $poresRemain \gets nextPores$
\State Count throats that are still left: $nextThroats$
\State $throatsLeft \gets nextThroats$
\State $iterCount \gets iterCount + 1$
\EndWhile
\end{algorithmic}
\label{alg:connect}
......@@ -259,16 +250,19 @@
\begin{table}[ht]
\centering
\caption{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 1015 were not realized due to falling below the threshold of 1\%.}
\caption{Sample run of parallel pore-connecting algorithm using 4 threads. The generated network is 3 times as large as the base network in all directions. The maximal feasible number of throats is 103464, of which 27 were not realized due to there being no possible candidates left for these remaining pores.}
\begin{tabular}{|c|c|c|}
\hline
\textbf{Iteration} & \textbf{Throats left} & \textbf{Rel. percentage} \\
\hline
0 & 103464 & 100.00\% \\
1 & 18676 & 18.1\% \\
2 & 5191 & 5.0\% \\
3 & 1996 & 1.9\% \\
4 & 1015 & 0.98\% \\
0 & 103464 & 100.0\% \\
1 & 18690 & 18.1\% \\
2 & 4329 & 4.2\% \\
3 & 1096 & 1.1\% \\
4 & 282 & 0.3\% \\
5 & 73 & 0.1\% \\
6 & 30 & 0.03\% \\
7 & 27 & 0.026\% \\
\hline
\end{tabular}
\label{table:iter}
......@@ -295,7 +289,16 @@
\section{Base Network}
\label{appendix:base}
Throughout this paper we rely on existing networks obtained via tomographic scans to serve as a basis for \textbf{generation} of larger networks and \textbf{simulation} of network flow. Their statistics are detailed in the figures below.
Throughout this thesis we rely on existing networks obtained via tomographic scans to serve as a \emph{basis} for \textbf{generation} of larger networks and \textbf{simulation} of network flow. The statistics of the base network mentioned previously are detailed in Figure ~\ref{fig:base}.
\begin{figure}[ht]
\vspace{-0.5cm}
\centering
\includegraphics[width=0.8\textwidth]{plots/base.png}
\caption{Network consisting of 2636 pores and 4291 throats, inscribed within a cube extending $1.07\cdot 10^{-3}$m in each spatial direction. The pore-arrangement is obviously \emph{not uniform}, as can be seen by the clustering of pores in some regions, while others are mostly undisturbed. The \emph{porosity}, measured as the relative fraction of volume taken up by the void-space geometry, is roughly $32\%$.}
\label{fig:base}
\end{figure}
\newpage
\centering
......
......@@ -14,7 +14,7 @@ def print_point(x, y):
if __name__ == '__main__':
nInterior = 10
nRest = 40
nRest = 34
interiorX = np.random.uniform(-2, 1, (nInterior, 1))
interiorY = np.random.uniform(-1, 2, (nInterior, 1))
......@@ -41,5 +41,13 @@ if __name__ == '__main__':
# Up/down side
if (y <= -1.):
print_point(x, y + 4.)
if (x <= -1.):
print_point(x + 4., y + 4.)
elif (x >= 1.):
print_point(x - 4., y + 4.)
elif (y >= 1.):
print_point(x, y - 4.)
if (x <= -1.):
print_point(x + 4., y - 4.)
elif (x >= 1.):
print_point(x - 4., y - 4.)
Supports Markdown
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