first commit

main
lqijian 8 months ago
commit 859fe9f4c6
  1. 41
      README.md
  2. 2579
      docs/Doxyfile
  3. 20
      docs/Makefile
  4. BIN
      docs/SCREENSHOTS/FD_figure.png
  5. BIN
      docs/SCREENSHOTS/P1.png
  6. BIN
      docs/SCREENSHOTS/P10.png
  7. BIN
      docs/SCREENSHOTS/P11.png
  8. BIN
      docs/SCREENSHOTS/P12.png
  9. BIN
      docs/SCREENSHOTS/P2.png
  10. BIN
      docs/SCREENSHOTS/P3.png
  11. BIN
      docs/SCREENSHOTS/P4.png
  12. BIN
      docs/SCREENSHOTS/P5.png
  13. BIN
      docs/SCREENSHOTS/P6.png
  14. BIN
      docs/SCREENSHOTS/P7.png
  15. BIN
      docs/SCREENSHOTS/P8.png
  16. BIN
      docs/SCREENSHOTS/P9.png
  17. BIN
      docs/SCREENSHOTS/TD_figure.png
  18. BIN
      docs/SCREENSHOTS/W1.png
  19. BIN
      docs/SCREENSHOTS/W10.png
  20. BIN
      docs/SCREENSHOTS/W11.png
  21. BIN
      docs/SCREENSHOTS/W12.png
  22. BIN
      docs/SCREENSHOTS/W13.png
  23. BIN
      docs/SCREENSHOTS/W14.png
  24. BIN
      docs/SCREENSHOTS/W15.png
  25. BIN
      docs/SCREENSHOTS/W16.png
  26. BIN
      docs/SCREENSHOTS/W17.png
  27. BIN
      docs/SCREENSHOTS/W18.png
  28. BIN
      docs/SCREENSHOTS/W19.png
  29. BIN
      docs/SCREENSHOTS/W2.png
  30. BIN
      docs/SCREENSHOTS/W20.png
  31. BIN
      docs/SCREENSHOTS/W21.png
  32. BIN
      docs/SCREENSHOTS/W22.png
  33. BIN
      docs/SCREENSHOTS/W23.png
  34. BIN
      docs/SCREENSHOTS/W24.png
  35. BIN
      docs/SCREENSHOTS/W25.png
  36. BIN
      docs/SCREENSHOTS/W26.png
  37. BIN
      docs/SCREENSHOTS/W27.png
  38. BIN
      docs/SCREENSHOTS/W28.png
  39. BIN
      docs/SCREENSHOTS/W29.png
  40. BIN
      docs/SCREENSHOTS/W3.png
  41. BIN
      docs/SCREENSHOTS/W30.png
  42. BIN
      docs/SCREENSHOTS/W31.png
  43. BIN
      docs/SCREENSHOTS/W32.png
  44. BIN
      docs/SCREENSHOTS/W33.png
  45. BIN
      docs/SCREENSHOTS/W34.png
  46. BIN
      docs/SCREENSHOTS/W35.png
  47. BIN
      docs/SCREENSHOTS/W36.png
  48. BIN
      docs/SCREENSHOTS/W37.png
  49. BIN
      docs/SCREENSHOTS/W38.png
  50. BIN
      docs/SCREENSHOTS/W39.png
  51. BIN
      docs/SCREENSHOTS/W4.png
  52. BIN
      docs/SCREENSHOTS/W40.png
  53. BIN
      docs/SCREENSHOTS/W41.png
  54. BIN
      docs/SCREENSHOTS/W42.png
  55. BIN
      docs/SCREENSHOTS/W43.png
  56. BIN
      docs/SCREENSHOTS/W44.png
  57. BIN
      docs/SCREENSHOTS/W45.png
  58. BIN
      docs/SCREENSHOTS/W46.png
  59. BIN
      docs/SCREENSHOTS/W47.png
  60. BIN
      docs/SCREENSHOTS/W48.png
  61. BIN
      docs/SCREENSHOTS/W49.png
  62. BIN
      docs/SCREENSHOTS/W5.png
  63. BIN
      docs/SCREENSHOTS/W50.png
  64. BIN
      docs/SCREENSHOTS/W51.png
  65. BIN
      docs/SCREENSHOTS/W52.png
  66. BIN
      docs/SCREENSHOTS/W6.png
  67. BIN
      docs/SCREENSHOTS/W7.png
  68. BIN
      docs/SCREENSHOTS/W8.png
  69. BIN
      docs/SCREENSHOTS/W9.png
  70. 28055
      docs/SCREENSHOTS/compute_windows.log
  71. BIN
      docs/VM.png
  72. 334
      docs/VM.svg
  73. 26
      docs/archive/array.rst
  74. 45
      docs/archive/blas.rst
  75. 117
      docs/archive/core.rst
  76. 386
      docs/archive/usage.rst
  77. BIN
      docs/base.png
  78. 151
      docs/base.svg
  79. BIN
      docs/build/doctrees/Manual.doctree
  80. BIN
      docs/build/doctrees/build.doctree
  81. BIN
      docs/build/doctrees/desktop.doctree
  82. BIN
      docs/build/doctrees/environment.pickle
  83. BIN
      docs/build/doctrees/index.doctree
  84. 4
      docs/build/html/.buildinfo
  85. 675
      docs/build/html/Manual.html
  86. BIN
      docs/build/html/_images/B1.jpg
  87. BIN
      docs/build/html/_images/B2.jpg
  88. BIN
      docs/build/html/_images/B3.jpg
  89. BIN
      docs/build/html/_images/P10.png
  90. BIN
      docs/build/html/_images/P3.png
  91. BIN
      docs/build/html/_images/P4.png
  92. BIN
      docs/build/html/_images/P7.png
  93. BIN
      docs/build/html/_images/P8.png
  94. BIN
      docs/build/html/_images/P9.png
  95. BIN
      docs/build/html/_images/VM.png
  96. BIN
      docs/build/html/_images/W1.png
  97. BIN
      docs/build/html/_images/W10.png
  98. BIN
      docs/build/html/_images/W11.png
  99. BIN
      docs/build/html/_images/W12.png
  100. BIN
      docs/build/html/_images/W13.png
  101. Some files were not shown because too many files have changed in this diff Show More

@ -0,0 +1,41 @@
# Docker 101
## Description
This repository documents my understanding of Docker and my attempt to build a Docker image for DGTD (Discontinuous Galerkin Time Domain) code. Docker allows us to package applications and their dependencies into isolated containers, ensuring consistency across different environments.
## Building the Docker Image
To build the Docker image for DGTD code, follow these steps:
### Command Line Interface (CLI)
Use the following CLI commands to build the Docker image:
```bash
docker build -t sample-image .
```
Replace `sample-image` with your preferred image name.
### Platform Compatibility
The Docker image can be built on both UNIX and Windows platforms. Here’s how I set it up:
- **UNIX:** Use Docker Engine.
- **Windows:** Install Docker Desktop.
## Testing the Docker Image
After building the Docker image, test its functionality on both UNIX and Windows environments:
- **UNIX:** Run tests using Docker Engine.
- **Windows:** Run tests using Docker Desktop.
The image should maintain consistency and reproducibility across platforms, demonstrating Docker's versatility in managing application dependencies.
## Usage
This repository serves as a guide for packaging DGTD code and other applications in Docker containers in the future. Adjust Dockerfile configurations and testing procedures as necessary for specific application requirements.

File diff suppressed because it is too large Load Diff

@ -0,0 +1,20 @@
# Minimal makefile for Sphinx documentation
#
# You can set these variables from the command line, and also
# from the environment for the first two.
SPHINXOPTS ?=
SPHINXBUILD ?= sphinx-build
SOURCEDIR = source
BUILDDIR = build
# Put it first so that "make" without argument is like "make help".
help:
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
.PHONY: help Makefile
# Catch-all target: route all unknown targets to Sphinx using the new
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
%: Makefile
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 7.4 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 29 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 151 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 45 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 324 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 262 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 218 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 242 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 124 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 201 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 190 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 42 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 56 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 146 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 88 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 129 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 79 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 91 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 198 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 113 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 26 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 118 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 9.0 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 61 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 35 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 69 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 5.5 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 60 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 37 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 161 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 70 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 80 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 109 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 96 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 18 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 21 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 243 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 25 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 117 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 191 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 241 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 142 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 20 KiB

File diff suppressed because it is too large Load Diff

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

@ -0,0 +1,334 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg5"
inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
sodipodi:docname="VM.svg"
inkscape:export-filename="base.png"
inkscape:export-xdpi="96"
inkscape:export-ydpi="96"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.55181709"
inkscape:cx="453.95477"
inkscape:cy="563.59255"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.883026;stroke-dasharray:none;stroke-opacity:1"
id="rect234"
width="137.73268"
height="110.47746"
x="11.03413"
y="29.810791" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.166;stroke-dasharray:none;stroke-opacity:1"
id="rect234-8"
width="297.89749"
height="204.32466"
x="2.8542447"
y="7.8774199" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-opacity:1;stroke-dasharray:none"
id="rect234-7"
width="57.775303"
height="19.121082"
x="18.324326"
y="45.297504" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="47.731499"
y="39.524109"
id="text1699"><tspan
sodipodi:role="line"
id="tspan1697"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="47.731499"
y="39.524109">Virtual Machine 1</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="53.166538"
y="20.067595"
id="text1699-4"><tspan
sodipodi:role="line"
id="tspan1697-50"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="53.166538"
y="20.067595">Host (Phyiscal) Machine</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="47.735977"
y="56.983154"
id="text1699-3"><tspan
sodipodi:role="line"
id="tspan1697-5"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="47.735977"
y="56.983154">App 1</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6"
width="57.775303"
height="19.121082"
x="83.701309"
y="45.297504" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1"
width="122.90836"
height="18.877161"
x="18.551533"
y="67.879677" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0"
width="122.90836"
height="18.877161"
x="18.551533"
y="90.289925" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6"
width="122.90836"
height="18.877161"
x="18.551533"
y="112.70017" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.803;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6-6"
width="266.44858"
height="18.561148"
x="18.709539"
y="144.67624" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="113.11296"
y="56.983154"
id="text1699-3-2"><tspan
sodipodi:role="line"
id="tspan1697-5-9"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="113.11296"
y="56.983154">App 1</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="80.075134"
y="79.443367"
id="text1699-3-2-2"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="80.075134"
y="79.443367">Libraries</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="80.059456"
y="124.33328"
id="text1699-3-2-2-0"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="80.059456"
y="124.33328">Virtual Hardware</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="151.82634"
y="156.15134"
id="text1699-3-2-2-0-1"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6-2"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="151.82634"
y="156.15134">Hypervisor</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.803;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6-6-9"
width="266.44858"
height="18.561148"
x="18.709539"
y="167.58536" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="151.82634"
y="179.06046"
id="text1699-3-2-2-0-1-3"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6-2-1"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="151.82634"
y="179.06046">Host Operating System (If Type 2)</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.803;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6-6-9-9"
width="266.44858"
height="18.561148"
x="18.709539"
y="190.49448" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="151.82634"
y="201.96957"
id="text1699-3-2-2-0-1-3-4"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6-2-1-7"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="151.82634"
y="201.96957">Physical Hardware</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="79.864639"
y="101.92303"
id="text1699-3-2-2-9"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-3"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="79.864639"
y="101.92303">Operating System</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.883026;stroke-dasharray:none;stroke-opacity:1"
id="rect234-2"
width="137.73268"
height="110.47746"
x="154.89035"
y="29.810791" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-61"
width="57.775303"
height="19.121082"
x="162.18054"
y="45.297504" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="191.58772"
y="39.524109"
id="text1699-8"><tspan
sodipodi:role="line"
id="tspan1697-7"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="191.58772"
y="39.524109">Virtual Machine 2</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="191.59219"
y="56.983154"
id="text1699-3-9"><tspan
sodipodi:role="line"
id="tspan1697-5-2"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="191.59219"
y="56.983154">App 1</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-0"
width="57.775303"
height="19.121082"
x="227.55754"
y="45.297504" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-2"
width="122.90836"
height="18.877161"
x="162.40776"
y="67.879677" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-3"
width="122.90836"
height="18.877161"
x="162.40776"
y="90.289917" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6-7"
width="122.90836"
height="18.877161"
x="162.40776"
y="112.70016" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="256.96918"
y="56.983154"
id="text1699-3-2-5"><tspan
sodipodi:role="line"
id="tspan1697-5-9-9"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="256.96918"
y="56.983154">App 1</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="223.93135"
y="79.443367"
id="text1699-3-2-2-2"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-2"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="223.93135"
y="79.443367">Libraries</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="223.91568"
y="124.33328"
id="text1699-3-2-2-0-8"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6-9"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="223.91568"
y="124.33328">Virtual Hardware</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="223.72086"
y="101.92302"
id="text1699-3-2-2-9-7"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-3-3"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="223.72086"
y="101.92302">Operating System</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 14 KiB

@ -0,0 +1,26 @@
=======
Array.h
=======
The ``Array.h`` header file contains the Array class, and its related classes. For this
file only, assume that every functions is callable on both host and device unless
explicitly mentioned otherwise.
CudaTools::Shape
----------------
.. doxygenclass:: CudaTools::Shape
:members:
:allow-dot-graphs:
CudaTools::ArrayIterator<T>
---------------------------
.. doxygenclass:: CudaTools::ArrayIterator
:members:
:allow-dot-graphs:
CudaTools::Array<T>
-------------------
.. doxygenclass:: CudaTools::Array
:members:
:private-members:
:allow-dot-graphs:

@ -0,0 +1,45 @@
======
BLAS.h
======
The ``BLAS.h`` header file contains some BLAS functions, and some related
classes for those functions.
BLAS Functions
==============
Currently, these are the supported BLAS functions. They are inherited mainly
from the cuBLAS API, and condensed into a unified functions. The plan is to
add them as necessary.
CudaTools::BLAS::GEMV<T>
------------------------
.. doxygenfunction:: CudaTools::BLAS::GEMV
CudaTools::BLAS::GEMM<T>
------------------------
.. doxygenfunction:: CudaTools::BLAS::GEMM
CudaTools::BLAS::DGMM<T>
------------------------
.. doxygenfunction:: CudaTools::BLAS::DGMM
BLAS Classes
============
These classes also inherit functions from the cuBLAS API, but are packaged
into classes that are more intuitive and hide external details.
CudaTools::BLAS::Batch<T>
-------------------------
.. doxygenclass:: CudaTools::BLAS::Batch
:members:
CudaTools::BLAS::PLUArray<T>
----------------------------
.. doxygenclass:: CudaTools::BLAS::PLUArray
:members:
CudaTools::BLAS::PLUBatch<T>
----------------------------
.. doxygenclass:: CudaTools::BLAS::PLUBatch
:members:

@ -0,0 +1,117 @@
======
Core.h
======
The ``Core.h`` header file defines some useful types and some macros functions
to faciliate the dual CPU-CUDA compilation targets. Additionally, it introduces
several classes to enable the usage of CUDA streams, kernels, and graphs.
Types
=====
These numeric types are defined to faciliate the special types used for CUDA,
and is *necessary* to use them for functions to work properly. It is recommended
to bring them into the global namespace if possible, by writing ``using namespace CudaTools::Types;``.
.. doxygentypedef:: CudaTools::Types::real32
.. doxygentypedef:: CudaTools::Types::real64
.. doxygentypedef:: CudaTools::Types::complex64
.. doxygentypedef:: CudaTools::Types::complex128
These are types provided by the CUDA Math API, which cannot be easily used as computational
types on host code. Take care when transferring these back to host functions, as further
processing may require a type conversion.
.. doxygentypedef:: CudaTools::Types::real16
.. doxygentypedef:: CudaTools::Types::realb16
Macro Definitions
=================
Device Indicators
-----------------
.. doxygendefine:: CUDACC
.. doxygendefine:: DEVICE
Host-Device Automation
----------------------
.. doxygendefine:: HD
.. doxygendefine:: DEVICE_FUNC
.. doxygendefine:: SHARED
Compilation Options
-------------------
.. doxygendefine:: CUDATOOLS_ARRAY_MAX_AXES
.. doxygendefine:: CUDATOOLS_USE_EIGEN
.. doxygendefine:: CUDATOOLS_USE_PYTHON
Macro Functions
===============
.. doxygendefine:: KERNEL
Device Helpers
--------------
.. doxygendefine:: BASIC_LOOP
Device Copy
------------
.. doxygendefine:: DEVICE_COPY
Memory Functions
================
.. doxygenfunction:: CudaTools::malloc
.. doxygenfunction:: CudaTools::free
.. doxygenfunction:: CudaTools::copy
.. doxygenfunction:: CudaTools::memset
.. doxygenfunction:: CudaTools::pin
Streams and Handles
===================
CudaTools::StreamID
-------------------
.. doxygenstruct:: CudaTools::StreamID
CudaTools::Manager
------------------
.. doxygenclass:: CudaTools::Manager
:members:
Kernels
=======
.. doxygenfunction:: CudaTools::Kernel::launch
.. doxygenfunction:: CudaTools::Kernel::basic
CudaTools::Kernel::Settings
---------------------------
.. doxygenstruct:: CudaTools::Kernel::Settings
:members:
Graphs
======
CudaTools::Graph
----------------
.. doxygenclass:: CudaTools::Graph
:members:
CudaTools::GraphManager
-----------------------
.. doxygenstruct:: CudaTools::GraphManager
:members:

@ -0,0 +1,386 @@
==================
Usage and Examples
==================
This library is broken up into three main parts, as well as a certain
compilation and linking framework:
#. :ref:`Core Examples`
#. :ref:`Array Examples`
#. :ref:`BLAS Examples`
#. :ref:`Compilation and Linking`
#. :ref:`Notes`
The ``Core.h`` header contains the necessary macros, flags and objects for interfacing with
basic kernel launching and the CUDA Runtime API. The ``Array.h`` header contains the ``CudaTools::Array``
class which provides a device compatible Array-like class with easy memory management. Lastly,
the ``BLAS.h`` header provides functions BLAS functions through the the cuBLAS library for the GPU,
and Eigen for the CPU. Lastly, a templated Makefile is provided which can be used
for your own project, after following a few rules.
The usage of this libary will be illustrated through examples, and further details
can be found in the other sections. The examples are given in the `samples <https://git.acem.ece.illinois.edu/kjao/CudaTools/src/branch/main/samples>`__ folder.
Throughout this documentation, there are a few common terms that may appear. First, we refer to the CPU as the host, and the GPU as the device. So, a host function refers
to a function runnable on the CPU, and a device function refers to a function that is runnable
on a device. A kernel is a specific function that the host can call to be run on the device.
Core Examples
=============
This ``Core.h`` file mainly introduces compiler macros and a few classes that are used to improve the
syntax between host and device code. To define and call a kernel, there are a few
macros provided. For example,
.. code-block:: cpp
KERNEL(add, int x, int y) {
printf("Kernel: %i\n", x + y);
}
int main() {
CudaTools::Kernel::launch(add, CudaTools::Kernel::basic(1), 1, 1); // Prints 2.
return 0;
}
The ``KERNEL(name, ...)`` macro takes in the function name and its arguments.
The second argument in the ``KERNEL()`` macro is are the launch parameters for
kernel. The launch parameters have several items, but for 'embarassingly parallel'
cases, we can simply generate the settings with the number of threads using ``CudaTools::Kernel::basic``. More detail with
creating launch parameters can be found :ref:`here <CudaTools::Kernel::Settings>`. In the above example,
there is only one thread. The rest of the arguments are just the kernel arguments. For more detail,
see :ref:`here <Macro Functions>`.
.. warning::
These kernel definitions must be in a file that will be compiled by ``nvcc``. Also,
for header files, there is an additional macro ``KERNEL(name, ...)`` to declare it
and make it available to other files.
Since many applications used classes, a macro is provided to 'convert' a class into
being device-compatible. We follow the previous example in a similar fashion.
.. code-block:: cpp
class intPair {
DEVICE_COPY(intPair)
public:
int x, y;
intPair(const int x_, const int y_) : x(x_), y(y_) {
allocateDevice(); // Allocates memory for this intPair on the device.
updateDevice().wait(); // Copies the memory on the host to the device and waits until finished.
};
~intPair() { CudaTools::free(that()); };
HD void swap() {
int swap = x;
x = y;
y = swap;
};
};
KERNEL(swap, intPair* const pair) { pair->swap(); }
int main() {
intPair pair(1, 2);
printf("Before: %u, %u\n", pair.x, pair.y); // Prints 1, 2.
CudaTools::Kernel::launch(swap, CudaTools::Kernel::basic(1), pair.that()).wait();
pair.updateHost().wait(); // Copies the memory from the device back to the host and waits until finished.
printf("After: %u, %u\n", pair.x, pair.y); // Prints 2, 1.
return 0;
}
In this example, we create a class called ``intPair``, and enable device-copying functions through
the ``DEVICE_COPY(name)`` macro. This is not necessary for a class or struct to be available on the device, as we can always pass objects through the kernel function arguments. This is useful to prevent constant copying, and potentially separating class copies between host and device.
The aforementioned macro introduces a few functions, like
``allocateDevice()``, ``freeDevice()``, ``updateDevice()``, ``updateHost()``, and ``that()``.
The ``that()`` function returns a pointer to the copy on the device. As a result when using this, the programmer
**must** define a destructor that frees the pointer using ``freeDevice()``. For more details, see :ref:`here <Device Copy>`.
.. warning::
The ``updateDevice()`` and ``updateHost()`` in most cases will need to be explicitly called
to push the data on the host to the device, and vice-versa. It is the programmers job to maintain
where the 'most recent' copy is. If these are not called, various memory errors can occur. Note that,
when passing a pointer to the kernel, it must be the *device* pointer. Otherwise, an illegal memory
access would occur.
The kernel argument list should **must** consist of pointers to objects, or a non-reference object.
Otherwise, compilation will fail. In general this is safer, as it forces the programmer to
acknowledge that the device copy is being passed. For the latter case of a non-reference object,
you should only do this if there is no issue in creating a copy of the original object. In the above
example, we could have done this, but for more complicated classes it may result in unwanted behavior.
Lastly, since the point of classes is usually to have some member functions, to have them
available on the device, you must mark them with the compiler macro ``HD`` in front.
We also introduce the ``wait()`` function, which waits for the command to complete before
continuing. Most calls that involve the device are asynchronous, so without proper blocking,
operations dependent on a previous command are not guaranteed to run correctly. If the code is
compiled for CPU, then everything will run synchronously, as per usual.
.. note::
Almost all functions that are asynchronous provide an optional 'stream' argument,
where you can give the name of the stream you wish to use. Different streams run
asynchronous, but operations on the same stream are FIFO. To define a stream to use
later, you must call ``CudaTools::Manager::get()->addStream("myStream")`` at some point
before you use it. For more details, see :ref:`here <CudaTools::Manager>`.
Array Examples
==============
The ``Array.h`` file introduces the ``Array`` class, which is a class that provides automatic
memory management between device and host. In particular, it provides functionality on
both the host and device while handling proper memory destruction, with many nice
features. In particular it supports mimics many features of the Python package NumPy.`
We can demonstrate a few here.
.. code-block:: cpp
KERNEL(times2, const CudaTools::Array<int> arr) {
CudaTools::Array<int> flat = arr.flattened();
BASIC_LOOP(arr.shape().items()) { flat[iThread] *= 2; }
}
KERNEL(times2double, const CudaTools::Array<double> arr) {
CudaTools::Array<double> flat = arr.flattened();
BASIC_LOOP(arr.shape().items()) { flat[iThread] *= 2; }
}
int main() {
CudaTools::Array<int> arrRange = CudaTools::Array<int>::range(0, 10);
CudaTools::Array<int> arrConst = CudaTools::Array<int>::constant({10}, 1);
CudaTools::Array<double> arrLinspace = CudaTools::Array<double>::linspace(0, 5, 10);
CudaTools::Array<int> arrComma({2, 2}); // 2x2 array.
arrComma << 1, 2, 3, 4; // Comma initializer if needed.
arrRange.updateDevice();
arrConst.updateDevice();
arrLinspace.updateDevice();
arrComma.updateDevice().wait();
std::cout << "Before Kernel:\n";
std::cout << arrRange << "\n" << arrConst << "\n" << arrLinspace << "\n" << arrComma << "\n";
// Call the kernel multiple times asynchronously. Note: since they share same
// stream, they are not run in parallel, just queued on the device.
// NOTE: Notice that a view is passed into the kernel, not the Array itself.
CudaTools::Kernel::launch(times2, CudaTools::Kernel::basic(arrRange.shape().items()), arrRange.view());
CudaTools::Kernel::launch(times2, CudaTools::Kernel::basic(arrConst.shape().items()), arrConst.view());
CudaTools::Kernel::launch(times2double, CudaTools::Kernel::basic(arrLinspace.shape().items()), arrLinspace.view());
CudaTools::Kernel::launch(times2, CudaTools::Kernel::basic(arrComma.shape().items()), arrComma.view()).wait();
arrRange.updateHost();
arrConst.updateHost();
arrLinspace.updateHost();
arrComma.updateHost().wait(); // Same stream, so you should wait for the last call.
std::cout << "After Kernel:\n";
std::cout << arrRange << "\n" << arrConst << "\n" << arrLinspace << "\n" << arrComma << "\n";
return 0;
}
In this example, we show a few ways to initialize an ``Array`` through some static functions.
It is templated, so it can (theoretically) support any type. Additionally, you can initialize an
empty ``Array`` by providing its ``Shape`` with an initializer list (ex: ``{2, 2}``). Many of these
array functions and initializers have view-returning and self-assigning versions. For instance,
``.flattened()`` returns a flattened view of an Array, and does not modify the original. For more details,
see :ref:`here <CudaTools::Array<T>>`.
We also note the use of ``BASIC_LOOP(N)``, which is a macro for generating the loop automatically
on the kernel given the number of threads. It is intended to be used only for "embarassingly parallel"
situations and with the ``CudaTools::Kernel::basic()`` launch parameters. If compiling for CPU, it will
mark the loop with ``#pragma parallel for`` and attempt to use OpenMP for parallelism.
.. warning::
Notice that a view must be passed to the kernel, and not the original object, otherwise a copy
would be made.
The Array also supports other helpful functions, such as multi-dimensional indexing, slicing, and
a few other functions.
.. code-block:: cpp
int main() {
CudaTools::Array<int> arr = CudaTools::Array<int>::constant({100}, 0);
arr.reshape({4, 5, 5}); // Creates a three dimensional array.
arr[0][0][0] = 1; // Axis by axis indexing.
arr[{1, 0, 0}] = 100; // Specific 'coordinate' indexing.
std::cout << arr << "\n";
CudaTools::Array<int> arrRange = CudaTools::Array<int>::range(0, 18);
auto arrSlice = arr.slice({{1, 3}, {1, 4}, {1, 4}}); // Takes a slice of the center.
std::cout << "Before Copy:\n" << arrSlice << "\n";
arrSlice = arrRange; // Copies arrRange into arrSlice. (Does NOT replace!)
std::cout << "After Copy:\n" << arrSlice << "\n";
std::cout << "Modified: \n"
<< arr << "\n"; // The original array is modified, since a slice does not copy.
CudaTools::Array<int> newArr = arr.copy(); // Copies the original Array.
for (auto it = newArr.begin(); it != newArr.end(); ++it) { // Iterate through the array.
*it = 1;
}
std::cout << "Modified New Array:\n" << newArr << "\n";
std::cout << "Old Array:\n" << arr << "\n"; // The original array was not modified after a copy.
return 0;
}
In this example, we demonstrate some of the functionality of the Array. We can do
multi-dimensional indexing, take slices of the Array, and iterate through the Array through an
iterator, in C++ fashion. Particularly, we need to introduce the concept of a "view" of an Array.
An Array either "owns" its data or is a "view" of another Array. You can create a
view manually with the ``.view()`` function.
.. warning::
When using the assignment operator, if a view is on the left-hand side, it will
perform a copy of the internal data. However, if the Array is an owner, then it will replace
the entire Array, and **free the old memory**. This means any view of that previous
array will now point to invalid places in memory. It is responsibility of the
programmer to manage this.
Graph Examples
==============
Additionally, there is support for CUDA Graphs, a way of defining a series of kernel
launches and executing later, potentially reducing overhead and timing, as well as
control the specific parallel workflow between CPU and GPU. The following
snippet illustrates this
.. code-block:: cpp
void myGraph(CudaTools::GraphManager* gm, const CudaTools::Array<uint32_t> A,
const CudaTools::Array<uint32_t> B) {
A.updateDevice("graphStream");
gm->makeBranch("graphStream", "graphStreamBranch");
B.updateDevice("graphStreamBranch");
for (uint32_t iTimes = 0; iTimes < 30; ++iTimes) {
CudaTools::Kernel::launch(
collatz, CudaTools::Kernel::basic(A.shape().items(), "graphStream"), A.view());
CudaTools::Kernel::launch(
plusOne, CudaTools::Kernel::basic(A.shape().items(), "graphStreamBranch"), B.view());
}
gm->joinBranch("graphStream", "graphStreamBranch");
CudaTools::Kernel::launch(addArray, CudaTools::Kernel::basic(A.shape().items(), "graphStream"),
A.view(), B.view());
A.updateHost("graphStream");
B.updateHost("graphStream");
gm->launchHostFunction("graphStream", addNum, A.view(), 5);
}
int main() {
CudaTools::Manager::get()->addStream("graphStream");
CudaTools::Manager::get()->addStream("graphStreamBranch");
CudaTools::Array<uint32_t> A = CudaTools::Array<uint32_t>::constant({100}, 50);
CudaTools::Array<uint32_t> B = CudaTools::Array<uint32_t>::constant({100}, 0);
CudaTools::GraphManager gm;
CudaTools::Graph graph("graphStream", myGraph, &gm, A.view(), B.view());
TIME(graph.execute().wait(), ExecuteGraph);
std::cout << A.slice({{0, 10}}) << "\n";
return 0;
}
We first create two new streams to be used in the graph, which define the different parallel
streams used. To use CUDA Graphs in CudaTools, we expect the graph to be created from a function, which
should be written as if it will be executed. Note that we do not need to use ``.wait()`` here, since the function
is intended to be captured into the graph. The capture process is done on the creation of the graph, with
the name of the origin stream, the function name, and the arguments of the function. Afterwards,
simply run ``graph.execute()`` to execute the captured graph. On CPU, it will simply run the function.
To access the other functionality like graph branching an capturing host functions, it is
necessary to use the ``CudaTools::GraphManager`` class, which stores a variety of necessary variables
that need to be kept during the lifetime of the graph execution. **Currently, launching host functions sometimes alters the correct blocking of the stream, in particular with copying. It is not yet known if this is an issue with the library or a technicality within CUDA Graphs itself that needs some special care to resolve.** To read more about the syntax, see :ref:`here <CudaTools::GraphManager>`.
.. warning::
A graph capture essentially 'freezes' the variables used in the capture, like
function arguments. As a result, the programmer must take care that the variables
are well-defined. This is especially relevant to variables on the heap, where you need
to make sure the variable is not a copy. Potentially, always using pointers could work,
but is not always necessary. Likely ``.view()`` should always be used when dealing with
``CudaTools::Array`` objects.
BLAS Examples
=============
Compilation and Linking
=======================
To compile with this library, there are only a few things necessary. First, this library depends on
`Eigen 3.4.0+ <https://eigen.tuxfamily.org/index.php?title=Main_Page>`__, and must be
compiled with C++17. Next, it is recommended you use the provided template ``Makefile``, which can be
easily modified to suit your project needs. It already default handles the compilation
and linking with ``nvcc``, so long as you fulfill a few requirements.
#. Use the compiler flag ``CUDA`` to mark where GPU-specific code is, if necessary.
#. Any files that use ``CUDA`` functionality, (i.e defining a kernel), should have the file
extension ``.cu.cpp``.
#. When including the ``Core.h`` header file, in only **one** file, you must define the
macro ``CUDATOOLS_IMPLEMENTATION``. That file must also compile for CUDA, so its
extension must be ``.cu.cpp``. It's recommended to put this with your kernel definitions.
Afterwards the ``Makefile`` will have two targets ``cpu`` and ``gpu``, which compile
the CPU and GPU compatible binaries respectively. As an example, we can look at the whole
file for the first example:
.. code-block:: cpp
// main.cu.cpp
#define CUDATOOLS_IMPLEMENTATION
#include <Core.h>
DEFINE_KERNEL(add, int x, int y) {
printf("Kernel: %i\n", x + y);
}
int main() {
KERNEL(add, CudaTools::Kernel::basic(1), 1, 1); // Prints 2.
return 0;
}
.. code-block::
// Makefile
CC := g++-10
NVCC := nvcc
CFLAGS := -Wall -std=c++17 -fopenmp -MMD
NVCC_FLAGS := -MMD -std=c++17 -w -Xcompiler
INCLUDE := ../../
LIBS_DIR :=
LIBS_DIR_GPU := /usr/local/cuda/lib64
LIBS :=
LIBS_GPU := cuda cudart cublas
TARGET = coreKernel
SRC_DIR = .
BUILD_DIR = build
The lines above are the first few lines of the ``Makefile``, which are the only
lines you should need to modify, consisting of libraries and flags, as well as
the name of the target.
Notes
=====
Complex Numbers
---------------
Dealing with complex numbers is slightly complicated, trying to enforce compatability between
two systems and several different libraries which many not have the right support. We
create a simple barebones host and device compatible complex number class following
the same as ``cuComplex.h``, but with proper C++ operator overloading and class structure. However,
while the underlying data structure is identical to all other complex number structures, there
is a lot of type-casting done underneath the hood to get cuBLAS and Eigen to work well
together, while maintaining one 'unified' complex type.
As a result, there could be some issues and lack of functionality with this at the moment.
For now, it's recommended to use the given ``complex64`` and ``complex128`` types which
should properly adapt and work.

Binary file not shown.

After

Width:  |  Height:  |  Size: 22 KiB

@ -0,0 +1,151 @@
<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!-- Created with Inkscape (http://www.inkscape.org/) -->
<svg
width="210mm"
height="297mm"
viewBox="0 0 210 297"
version="1.1"
id="svg5"
inkscape:version="1.2.1 (9c6d41e, 2022-07-14)"
sodipodi:docname="base.svg"
xmlns:inkscape="http://www.inkscape.org/namespaces/inkscape"
xmlns:sodipodi="http://sodipodi.sourceforge.net/DTD/sodipodi-0.dtd"
xmlns="http://www.w3.org/2000/svg"
xmlns:svg="http://www.w3.org/2000/svg">
<sodipodi:namedview
id="namedview7"
pagecolor="#ffffff"
bordercolor="#000000"
borderopacity="0.25"
inkscape:showpageshadow="2"
inkscape:pageopacity="0.0"
inkscape:pagecheckerboard="0"
inkscape:deskcolor="#d1d1d1"
inkscape:document-units="mm"
showgrid="false"
inkscape:zoom="0.78038721"
inkscape:cx="196.69723"
inkscape:cy="561.25984"
inkscape:window-width="1920"
inkscape:window-height="1043"
inkscape:window-x="1920"
inkscape:window-y="0"
inkscape:window-maximized="1"
inkscape:current-layer="layer1" />
<defs
id="defs2" />
<g
inkscape:label="Layer 1"
inkscape:groupmode="layer"
id="layer1">
<rect
style="opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.883026;stroke-dasharray:none;stroke-opacity:1"
id="rect234"
width="137.73268"
height="110.47746"
x="11.03413"
y="29.810791" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-opacity:1;stroke-dasharray:none"
id="rect234-7"
width="57.775303"
height="19.121082"
x="18.324326"
y="45.297504" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;opacity:1;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="57.827129"
y="40.250324"
id="text1699"><tspan
sodipodi:role="line"
id="tspan1697"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="57.827129"
y="40.250324">Host/Physical Machine</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="47.735977"
y="56.983154"
id="text1699-3"><tspan
sodipodi:role="line"
id="tspan1697-5"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="47.735977"
y="56.983154">App 1</tspan></text>
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.543;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6"
width="57.775303"
height="19.121082"
x="83.701309"
y="45.297504" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1"
width="122.90836"
height="18.877161"
x="18.551533"
y="67.879677" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0"
width="122.90836"
height="18.877161"
x="18.551533"
y="90.289925" />
<rect
style="fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:0.687;stroke-dasharray:none;stroke-opacity:1"
id="rect234-7-6-1-0-6"
width="122.90836"
height="18.877161"
x="18.551533"
y="112.70017" />
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="113.11296"
y="56.983154"
id="text1699-3-2"><tspan
sodipodi:role="line"
id="tspan1697-5-9"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="113.11296"
y="56.983154">App 1</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="80.075134"
y="79.443367"
id="text1699-3-2-2"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="80.075134"
y="79.443367">Libraries</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="80.059456"
y="124.33328"
id="text1699-3-2-2-0"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-6"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="80.059456"
y="124.33328">Physical Hardware</tspan></text>
<text
xml:space="preserve"
style="font-size:9.17223px;font-family:'Times New Roman';-inkscape-font-specification:'Times New Roman, Normal';text-align:center;text-anchor:middle;fill:none;fill-opacity:1;fill-rule:evenodd;stroke:#000000;stroke-width:1.265;stroke-opacity:1"
x="79.864639"
y="101.92303"
id="text1699-3-2-2-9"><tspan
sodipodi:role="line"
id="tspan1697-5-9-7-3"
style="fill:#000000;fill-opacity:1;stroke:none;stroke-width:1.265"
x="79.864639"
y="101.92303">Operating System</tspan></text>
</g>
</svg>

After

Width:  |  Height:  |  Size: 6.1 KiB

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

Binary file not shown.

@ -0,0 +1,4 @@
# Sphinx build info version 1
# This file hashes the configuration used when building these files. When it is not found, a full rebuild will be done.
config: 15fae9b8ea1d7497d149a533a2eee6ca
tags: 645f666f9bcd5a90fca523b33c5a78b7

@ -0,0 +1,675 @@
<!DOCTYPE html>
<html class="writer-html5" lang="en" >
<head>
<meta charset="utf-8" /><meta name="generator" content="Docutils 0.17.1: http://docutils.sourceforge.net/" />
<meta name="viewport" content="width=device-width, initial-scale=1.0" />
<title>User Manual (Windows System) &mdash; Documentation for Docker Installation and Usage 1.0 documentation</title>
<link rel="stylesheet" href="_static/pygments.css" type="text/css" />
<link rel="stylesheet" href="_static/css/theme.css" type="text/css" />
<link rel="stylesheet" href="_static/graphviz.css" type="text/css" />
<!--[if lt IE 9]>
<script src="_static/js/html5shiv.min.js"></script>
<![endif]-->
<script data-url_root="./" id="documentation_options" src="_static/documentation_options.js"></script>
<script src="_static/jquery.js"></script>
<script src="_static/underscore.js"></script>
<script src="_static/_sphinx_javascript_frameworks_compat.js"></script>
<script src="_static/doctools.js"></script>
<script src="_static/js/mathjax-config.js"></script>
<script src="_static/js/theme.js"></script>
<link rel="index" title="Index" href="genindex.html" />
<link rel="search" title="Search" href="search.html" />
<link rel="prev" title="Docker Engine" href="build.html" />
</head>
<body class="wy-body-for-nav">
<div class="wy-grid-for-nav">
<nav data-toggle="wy-nav-shift" class="wy-nav-side">
<div class="wy-side-scroll">
<div class="wy-side-nav-search" >
<a href="index.html" class="icon icon-home"> Documentation for Docker Installation and Usage
</a>
<div class="version">
1.0.0
</div>
<div role="search">
<form id="rtd-search-form" class="wy-form" action="search.html" method="get">
<input type="text" name="q" placeholder="Search docs" />
<input type="hidden" name="check_keywords" value="yes" />
<input type="hidden" name="area" value="default" />
</form>
</div>
</div><div class="wy-menu wy-menu-vertical" data-spy="affix" role="navigation" aria-label="Navigation menu">
<ul class="current">
<li class="toctree-l1"><a class="reference internal" href="desktop.html">Docker Desktop</a><ul>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#what-is-docker-desktop">What is Docker Desktop?</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#key-features">Key Features</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#docker-desktop-architecture">Docker Desktop Architecture</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#difference-between-images-and-containers">Difference between images and containers</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#installation-in-windows">Installation in Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#enable-virtualization-for-windows-machine">Enable Virtualization for Windows Machine</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#installing-wsl">Installing WSL</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#installation-in-linux">Installation in Linux</a></li>
<li class="toctree-l2"><a class="reference internal" href="desktop.html#supported-operating-systems">Supported Operating Systems</a></li>
</ul>
</li>
<li class="toctree-l1"><a class="reference internal" href="build.html">Docker Engine</a><ul>
<li class="toctree-l2"><a class="reference internal" href="build.html#what-is-docker-engine">What is Docker Engine?</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#basic-functionalities-of-docker-engine">Basic Functionalities of Docker Engine</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#key-benefits-of-docker-engine">Key Benefits of Docker Engine</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#basic-steps-to-build-docker-images">Basic Steps to build Docker images</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#how-to-check-images">How to check images</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#how-to-save-built-image-locally">How to save built image locally</a></li>
<li class="toctree-l2"><a class="reference internal" href="build.html#how-to-remove-and-delete-images-containers">How to remove and delete images / containers</a></li>
</ul>
</li>
<li class="toctree-l1 current"><a class="current reference internal" href="#">User Manual (Windows System)</a><ul>
<li class="toctree-l2"><a class="reference internal" href="#step-by-step-installation-in-windows">Step-by-Step installation in Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="#activate-virtualization-in-bios">Activate Virtualization in BIOS</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-wsl">Install WSL</a></li>
<li class="toctree-l2"><a class="reference internal" href="#install-docker-desktop-in-windows">Install Docker Desktop in Windows</a></li>
<li class="toctree-l2"><a class="reference internal" href="#import-docker-image">Import Docker Image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#mounting-user-data-and-running-docker-image">Mounting User data and running Docker image</a></li>
<li class="toctree-l2"><a class="reference internal" href="#how-to-use-maxwell-td">How to use Maxwell-TD</a></li>
<li class="toctree-l2"><a class="reference internal" href="#common-issues">Common issues</a><ul>
<li class="toctree-l3"><a class="reference internal" href="#incompatible-gpu-drivers-toolkit">Incompatible GPU drivers/toolkit</a></li>
<li class="toctree-l3"><a class="reference internal" href="#windows-version">Windows Version</a></li>
<li class="toctree-l3"><a class="reference internal" href="#sufficient-memory-to-upload-image">Sufficient Memory to upload image</a></li>
<li class="toctree-l3"><a class="reference internal" href="#bios-settings">BIOS settings</a></li>
<li class="toctree-l3"><a class="reference internal" href="#change-simulation-parameters">Change Simulation Parameters</a></li>
</ul>
</li>
</ul>
</li>
</ul>
</div>
</div>
</nav>
<section data-toggle="wy-nav-shift" class="wy-nav-content-wrap"><nav class="wy-nav-top" aria-label="Mobile navigation menu" >
<i data-toggle="wy-nav-top" class="fa fa-bars"></i>
<a href="index.html">Documentation for Docker Installation and Usage</a>
</nav>
<div class="wy-nav-content">
<div class="rst-content">
<div role="navigation" aria-label="Page navigation">
<ul class="wy-breadcrumbs">
<li><a href="index.html" class="icon icon-home"></a> &raquo;</li>
<li>User Manual (Windows System)</li>
<li class="wy-breadcrumbs-aside">
<a href="_sources/Manual.rst.txt" rel="nofollow"> View page source</a>
</li>
</ul>
<hr/>
</div>
<div role="main" class="document" itemscope="itemscope" itemtype="http://schema.org/Article">
<div itemprop="articleBody">
<section id="user-manual-windows-system">
<h1>User Manual (Windows System)<a class="headerlink" href="#user-manual-windows-system" title="Permalink to this heading"></a></h1>
<section id="step-by-step-installation-in-windows">
<h2>Step-by-Step installation in Windows<a class="headerlink" href="#step-by-step-installation-in-windows" title="Permalink to this heading"></a></h2>
<p>Welcome to the user manual for setting up and using Docker on a Windows system. This guide will provide comprehensive instructions to help you install and configure Docker Desktop on Windows, activate virtualization in BIOS, install WSL (Windows Subsystem for Linux), import Docker images, mount user data, and run Docker containers. Additionally, it includes pointers and tips to address common questions and issues that users may encounter.</p>
</section>
<section id="activate-virtualization-in-bios">
<h2>Activate Virtualization in BIOS<a class="headerlink" href="#activate-virtualization-in-bios" title="Permalink to this heading"></a></h2>
<p>To enable virtualization, you’ll need to access the BIOS settings during startup. Here’s how:</p>
<ol class="arabic simple">
<li><p>Power on your computer.</p></li>
<li><p>Keep an eye on the initial boot screen.</p></li>
<li><p>When you see the screen, press the <code class="docutils literal notranslate"><span class="pre">F2</span> <span class="pre">/</span> <span class="pre">F10</span> <span class="pre">/</span> <span class="pre">F12</span> <span class="pre">/</span> <span class="pre">Esc</span> <span class="pre">/</span> <span class="pre">Delete</span> <span class="pre">/</span> <span class="pre">Enter</span></code> key to enter the BIOS settings.</p></li>
</ol>
<figure class="align-center" id="id1">
<a class="reference internal image-reference" href="_images/B1.jpg"><img alt="_images/B1.jpg" src="_images/B1.jpg" style="width: 900px;" /></a>
<figcaption>
<p><span class="caption-text">Screen when we boot up the machine. Press <code class="docutils literal notranslate"><span class="pre">F2</span> <span class="pre">/</span> <span class="pre">F10</span> <span class="pre">/</span> <span class="pre">F12</span> <span class="pre">/</span> <span class="pre">Esc</span> <span class="pre">/</span> <span class="pre">Delete</span> <span class="pre">/</span> <span class="pre">Enter</span></code></span><a class="headerlink" href="#id1" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Once inside the BIOS settings:</p>
<ol class="arabic simple" start="4">
<li><p>Navigate through the BIOS menus using the arrow keys. Look for the section typically labeled <code class="docutils literal notranslate"><span class="pre">Advanced</span></code>, <code class="docutils literal notranslate"><span class="pre">Advanced</span> <span class="pre">Settings</span></code> or <code class="docutils literal notranslate"><span class="pre">CPU</span> <span class="pre">Configuration</span></code>.</p></li>
</ol>
<p>or</p>
<ol class="arabic simple" start="4">
<li><p>Alternatively, some BIOS versions allow you to search for settings. Look for a search bar or a similar feature where you can type <code class="docutils literal notranslate"><span class="pre">virtualization</span></code> or <code class="docutils literal notranslate"><span class="pre">VT-x</span></code> (for Intel processors) / <code class="docutils literal notranslate"><span class="pre">AMD-V</span></code> (for AMD processors).</p></li>
</ol>
<figure class="align-center" id="id2">
<a class="reference internal image-reference" href="_images/B3.jpg"><img alt="_images/B3.jpg" src="_images/B3.jpg" style="width: 900px;" /></a>
<figcaption>
<p><span class="caption-text">BIOS settings screen.</span><a class="headerlink" href="#id2" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Once you locate the virtualization options within these sections, you can proceed to enable them. This step is crucial for utilizing virtualization features such as running virtual machines or other virtualization-based applications on your computer. After making the necessary changes, remember to save your settings and exit the BIOS.</p>
<ol class="arabic simple" start="5">
<li><p>Change the setting from <code class="docutils literal notranslate"><span class="pre">Disabled</span></code> to <code class="docutils literal notranslate"><span class="pre">Enabled</span></code> using the appropriate key (usually <code class="docutils literal notranslate"><span class="pre">Enter</span></code> or the <code class="docutils literal notranslate"><span class="pre">+</span></code> key).</p></li>
<li><p>Save changes and exit BIOS</p></li>
</ol>
<figure class="align-center" id="id3">
<a class="reference internal image-reference" href="_images/B2.jpg"><img alt="_images/B2.jpg" src="_images/B2.jpg" style="width: 900px;" /></a>
<figcaption>
<p><span class="caption-text">Turn on Virtualization.</span><a class="headerlink" href="#id3" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Your computer will restart with virtualization support enabled.</p>
</section>
<section id="install-wsl">
<h2>Install WSL<a class="headerlink" href="#install-wsl" title="Permalink to this heading"></a></h2>
<p>Here are the simplified instructions for installing Windows Subsystem for Linux (WSL) and verifying its installation:</p>
<p><strong>Installing Windows Subsystem for Linux (WSL)</strong></p>
<ol class="arabic simple">
<li><p><strong>Open PowerShell as Administrator</strong></p></li>
<li><p><strong>Install WSL:</strong>
Run the following command to install WSL: <code class="docutils literal notranslate"><span class="pre">wsl</span> <span class="pre">--install</span></code>.
Follow any prompts or confirmations that appear during the installation process.</p></li>
<li><p><strong>Wait for Installation to Complete:</strong>
Allow the installation process to finish. This may take some time depending on your internet speed.</p></li>
</ol>
<figure class="align-center" id="id4">
<a class="reference internal image-reference" href="_images/W3.png"><img alt="_images/W3.png" src="_images/W3.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Install Windows Subsystem for Linux (WSL)</span><a class="headerlink" href="#id4" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<ol class="arabic simple" start="4">
<li><p><strong>Check WSL Version:</strong>
Run the following command to check the installed WSL versions and their respective distributions: <code class="docutils literal notranslate"><span class="pre">wsl</span> <span class="pre">-l</span> <span class="pre">-v</span></code>
This command lists all installed Linux distributions and their associated WSL versions (<cite>1</cite> or <cite>2</cite>).</p></li>
</ol>
<figure class="align-center" id="id5">
<a class="reference internal image-reference" href="_images/W4.png"><img alt="_images/W4.png" src="_images/W4.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Check if WSL is properly installed</span><a class="headerlink" href="#id5" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Following these steps ensures that you install Windows Subsystem for Linux (WSL) and confirm its proper installation on your Windows system.</p>
</section>
<section id="install-docker-desktop-in-windows">
<h2>Install Docker Desktop in Windows<a class="headerlink" href="#install-docker-desktop-in-windows" title="Permalink to this heading"></a></h2>
<ol class="arabic simple">
<li><p>Download Docker Desktop from <a class="reference external" href="https://www.docker.com/get-started/">Docker’s official website</a> (<a class="reference external" href="https://www.docker.com/get-started/">https://www.docker.com/get-started/</a>).</p></li>
</ol>
<figure class="align-center" id="id6">
<a class="reference internal image-reference" href="_images/W5.png"><img alt="_images/W5.png" src="_images/W5.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Download Docker Desktop online</span><a class="headerlink" href="#id6" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<ol class="arabic simple" start="2">
<li><p>Once downloaded, locate the installer file (e.g., <code class="docutils literal notranslate"><span class="pre">DockerDesktopInstaller.exe</span></code>) and double-click to launch it.</p></li>
<li><p>Follow the prompts provided by the Docker Desktop installer to complete the installation process. This may involve accepting terms and conditions and choosing installation preferences.</p></li>
</ol>
<figure class="align-center" id="id7">
<a class="reference internal image-reference" href="_images/W6.png"><img alt="_images/W6.png" src="_images/W6.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Docker Desktop Installer</span><a class="headerlink" href="#id7" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id8">
<a class="reference internal image-reference" href="_images/W7.png"><img alt="_images/W7.png" src="_images/W7.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Installing Docker Desktop</span><a class="headerlink" href="#id8" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id9">
<a class="reference internal image-reference" href="_images/W8.png"><img alt="_images/W8.png" src="_images/W8.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Finish installing Docker Desktop</span><a class="headerlink" href="#id9" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<ol class="arabic simple" start="4">
<li><p>After installation, a Docker Desktop shortcut will appear on your desktop. The necessary components to run Maxwell-TD Docker images include Docker Desktop itself, Windows PowerShell for running CLI commands, and a designated working folder containing Docker images and user data (e.g., geometry information).</p></li>
</ol>
<figure class="align-center" id="id10">
<a class="reference internal image-reference" href="_images/W9.png"><img alt="_images/W9.png" src="_images/W9.png" style="width: 300px;" /></a>
<figcaption>
<p><span class="caption-text">All the data/folders/apps needed to run Maxwell-TD Docker image</span><a class="headerlink" href="#id10" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<ol class="arabic simple" start="5">
<li><p>Launch Docker Desktop by double-clicking the Docker Desktop shortcut on your desktop.</p></li>
<li><p>Upon first launch, Docker Desktop may prompt you to accept terms and conditions. Agree to proceed with using the application.</p></li>
</ol>
<figure class="align-center" id="id11">
<a class="reference internal image-reference" href="_images/W10.png"><img alt="_images/W10.png" src="_images/W10.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Accept the terms and conditions</span><a class="headerlink" href="#id11" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<ol class="arabic simple" start="7">
<li><p>You can continue without logging into Docker Desktop if prompted, and optionally skip any survey presented during initial setup.</p></li>
</ol>
<figure class="align-center" id="id12">
<a class="reference internal image-reference" href="_images/W11.png"><img alt="_images/W11.png" src="_images/W11.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Continue without logging in</span><a class="headerlink" href="#id12" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id13">
<a class="reference internal image-reference" href="_images/W12.png"><img alt="_images/W12.png" src="_images/W12.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Skip Survey</span><a class="headerlink" href="#id13" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Currently, the local repository in Docker Desktop is empty. To proceed, we must upload the compiled image for Maxwell-TD. This requires using the PowerShell console, as the GUI does not support managing local Docker images directly and defaults to searching online repositories for Docker images.</p>
<figure class="align-center" id="id14">
<a class="reference internal image-reference" href="_images/W13.png"><img alt="_images/W13.png" src="_images/W13.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Image local Repository</span><a class="headerlink" href="#id14" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="import-docker-image">
<h2>Import Docker Image<a class="headerlink" href="#import-docker-image" title="Permalink to this heading"></a></h2>
<p>Next, we need to mount the zipped Docker image onto the Windows system. Since this action cannot be performed using the Docker Desktop GUI, we’ll need to use the console terminal instead.</p>
<p>In the designated working folder, you will find a zipped Docker image file and an “examples” folder containing user-defined data.</p>
<figure class="align-center" id="id15">
<a class="reference internal image-reference" href="_images/W14.png"><img alt="_images/W14.png" src="_images/W14.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Location of Maxwell-TD Docker Image (Zipped)</span><a class="headerlink" href="#id15" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>To load the Docker image, execute the command <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">load</span> <span class="pre">--input</span> <span class="pre">&lt;PATH</span> <span class="pre">to</span> <span class="pre">zipped</span> <span class="pre">docker</span> <span class="pre">image&gt;</span></code>. This process will take some time, and you can verify its completion by using <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">images</span></code> in the console.</p>
<figure class="align-center" id="id16">
<a class="reference internal image-reference" href="_images/W16.png"><img alt="_images/W16.png" src="_images/W16.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Load and check Docker Image</span><a class="headerlink" href="#id16" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>The loaded Docker image will also be visible both in Docker Desktop.</p>
<figure class="align-center" id="id17">
<a class="reference internal image-reference" href="_images/W17.png"><img alt="_images/W17.png" src="_images/W17.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Loaded Docker Image can be seen in Docker Desktop</span><a class="headerlink" href="#id17" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="mounting-user-data-and-running-docker-image">
<h2>Mounting User data and running Docker image<a class="headerlink" href="#mounting-user-data-and-running-docker-image" title="Permalink to this heading"></a></h2>
<p>Finally, we are ready to run the Docker image. You can use a PowerShell script with administrative privileges to execute the Docker image. We have prepared a script file named <code class="docutils literal notranslate"><span class="pre">runDocker.ps1</span></code> that can be executed in the console terminal.</p>
<p>To run the script and start the Docker image, follow these steps:</p>
<ol class="arabic simple">
<li><p><strong>Open PowerShell as Administrator</strong></p></li>
<li><p><strong>Navigate to Script Directory:</strong>
Use the <code class="docutils literal notranslate"><span class="pre">cd</span></code> command to navigate to the directory where <code class="docutils literal notranslate"><span class="pre">runDocker.ps1</span></code> is located.</p></li>
<li><dl class="simple">
<dt><strong>Execute the Script:</strong></dt><dd><ul class="simple">
<li><p>Run the script by typing <code class="docutils literal notranslate"><span class="pre">.\runDocker.ps1</span></code> and press <code class="docutils literal notranslate"><span class="pre">Enter</span></code>.</p></li>
<li><p>The script will mount the folder containing user-defined data into the Docker Server environment.</p></li>
</ul>
</dd>
</dl>
</li>
</ol>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>When running the Docker image, any data saved onto the mounted filesystem will persist. However, other modifications, such as custom installations of packages, will be temporary and will disappear after you exit the Docker session.</p></li>
<li><p>Treat the Docker image as a saved state of a customized environment.</p></li>
</ul>
</div>
<figure class="align-center" id="id18">
<a class="reference internal image-reference" href="_images/W18.png"><img alt="_images/W18.png" src="_images/W18.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Use PowerShell Script to run Docker Image</span><a class="headerlink" href="#id18" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Let’s break down the lines in the PowerShell script to understand the necessary steps for running the Docker image. This will clarify what is needed for execution.</p>
<ul class="simple">
<li><p><strong>$imageName</strong>:</p></li>
</ul>
<p>This variable defines the name of the Docker image that you want to run. In this case, it is set to <code class="docutils literal notranslate"><span class="pre">maxwell_td_image</span></code>. Users should not change this variable if they intend to run Maxwell-TD.</p>
<ul class="simple">
<li><p><strong>$containerName</strong>:</p></li>
</ul>
<p>This variable specifies the name of the container that will run the Docker image. You can run multiple containers from the same image concurrently, so each running instance needs a unique name. Users can customize this variable to suit their naming conventions.</p>
<ul class="simple">
<li><p><strong>$hostVolumePath</strong>:</p></li>
</ul>
<p>This variable holds the path to the working folder on the Windows system. This folder contains essential files such as geometry files for simulation models and scripts for setting simulation parameters. Users must update this path to point to their specific working folder.</p>
<ul class="simple">
<li><p><strong>$containerVolumePath</strong>:</p></li>
</ul>
<p>This variable defines the path within the Docker container (running on Linux environment) where the host volume (<strong>$hostVolumePath</strong>) will be mounted. In this script, it is set to <code class="docutils literal notranslate"><span class="pre">/dgtd/model/</span></code>. It is recommended that users do not change this variable unless necessary, to ensure compatibility with the Docker image’s expected mount point.</p>
<figure class="align-center" id="id19">
<a class="reference internal image-reference" href="_images/W20.png"><img alt="_images/W20.png" src="_images/W20.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">User-defined parameters to change location of User data</span><a class="headerlink" href="#id19" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Next, the script proceeds to execute several commands to display the paths and names. It also checks the CUDA version installed on the Windows device. Afterward, it runs the Docker command <code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span> <span class="pre">--rm</span> <span class="pre">--gpus</span> <span class="pre">all</span> <span class="pre">-it</span> <span class="pre">--name</span> <span class="pre">${containerName}</span> <span class="pre">-v</span> <span class="pre">${hostVolumePath}:${containerVolumePath}</span> <span class="pre">${imageName}</span></code>.</p>
<dl class="simple">
<dt><strong>Explanation of Docker Command Flags</strong></dt><dd><ul class="simple">
<li><p><code class="docutils literal notranslate"><span class="pre">docker</span> <span class="pre">run</span></code>: This command starts a new Docker container.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--rm</span></code>: Automatically removes the container when it exits. Useful for temporary containers.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--gpus</span> <span class="pre">all</span></code>: Enables access to all GPUs in the container.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-it</span></code>: Allocates a pseudo-TTY and keeps stdin open. Allows interactive terminal access.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--name</span> <span class="pre">${containerName}</span></code>: Assigns a name to the container instance based on the value stored in the <code class="docutils literal notranslate"><span class="pre">$containerName</span></code> variable.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-v</span> <span class="pre">${hostVolumePath}:${containerVolumePath}</span></code>: Mounts a volume from the host machine (Windows) into the Docker container. <code class="docutils literal notranslate"><span class="pre">${hostVolumePath}</span></code> is the path on the host system, and <code class="docutils literal notranslate"><span class="pre">${containerVolumePath}</span></code> is the path inside the container where the volume will be mounted.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">${imageName}</span></code>: Specifies the Docker image to use for creating the container.</p></li>
</ul>
</dd>
<dt><strong>Additional Information</strong></dt><dd><ul class="simple">
<li><p>The <code class="docutils literal notranslate"><span class="pre">--rm</span></code> flag ensures that the container is automatically removed after it stops running, helping to manage resources efficiently.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">--gpus</span> <span class="pre">all</span></code> allows the Docker container to access all available GPUs on the host machine, which is crucial for applications that require GPU acceleration.</p></li>
<li><p><code class="docutils literal notranslate"><span class="pre">-it</span></code> enables interactive mode with a terminal session, which is useful for interacting directly with the container if needed.</p></li>
</ul>
</dd>
</dl>
<p>This Docker command, when executed within the PowerShell script, sets up and runs the Docker container named <code class="docutils literal notranslate"><span class="pre">${containerName}</span></code> with GPU support, mounts necessary volumes, and utilizes the specified Docker image <code class="docutils literal notranslate"><span class="pre">${imageName}</span></code> for the Maxwell-TD application. Adjust <code class="docutils literal notranslate"><span class="pre">${containerName}</span></code>, <code class="docutils literal notranslate"><span class="pre">${hostVolumePath}</span></code>, <code class="docutils literal notranslate"><span class="pre">${containerVolumePath}</span></code>, and <code class="docutils literal notranslate"><span class="pre">${imageName}</span></code> as per your specific environment and requirements.</p>
<figure class="align-center" id="id20">
<a class="reference internal image-reference" href="_images/W21.png"><img alt="_images/W21.png" src="_images/W21.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Commands to run Docker image</span><a class="headerlink" href="#id20" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<div class="admonition note">
<p class="admonition-title">Note</p>
<p>When opening a Windows text file in a Unix environment, extra <code class="docutils literal notranslate"><span class="pre">\r</span></code> characters at the end of each line can cause errors such as <code class="docutils literal notranslate"><span class="pre">/bin/bash^M:</span> <span class="pre">bad</span> <span class="pre">interpreter:</span> <span class="pre">No</span> <span class="pre">such</span> <span class="pre">file</span> <span class="pre">or</span> <span class="pre">directory</span></code>. This is because Unix-based systems expect lines to end with <code class="docutils literal notranslate"><span class="pre">\n</span></code> (newline) instead of <code class="docutils literal notranslate"><span class="pre">\r\n</span></code> (carriage return followed by newline) used in Windows.</p>
<p>To fix this issue, you can convert the line endings from Windows format to Unix format using utilities like <code class="docutils literal notranslate"><span class="pre">dos2unix</span></code>, which removes the extra <code class="docutils literal notranslate"><span class="pre">\r</span></code> characters. Alternatively, you can use the included function <code class="docutils literal notranslate"><span class="pre">Remove-CarriageReturns</span></code> in <code class="docutils literal notranslate"><span class="pre">runDocker.ps1</span></code> to process the files. Once corrected, your script should execute correctly within Docker or any Unix-based environment without encountering interpreter errors.</p>
</div>
<figure class="align-center" id="id21">
<a class="reference internal image-reference" href="_images/W19.png"><img alt="_images/W19.png" src="_images/W19.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Miscellaneous function to treat textfiles from Windows System (Optional)</span><a class="headerlink" href="#id21" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>To run the script, navigate to the directory where <code class="docutils literal notranslate"><span class="pre">runDocker.ps1</span></code> is located and execute <code class="docutils literal notranslate"><span class="pre">./runDocker.ps1</span></code>. The script will display the CUDA toolkit version and open a BASH shell in the Docker container with <code class="docutils literal notranslate"><span class="pre">maxwell_td_image</span></code>. This environment simulates a Linux environment.</p>
<figure class="align-center" id="id22">
<a class="reference internal image-reference" href="_images/W27.png"><img alt="_images/W27.png" src="_images/W27.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Running PowerShell Script</span><a class="headerlink" href="#id22" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="how-to-use-maxwell-td">
<h2>How to use Maxwell-TD<a class="headerlink" href="#how-to-use-maxwell-td" title="Permalink to this heading"></a></h2>
<p>Upon starting the Docker container, you will be in the <code class="docutils literal notranslate"><span class="pre">/dgtd/</span></code> directory, where the Discontinuous Galerkin Time-Domain (DGTD) code is located. The compiled code can be found in the <code class="docutils literal notranslate"><span class="pre">/dgtd/build/</span></code> directory, with the executables named <code class="docutils literal notranslate"><span class="pre">maxwelltd_CUDA_LTS_DOUBLEpre_FLOATpro</span></code> and <code class="docutils literal notranslate"><span class="pre">maxwelltd_CUDA_LTS_DOUBLEpre_FLOATpro-</span></code>. User data, mounted from the Windows filesystem, is available in the <code class="docutils literal notranslate"><span class="pre">/dgtd/model/</span></code> directory. Before running the simulation, the compiled executable must be copied to the simulation folder (<code class="docutils literal notranslate"><span class="pre">/dgtd/model/MaxwellTD_data/</span></code>). This can be done by executing the following command:</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>cp /dgtd/build/maxwelltd_CUDA_LTS_DOUBLEpre_FLOATpro* /dgtd/model/MaxwellTD_data/
</pre></div>
</div>
<figure class="align-center" id="id23">
<a class="reference internal image-reference" href="_images/W29.png"><img alt="_images/W29.png" src="_images/W29.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Local Directory in Docker Image</span><a class="headerlink" href="#id23" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Simulation files for the MaxwellTD model are located in the directory <code class="docutils literal notranslate"><span class="pre">/dgtd/model/MaxwellTD_data</span></code>. Additionally, we have included CST reference data for the same simulation model in the folder <code class="docutils literal notranslate"><span class="pre">CST_data</span></code>. A Python script named <code class="docutils literal notranslate"><span class="pre">compare_maxwelltd_CST.py</span></code> has been provided to facilitate extraction and comparison of data between the DGTD simulation and CST data.</p>
<figure class="align-center" id="id24">
<a class="reference internal image-reference" href="_images/W31a.png"><img alt="_images/W31a.png" src="_images/W31a.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Simulation folder</span><a class="headerlink" href="#id24" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>To run the DGTD simulation, we can navigate to <code class="docutils literal notranslate"><span class="pre">/dgtd/model/MaxwellTD_data/</span></code> and run the shell script <code class="docutils literal notranslate"><span class="pre">CUDA_LTS_RUN.sh</span></code>.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>./CUDA_LTS_RUN.sh
</pre></div>
</div>
<figure class="align-center" id="id25">
<a class="reference internal image-reference" href="_images/W45.png"><img alt="_images/W45.png" src="_images/W45.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Running Simulation script</span><a class="headerlink" href="#id25" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>This will initiate the DGTD simulation.</p>
<figure class="align-center" id="id26">
<a class="reference internal image-reference" href="_images/W46.png"><img alt="_images/W46.png" src="_images/W46.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Simulating running</span><a class="headerlink" href="#id26" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id27">
<a class="reference internal image-reference" href="_images/W47.png"><img alt="_images/W47.png" src="_images/W47.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">End of simulation</span><a class="headerlink" href="#id27" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Following the completion of the simulation, you can execute the Python script <code class="docutils literal notranslate"><span class="pre">compare_maxwelltd_CST.py</span></code> to compare the results with those obtained from the CST simulation.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span>python3 compare_maxwelltd_CST.py
</pre></div>
</div>
<figure class="align-center" id="id28">
<a class="reference internal image-reference" href="_images/W49.png"><img alt="_images/W49.png" src="_images/W49.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Running post-processing PYTHON script</span><a class="headerlink" href="#id28" title="Permalink to this image"></a></p>
</figcaption>
</figure>
</section>
<section id="common-issues">
<h2>Common issues<a class="headerlink" href="#common-issues" title="Permalink to this heading"></a></h2>
<section id="incompatible-gpu-drivers-toolkit">
<h3>Incompatible GPU drivers/toolkit<a class="headerlink" href="#incompatible-gpu-drivers-toolkit" title="Permalink to this heading"></a></h3>
<p>It’s essential to verify that your Windows device has the correct CUDA toolkit installed to run Maxwell-TD. You can check the CUDA toolkit version by using ‘nvidia-smi’ in the console terminal. The minimum required version to run Maxwell-TD is CUDA toolkit 12.4.</p>
<figure class="align-center" id="id29">
<a class="reference internal image-reference" href="_images/W22.png"><img alt="_images/W22.png" src="_images/W22.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Check CUDA toolkit version</span><a class="headerlink" href="#id29" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>If you need to update your CUDA toolkit, you can visit the <a class="reference external" href="https://developer.nvidia.com/cuda-toolkit">NVIDIA website</a> (<a class="reference external" href="https://developer.nvidia.com/cuda-toolkit">https://developer.nvidia.com/cuda-toolkit</a>). Click on ‘NVIDIA CUDA Toolkit Download’ to access the latest version. Alternatively, if you require an earlier version, you can navigate to ‘Archive of Previous CUDA Releases’ on the NVIDIA website to find the specific CUDA toolkit version you need.</p>
<figure class="align-center" id="id30">
<a class="reference internal image-reference" href="_images/W23.png"><img alt="_images/W23.png" src="_images/W23.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">NVIDIA website to download CUDA toolkit</span><a class="headerlink" href="#id30" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id31">
<a class="reference internal image-reference" href="_images/W24.png"><img alt="_images/W24.png" src="_images/W24.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">NVIDIA CUDA toolkit download</span><a class="headerlink" href="#id31" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id32">
<a class="reference internal image-reference" href="_images/W25.png"><img alt="_images/W25.png" src="_images/W25.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">NVIDIA CUDA toolkit (Latest version)</span><a class="headerlink" href="#id32" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<figure class="align-center" id="id33">
<a class="reference internal image-reference" href="_images/W26.png"><img alt="_images/W26.png" src="_images/W26.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">NVIDIA CUDA toolkit (Earlier versions)</span><a class="headerlink" href="#id33" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Follow the download and installation instructions provided on the NVIDIA website to update or install the CUDA toolkit on your Windows device. This ensures that Maxwell-TD and other CUDA-dependent applications can function correctly.</p>
</section>
<section id="windows-version">
<h3>Windows Version<a class="headerlink" href="#windows-version" title="Permalink to this heading"></a></h3>
<p>Make sure your Windows 10 or 11 system meets the following requirements:</p>
<ul class="simple">
<li><p><strong>WSL Version:</strong> Ensure WSL version 1.1.3.0 or newer.</p></li>
<li><p><strong>Windows 11:</strong> 64-bit Home or Pro version 21H2 or later, or Enterprise or Education version 21H2 or later.</p></li>
<li><p><strong>Windows 10:</strong> 64-bit Home or Pro version 22H2 (build 19045) or later, or Enterprise or Education version 22H2 (build 19045) or later. The minimum supported version is Home or Pro 21H2 (build 19044) or later, or Enterprise or Education 21H2 (build 19044) or later.</p></li>
</ul>
<div class="admonition note">
<p class="admonition-title">Note</p>
<ul class="simple">
<li><p>Docker Desktop on Windows is supported only on versions of Windows that are still actively serviced by Microsoft. It is not compatible with Windows Server versions like Windows Server 2019 or Windows Server 2022.</p></li>
<li><p>Containers and images created with Docker Desktop are shared across all user accounts on the same machine, as they use a common VM for building and running containers. However, sharing containers and images between user accounts is not supported when using the Docker Desktop WSL 2 backend.</p></li>
</ul>
</div>
</section>
<section id="sufficient-memory-to-upload-image">
<h3>Sufficient Memory to upload image<a class="headerlink" href="#sufficient-memory-to-upload-image" title="Permalink to this heading"></a></h3>
<p>Make sure your system has adequate storage space for the image. The current image requires 10GB for storage while zipped. Once extracted, it occupies an additional 10GB on your system, although it remains hidden from regular users. You can view these hidden images and containers using Docker Desktop.</p>
<figure class="align-center" id="id34">
<a class="reference internal image-reference" href="_images/W42.png"><img alt="_images/W42.png" src="_images/W42.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">View all containers or image on Docker Desktop</span><a class="headerlink" href="#id34" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>Users can remove any unwanted images or containers using the ‘delete’ button.</p>
<figure class="align-center" id="id35">
<a class="reference internal image-reference" href="_images/W43.png"><img alt="_images/W43.png" src="_images/W43.png" style="width: 1200px;" /></a>
<figcaption>
<p><span class="caption-text">Delete if not needed to free up space</span><a class="headerlink" href="#id35" title="Permalink to this image"></a></p>
</figcaption>
</figure>
<p>If necessary, resort to command-line operations to reclaim system resources. Execute these commands in a PowerShell console with administrative privileges.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="c1"># Purging All Unused or Dangling Resources</span>
docker system prune
<span class="c1"># Remove stopped containers and all unused images</span>
docker system prune -a
<span class="c1"># Removing Docker Images</span>
<span class="c1">## Remove Specific Images</span>
<span class="c1"># List all images (including intermediate layers)</span>
docker images -a
<span class="c1"># Remove specific image(s) using their ID or tag</span>
docker rmi &lt;image_id_or_name&gt;
<span class="c1">## Remove Dangling Images</span>
<span class="c1"># List dangling images</span>
docker images -f <span class="nv">dangling</span><span class="o">=</span><span class="nb">true</span>
<span class="c1"># Remove dangling images</span>
docker image prune
<span class="c1">## Remove Images Matching a Pattern</span>
<span class="c1"># List images matching a pattern (using grep)</span>
docker images -a <span class="p">|</span> grep <span class="s2">&quot;pattern&quot;</span>
<span class="c1"># Remove images matching a pattern using awk and xargs</span>
docker images -a <span class="p">|</span> grep <span class="s2">&quot;pattern&quot;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $1&quot;:&quot;$2}&#39;</span> <span class="p">|</span> xargs docker rmi
<span class="c1">## Remove All Images</span>
<span class="c1"># Remove all Docker images</span>
docker rmi <span class="k">$(</span>docker images -a -q<span class="k">)</span>
<span class="c1"># Removing Containers</span>
<span class="c1">## Remove Specific Containers</span>
<span class="c1"># List all containers (including stopped ones)</span>
docker ps -a
<span class="c1"># Remove specific container(s)</span>
docker rm &lt;container_id_or_name&gt;
<span class="c1">## Remove All Exited Containers</span>
<span class="c1"># List all exited containers</span>
docker ps -a -f <span class="nv">status</span><span class="o">=</span>exited
<span class="c1"># Remove all exited containers</span>
docker rm <span class="k">$(</span>docker ps -a -f <span class="nv">status</span><span class="o">=</span>exited -q<span class="k">)</span>
<span class="c1">## Remove Containers Matching a Pattern</span>
<span class="c1"># List containers matching a pattern (using grep)</span>
docker ps -a <span class="p">|</span> grep <span class="s2">&quot;pattern&quot;</span>
<span class="c1"># Remove containers matching a pattern using awk and xargs</span>
docker ps -a <span class="p">|</span> grep <span class="s2">&quot;pattern&quot;</span> <span class="p">|</span> awk <span class="s1">&#39;{print $1}&#39;</span> <span class="p">|</span> xargs docker rm
<span class="c1">## Stop and Remove All Containers</span>
<span class="c1"># Stop all containers</span>
docker stop <span class="k">$(</span>docker ps -a -q<span class="k">)</span>
<span class="c1"># Remove all containers</span>
docker rm <span class="k">$(</span>docker ps -a -q<span class="k">)</span>
</pre></div>
</div>
</section>
<section id="bios-settings">
<h3>BIOS settings<a class="headerlink" href="#bios-settings" title="Permalink to this heading"></a></h3>
<p>To enable Docker server virtualization on Windows, it’s crucial to ensure that virtualization is enabled in your computer’s BIOS settings. This setting can only be modified by restarting your machine and accessing the BIOS configuration. Virtualization support in BIOS allows Windows to utilize Docker server features effectively. It’s a necessary step to ensure Docker containers run efficiently on your system.</p>
</section>
<section id="change-simulation-parameters">
<h3>Change Simulation Parameters<a class="headerlink" href="#change-simulation-parameters" title="Permalink to this heading"></a></h3>
<p>To modify simulation parameters, you can edit the <code class="docutils literal notranslate"><span class="pre">CUDA_LTS_RUN.sh</span></code> shell script. This script contains flags or variables that control various aspects of the DGTD simulation. The script includes comments or descriptions to explain the variables’ or flags’ purpose.</p>
<div class="highlight-bash notranslate"><div class="highlight"><pre><span></span><span class="nb">echo</span> <span class="s2">&quot;===========&quot;</span>
<span class="nb">echo</span> <span class="s2">&quot;EXECUTABLE&quot;</span>
<span class="nv">EXE</span><span class="o">=</span><span class="s2">&quot;./maxwelltd_CUDA_LTS_DOUBLEpre_FLOATpro&quot;</span>
<span class="nb">echo</span> <span class="nv">$EXE</span>
<span class="nb">echo</span> <span class="s2">&quot;FileName&quot;</span>
<span class="nb">echo</span> <span class="s2">&quot;===========&quot;</span>
<span class="c1"># 0. [EXE]</span>
<span class="c1"># 1. Filename: Simulation Filename</span>
<span class="c1"># 2. Freq: Central Modulation Frequency (MHz)</span>
<span class="c1"># 3. Planewave Waveform (Excitation Type): (0)Time Harmonic (1)Gauss (2)Neumann (3) Modulated Gauss;</span>
<span class="c1"># 4. Port Waveform (0) Time Harmonic Pulse (1) Gaussian Pulse</span>
<span class="c1"># 5. Tdelay: Delay of excitation pulse (sec)</span>
<span class="c1"># 6. Tau: Width of pulse (sec)</span>
<span class="c1"># 7. FinalTime: Termination Time (sec)</span>
<span class="c1"># 8. Gamma (Penalty) --&gt; 1 upwind , 0 central</span>
<span class="c1"># 9. VTU --&gt; 0 (YES), 1 (NO)</span>
<span class="c1">#10. Surface Field Output BC Surfaces --&gt; (0) Off (1) PEC only (2) FieldPlane only (3) FieldPlane and PEC</span>
<span class="c1">#11. Surface Output Types --&gt; (0) Field (1) Current (2) Field and Current</span>
<span class="c1">#12. Poly order --&gt; (1) First Order (2) Second Order</span>
<span class="c1">#13. Free Space Comparison(Analytical): (0) True and (1) False</span>
<span class="c1">#14. SAMPLINGRATE : parameter of Pade approximation</span>
<span class="c1">#15. PADE : (0) Pade mode is Off (2) Pade mode is on</span>
<span class="nv">FILENAME</span><span class="o">=</span>cylinder_cr1.75
<span class="nv">FREQ</span><span class="o">=</span><span class="m">2650</span>
<span class="nv">PLANEWAVEFLAG</span><span class="o">=</span><span class="m">1</span>
<span class="nv">PORTFLAG</span><span class="o">=</span><span class="m">1</span>
<span class="nv">TD</span><span class="o">=</span><span class="m">2</span>.5e-9
<span class="nv">TAU</span><span class="o">=</span><span class="m">2</span>.5e-10
<span class="nv">FINALTIME</span><span class="o">=</span>25e-8
<span class="nv">GAMMA</span><span class="o">=</span><span class="m">0</span>.025
<span class="nv">VTU</span><span class="o">=</span><span class="m">1</span>
<span class="nv">SURFFIELDOUTBCSURFS</span><span class="o">=</span><span class="m">0</span>
<span class="nv">SURFOUTTYPES</span><span class="o">=</span><span class="m">0</span>
<span class="nv">POLYORDER</span><span class="o">=</span><span class="m">2</span>
<span class="nv">ANALYTICAL</span><span class="o">=</span><span class="m">1</span>
<span class="nv">SAMPLINGRATE</span><span class="o">=</span><span class="m">12</span>.5
<span class="nv">PADE</span><span class="o">=</span><span class="m">2</span>
rm *.log
rm *.vtu
rm AnalyticalIncidentField*
rm Probes_*
rm *.TD*
rm -r ./TimeDomainVoltages
<span class="nv">$EXE</span> <span class="nv">$FILENAME</span> <span class="nv">$FREQ</span> <span class="nv">$PLANEWAVEFLAG</span> <span class="nv">$PORTFLAG</span> <span class="nv">$TD</span> <span class="nv">$TAU</span> <span class="nv">$FINALTIME</span> <span class="nv">$GAMMA</span> <span class="nv">$VTU</span> <span class="nv">$SURFFIELDOUTBCSURFS</span> <span class="nv">$SURFOUTTYPES</span> <span class="nv">$POLYORDER</span> <span class="nv">$ANALYTICAL</span> <span class="nv">$SAMPLINGRATE</span> <span class="nv">$PADE</span> <span class="p">|</span> tee -a compute.log
rm -r ./VTU_LTS
mkdir ./VTU_LTS
mv *.vtu ./VTU_LTS
rm -r ./PROBES
mkdir ./PROBES
mv *.csv ./PROBES
mv *.TD* ./PROBES
mv *.log ./PROBES
</pre></div>
</div>
</section>
</section>
</section>
</div>
</div>
<footer><div class="rst-footer-buttons" role="navigation" aria-label="Footer">
<a href="build.html" class="btn btn-neutral float-left" title="Docker Engine" accesskey="p" rel="prev"><span class="fa fa-arrow-circle-left" aria-hidden="true"></span> Previous</a>
</div>
<hr/>
<div role="contentinfo">
<p>&#169; Copyright 2024.</p>
</div>
Built with <a href="https://www.sphinx-doc.org/">Sphinx</a> using a
<a href="https://github.com/readthedocs/sphinx_rtd_theme">theme</a>
provided by <a href="https://readthedocs.org">Read the Docs</a>.
</footer>
</div>
</div>
</section>
</div>
<script>
jQuery(function () {
SphinxRtdTheme.Navigation.enable(true);
});
</script>
</body>
</html>

Binary file not shown.

After

Width:  |  Height:  |  Size: 984 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 941 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 1.0 MiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 68 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 47 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 23 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 144 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 27 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 64 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 66 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 17 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 182 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 39 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 54 KiB

Binary file not shown.

After

Width:  |  Height:  |  Size: 75 KiB

Some files were not shown because too many files have changed in this diff Show More

Loading…
Cancel
Save