Skip to content

Commit

Permalink
build based on 769a6b1
Browse files Browse the repository at this point in the history
  • Loading branch information
Documenter.jl committed Nov 15, 2024
1 parent dbe3b02 commit 1333b31
Show file tree
Hide file tree
Showing 6 changed files with 6 additions and 6 deletions.
2 changes: 1 addition & 1 deletion dev/.documenter-siteinfo.json
Original file line number Diff line number Diff line change
@@ -1 +1 @@
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-14T21:54:01","documenter_version":"1.8.0"}}
{"documenter":{"julia_version":"1.11.1","generation_timestamp":"2024-11-15T01:39:28","documenter_version":"1.8.0"}}
4 changes: 2 additions & 2 deletions dev/api/index.html

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion dev/index.html
Original file line number Diff line number Diff line change
Expand Up @@ -17,4 +17,4 @@
| | gsev!() | TGLF | |
| | | robust, | |
| | | thread scales! | |
+--------------+---------+-----------------+-------------------+</code></pre><p>To run top left, set the InputTJLF SMALL parameter = 0.0, set FIND<em>EIGEN = False&lt;br&gt; To run mid left, use the default InputTJLF SMALL parameter = 1e-13&lt;br&gt; To run top right, set the InputTJLF SMALL parameter = 0.0, set FIND</em>EIGEN = True&lt;br&gt;</p><h1 id="Arpack.jl"><a class="docs-heading-anchor" href="#Arpack.jl">Arpack.jl</a><a id="Arpack.jl-1"></a><a class="docs-heading-anchor-permalink" href="#Arpack.jl" title="Permalink"></a></h1><p>NOTE, If you are getting:&lt;br&gt; &lt;pre&gt; Error: XYAUPD_Exception: Maximum number of iterations taken. All possible eigenvalues of OP has been found.&lt;br&gt; │ IPARAM(5) returns the number of wanted converged Ritz values.&lt;br&gt; │ info = 1&lt;/pre&gt;</p><p>Make sure you are using Arpack v0.5.3 and NOT v0.5.4, the current version does not work. You might have to restart your Julia enviroment, activate TJLF, and <strong>build</strong>.</p><p>Also, Arpack.jl&#39;s eigs() is <strong>NOT</strong> thread safe. I have locks in the code to keep things safe. In the future, GenericArpack.jl should provide a pure Julia version of the Arpack algorithm that is thread safe, but it is still under development and seems to be a ways off.</p><h1 id="Indices-of-Arrays"><a class="docs-heading-anchor" href="#Indices-of-Arrays">Indices of Arrays</a><a id="Indices-of-Arrays-1"></a><a class="docs-heading-anchor-permalink" href="#Indices-of-Arrays" title="Permalink"></a></h1><p>There are some 3D and 5D arrays where the indices are not obvious. They are specified in the function comments where they appear, but I will repeat them here:&lt;br&gt; &lt;pre&gt;QL<em>weights::Array{5} - [field, species, mode, ky, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;flux</em>spectrum::Array{5} - [field, species, mode, ky, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;eigenvalue::Array{3} - [mode, ky, type]&lt;br&gt; type: (gamma, frequency)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;QL<em>flux</em>out::Array{3} - [field, species, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;&quot;Output of run_tjlf()&quot;::Array{2} - [species, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;species: 1 = electron, 2+ = ions&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;modes: 1 = most unstable&lt;/pre&gt; The order of the indices try to take advantage of Julia&#39;s column major memory usage</p><h1 id="Multithreading"><a class="docs-heading-anchor" href="#Multithreading">Multithreading</a><a id="Multithreading-1"></a><a class="docs-heading-anchor-permalink" href="#Multithreading" title="Permalink"></a></h1><p>If you are multithreading, make sure BLAS.set<em>num</em>threads(1) is set at some point.</p><h1 id="Bash-Folder"><a class="docs-heading-anchor" href="#Bash-Folder">Bash Folder</a><a id="Bash-Folder-1"></a><a class="docs-heading-anchor-permalink" href="#Bash-Folder" title="Permalink"></a></h1><p>Wrote a Bash script for testing how number of threads affects speed. Currently it is testing on the seven radial points Tim gave me found in outputs/TIM_test/. You call the executable followed by command line arguements. If you give one number, it gives you the @btime with that number of threads. If you give two numbers, it gives you the @btime looping through those two numbers. If you give three or more numbers, it gives you the @btime for each number in the arguments. I currently don&#39;t have any implementation to test the threading speed on other test cases, but you can pretty easily copy my Julia script to meet whatever you need.</p><h1 id="Other-Notes-from-DSUN"><a class="docs-heading-anchor" href="#Other-Notes-from-DSUN">Other Notes from DSUN</a><a id="Other-Notes-from-DSUN-1"></a><a class="docs-heading-anchor-permalink" href="#Other-Notes-from-DSUN" title="Permalink"></a></h1><p>For SAT0, TM() does not return the value of QL<em>weights (aka &quot;QL</em>flux<em>spectrum</em>out&quot; in TGLF) and instead returns the value of what TGLF refers to as flux<em>spectrum</em>out. This is because the saturation rule calculation is done in a different place (LS.jl instead of multiscale<em>spectrum.jl), and otherwise, I would have to pass this extra Array through multiple functions just for SAT0 which is tedious and ugly. Plus SAT0 isn&#39;t really used apparently. So, if you are trying to compare the QL</em>weights for a SAT0 run, make sure you keep this in mind.</p><p>The name of the SaturationParameters struct is probably not a great struct name since it doesn&#39;t really relate to the saturation rules at all and instead are more related to the Miller Geometry, not sure what a better name would be since OutputGeometry is already used.</p><p>Currently, InputTJLF&#39;s IFLUX parameter tells the code whether it is going to calculate eigenvectors. This is bad and I should probably change it into a local variable instead of a struct parameter. Ran into an issue multithreading with onePass() since it changes IFLUX in the middle of its function. The code is currently fixed with an extra &quot;find_eigenvector&quot; variable, but this should just be the standard IMO. I will try and implement this before I leave and delete the IFLUX parameter, but if this is still in the README I have not done it yet.</p><h2 id="Online-documentation"><a class="docs-heading-anchor" href="#Online-documentation">Online documentation</a><a id="Online-documentation-1"></a><a class="docs-heading-anchor-permalink" href="#Online-documentation" title="Permalink"></a></h2><p>For more details, see the <a href="https://projecttorreypines.github.io/TJLF.jl/dev">online documentation</a>.</p><p><img src="https://github.com/ProjectTorreyPines/TJLF.jl/actions/workflows/make_docs.yml/badge.svg" alt="Docs"/></p><h2 id="Citation"><a class="docs-heading-anchor" href="#Citation">Citation</a><a id="Citation-1"></a><a class="docs-heading-anchor-permalink" href="#Citation" title="Permalink"></a></h2><p>If this software contributes to an academic publication, please cite it as follows:</p><blockquote><p>T.F. Neiser, D. Sun, B. Agnew, T. Slendebroek, O. Meneghini, B.C. Lyons, A. Ghiozzi, J. McClenaghan, G. Staebler and J. Candy, <em>TJLF: The quasi-linear model of gyrokinetic transport TGLF translated to Julia</em>, APS Meeting Abstracts (2024)</p></blockquote></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api/">API Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Thursday 14 November 2024 21:54">Thursday 14 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
+--------------+---------+-----------------+-------------------+</code></pre><p>To run top left, set the InputTJLF SMALL parameter = 0.0, set FIND<em>EIGEN = False&lt;br&gt; To run mid left, use the default InputTJLF SMALL parameter = 1e-13&lt;br&gt; To run top right, set the InputTJLF SMALL parameter = 0.0, set FIND</em>EIGEN = True&lt;br&gt;</p><h1 id="Arpack.jl"><a class="docs-heading-anchor" href="#Arpack.jl">Arpack.jl</a><a id="Arpack.jl-1"></a><a class="docs-heading-anchor-permalink" href="#Arpack.jl" title="Permalink"></a></h1><p>NOTE, If you are getting:&lt;br&gt; &lt;pre&gt; Error: XYAUPD_Exception: Maximum number of iterations taken. All possible eigenvalues of OP has been found.&lt;br&gt; │ IPARAM(5) returns the number of wanted converged Ritz values.&lt;br&gt; │ info = 1&lt;/pre&gt;</p><p>Make sure you are using Arpack v0.5.3 and NOT v0.5.4, the current version does not work. You might have to restart your Julia enviroment, activate TJLF, and <strong>build</strong>.</p><p>Also, Arpack.jl&#39;s eigs() is <strong>NOT</strong> thread safe. I have locks in the code to keep things safe. In the future, GenericArpack.jl should provide a pure Julia version of the Arpack algorithm that is thread safe, but it is still under development and seems to be a ways off.</p><h1 id="Indices-of-Arrays"><a class="docs-heading-anchor" href="#Indices-of-Arrays">Indices of Arrays</a><a id="Indices-of-Arrays-1"></a><a class="docs-heading-anchor-permalink" href="#Indices-of-Arrays" title="Permalink"></a></h1><p>There are some 3D and 5D arrays where the indices are not obvious. They are specified in the function comments where they appear, but I will repeat them here:&lt;br&gt; &lt;pre&gt;QL<em>weights::Array{5} - [field, species, mode, ky, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;flux</em>spectrum::Array{5} - [field, species, mode, ky, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;eigenvalue::Array{3} - [mode, ky, type]&lt;br&gt; type: (gamma, frequency)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;QL<em>flux</em>out::Array{3} - [field, species, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;&quot;Output of run_tjlf()&quot;::Array{2} - [species, type]&lt;br&gt; type: (particle, energy, torodial stress, parallel stress, exchange)&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;species: 1 = electron, 2+ = ions&lt;/pre&gt;&lt;br&gt; &lt;pre&gt;modes: 1 = most unstable&lt;/pre&gt; The order of the indices try to take advantage of Julia&#39;s column major memory usage</p><h1 id="Multithreading"><a class="docs-heading-anchor" href="#Multithreading">Multithreading</a><a id="Multithreading-1"></a><a class="docs-heading-anchor-permalink" href="#Multithreading" title="Permalink"></a></h1><p>If you are multithreading, make sure BLAS.set<em>num</em>threads(1) is set at some point.</p><h1 id="Bash-Folder"><a class="docs-heading-anchor" href="#Bash-Folder">Bash Folder</a><a id="Bash-Folder-1"></a><a class="docs-heading-anchor-permalink" href="#Bash-Folder" title="Permalink"></a></h1><p>Wrote a Bash script for testing how number of threads affects speed. Currently it is testing on the seven radial points Tim gave me found in outputs/TIM_test/. You call the executable followed by command line arguements. If you give one number, it gives you the @btime with that number of threads. If you give two numbers, it gives you the @btime looping through those two numbers. If you give three or more numbers, it gives you the @btime for each number in the arguments. I currently don&#39;t have any implementation to test the threading speed on other test cases, but you can pretty easily copy my Julia script to meet whatever you need.</p><h1 id="Other-Notes-from-DSUN"><a class="docs-heading-anchor" href="#Other-Notes-from-DSUN">Other Notes from DSUN</a><a id="Other-Notes-from-DSUN-1"></a><a class="docs-heading-anchor-permalink" href="#Other-Notes-from-DSUN" title="Permalink"></a></h1><p>For SAT0, TM() does not return the value of QL<em>weights (aka &quot;QL</em>flux<em>spectrum</em>out&quot; in TGLF) and instead returns the value of what TGLF refers to as flux<em>spectrum</em>out. This is because the saturation rule calculation is done in a different place (LS.jl instead of multiscale<em>spectrum.jl), and otherwise, I would have to pass this extra Array through multiple functions just for SAT0 which is tedious and ugly. Plus SAT0 isn&#39;t really used apparently. So, if you are trying to compare the QL</em>weights for a SAT0 run, make sure you keep this in mind.</p><p>The name of the SaturationParameters struct is probably not a great struct name since it doesn&#39;t really relate to the saturation rules at all and instead are more related to the Miller Geometry, not sure what a better name would be since OutputGeometry is already used.</p><p>Currently, InputTJLF&#39;s IFLUX parameter tells the code whether it is going to calculate eigenvectors. This is bad and I should probably change it into a local variable instead of a struct parameter. Ran into an issue multithreading with onePass() since it changes IFLUX in the middle of its function. The code is currently fixed with an extra &quot;find_eigenvector&quot; variable, but this should just be the standard IMO. I will try and implement this before I leave and delete the IFLUX parameter, but if this is still in the README I have not done it yet.</p><h2 id="Online-documentation"><a class="docs-heading-anchor" href="#Online-documentation">Online documentation</a><a id="Online-documentation-1"></a><a class="docs-heading-anchor-permalink" href="#Online-documentation" title="Permalink"></a></h2><p>For more details, see the <a href="https://projecttorreypines.github.io/TJLF.jl/dev">online documentation</a>.</p><p><img src="https://github.com/ProjectTorreyPines/TJLF.jl/actions/workflows/make_docs.yml/badge.svg" alt="Docs"/></p><h2 id="Citation"><a class="docs-heading-anchor" href="#Citation">Citation</a><a id="Citation-1"></a><a class="docs-heading-anchor-permalink" href="#Citation" title="Permalink"></a></h2><p>If this software contributes to an academic publication, please cite it as follows:</p><blockquote><p>T.F. Neiser, D. Sun, B. Agnew, T. Slendebroek, O. Meneghini, B.C. Lyons, A. Ghiozzi, J. McClenaghan, G. Staebler and J. Candy, <em>TJLF: The quasi-linear model of gyrokinetic transport TGLF translated to Julia</em>, APS Meeting Abstracts (2024)</p></blockquote></article><nav class="docs-footer"><a class="docs-footer-nextpage" href="api/">API Reference »</a><div class="flexbox-break"></div><p class="footer-message">Powered by <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> and the <a href="https://julialang.org/">Julia Programming Language</a>.</p></nav></div><div class="modal" id="documenter-settings"><div class="modal-background"></div><div class="modal-card"><header class="modal-card-head"><p class="modal-card-title">Settings</p><button class="delete"></button></header><section class="modal-card-body"><p><label class="label">Theme</label><div class="select"><select id="documenter-themepicker"><option value="auto">Automatic (OS)</option><option value="documenter-light">documenter-light</option><option value="documenter-dark">documenter-dark</option><option value="catppuccin-latte">catppuccin-latte</option><option value="catppuccin-frappe">catppuccin-frappe</option><option value="catppuccin-macchiato">catppuccin-macchiato</option><option value="catppuccin-mocha">catppuccin-mocha</option></select></div></p><hr/><p>This document was generated with <a href="https://github.com/JuliaDocs/Documenter.jl">Documenter.jl</a> version 1.8.0 on <span class="colophon-date" title="Friday 15 November 2024 01:39">Friday 15 November 2024</span>. Using Julia version 1.11.1.</p></section><footer class="modal-card-foot"></footer></div></div></div></body></html>
Loading

0 comments on commit 1333b31

Please sign in to comment.