Skip to content

Add software list page (needs json file) #943

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Draft
wants to merge 2 commits into
base: master
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions software/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@ Software
.. toctree::
:maxdepth: 2

software_list/index
software-news
analytics/index
python/index
Expand Down
91 changes: 91 additions & 0 deletions software/software_list/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,91 @@
.. _software_list:

OLCF Software List
******************

OLCF provides a wide range of software modules for use on its systems.
See the `Module Usage Example`_ below for more information on how to use module commands.

.. raw:: html
:file: software_list_group.html

|
.. _Module Usage Example:

**Module Usage Example**

Missing software? If there is a software package you would like, please let us
know by `submitting a ticket <https://www.olcf.ornl.gov/for-users/getting-started/submit-ticket/>`_.

* To search for a package: ``module spider <package>``
* To get a list of prerequisite modules: ``module spider <package>/<version>``
* To get package information after loading prerequisites: ``module help <package>/<version>``

For example, to find an adaptive mesh refinement packages, search for ``amr``.
The search returns that the ``amrex`` package is available on several systems.
To find out how to use the package, log onto one of the systems, ``module spider
amrex`` and ``module spider amrex/22.11-gpu-mpi`` using the desired
version. This will list any modules that may need to be preloaded to access the
package. Once the dependencies are loaded, the package can be loaded with
``module load amrex/22.11-gpu-mpi``.

.. code:: bash

$ module spider amrex
amrex:
Versions:
amrex/22.05-mpi
amrex/22.11-gpu-mpi
amrex/24.05-gpu-mpi
amrex/24.05-mpi
For detailed information about a specific module use the modules full name.
For example:
$ module spider Foo/1.2.3

$ module spider amrex/22.11-gpu-mpi
amrex:
You will need to load all module(s) on one of the lines below before the 'amrex/22.11-gpu-mpi' module is available to load.
amd/5.7.1 rocm/5.7.1 cray-mpich/8.1.28
cce/17.0.0 rocm/5.7.1 cray-mpich/8.1.28
gcc/12.3 rocm/5.7.1 cray-mpich/8.1.28

# Load the prerequisites
$ module load cce/17.0.0 rocm/5.7.1 cray-mpich/8.1.28
# Load amrex
$ module load amrex/22.11-gpu-mpi

# General package informatiom
$ module help amrex/22.11-gpu-mpi
Name : amrex
Version: 22.11
Target : zen3
AMReX is a publicly available software framework designed for building
massively parallel block- structured adaptive mesh refinement (AMR)
applications.

# Details about how this package was configured and installed
$ module show amrex/22.11-gpu-mpi
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
/sw/borg/spack-envs/modules/cce/17.0.0/cray-mpich-8.1.28/rocm-5.7.1/cce-17.0.0/amrex/22.11-gpu-mpi.lua:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------
whatis("Name : amrex")
whatis("Version : 22.11")
whatis("Target : zen3")
whatis("Short description : AMReX is a publicly available software framework designed for building massively parallel block- structured adaptive mesh refinement (AMR) app\
lications.")
whatis("Configure options : -DUSE_XSDK_DEFAULTS=ON -DAMReX_SPACEDIM:STRING=3 -DBUILD_SHARED_LIBS:BOOL=OFF -DAMReX_MPI:BOOL=ON -DAMReX_OMP:BOOL=OFF -DXSDK_PRECISION:STRING\
=DOUBLE -DXSDK_ENABLE_Fortran:BOOL=OFF -DAMReX_FORTRAN_INTERFACES:BOOL=OFF -DAMReX_EB:BOOL=OFF -DAMReX_LINEAR_SOLVERS:BOOL=ON -DAMReX_AMRDATA:BOOL=OFF -DAMReX_PARTICLES:B\
OOL=ON -DAMReX_PLOTFILE_TOOLS:BOOL=OFF -DAMReX_TINY_PROFILE:BOOL=OFF -DAMReX_HDF5:BOOL=OFF -DAMReX_HYPRE:BOOL=OFF -DAMReX_PETSC:BOOL=OFF -DAMReX_SUNDIALS:BOOL=OFF -DAMReX\
_PIC:BOOL=OFF -DCMAKE_CXX_COMPILER=/opt/rocm-5.7.1/hip/bin/hipcc -DAMReX_GPU_BACKEND=HIP -DAMReX_AMD_ARCH=gfx90a")
help([[Name : amrex]])
help([[Version: 22.11]])
help([[Target : zen3]])
]])
help([[AMReX is a publicly available software framework designed for building
massively parallel block- structured adaptive mesh refinement (AMR)
applications.]])
prepend_path("LD_LIBRARY_PATH","/sw/borg/spack-envs/cpe23.12-gpu/opt/cce-17.0.0/amrex-22.11-xqkqdmrxybw5baodxr3dpqmg3z2rzjkl/lib")
prepend_path("CMAKE_PREFIX_PATH","/sw/borg/spack-envs/cpe23.12-gpu/opt/cce-17.0.0/amrex-22.11-xqkqdmrxybw5baodxr3dpqmg3z2rzjkl/.")
prepend_path("CMAKE_PREFIX_PATH","/sw/borg/spack-envs/cpe23.12-gpu/opt/cce-17.0.0/amrex-22.11-xqkqdmrxybw5baodxr3dpqmg3z2rzjkl/.")
prepend_path("LD_LIBRARY_PATH","/opt/rocm-5.7.1/llvm/lib")
setenv("OLCF_AMREX_ROOT","/sw/borg/spack-envs/cpe23.12-gpu/opt/cce-17.0.0/amrex-22.11-xqkqdmrxybw5baodxr3dpqmg3z2rzjkl")
112 changes: 112 additions & 0 deletions software/software_list/software_list_group.html
Original file line number Diff line number Diff line change
@@ -0,0 +1,112 @@
<div style="overflow-x:auto;">
<table id="swtable" class="display" style="width:100%">
<thead>
<tr>
<th></th>
<th>Name</th>
<th>System</th>
<th>Description</th>
</tr>
</thead>
<tfoot>
<tr>
<th></th>
<th>Name</th>
<th>System</th>
<th>Description</th>
</tr>
</tfoot>
</table>
</div>

<style>
/* Apply table layout fixed to ensure cell height is respected */
#swtable {
table-layout: fixed; /* Make the table cells respect the height setting */
width: 100%; /* Ensures the table takes the full width */
}

td {
vertical-align: middle; /* Align content vertically in the middle */
}

.dataTables_filter {
float: left !important;
}
</style>

<script type="text/javascript">

// Function to escape HTML to prevent XSS
function escapeHTML(str) {
let div = document.createElement('div');
div.appendChild(document.createTextNode(str));
return div.innerHTML;
}

// Function to validate URLs to prevent malicious links
function isValidURL(url) {
try {
let parsed = new URL(url);
return parsed.protocol === 'http:' || parsed.protocol === 'https:';
} catch (e) {
return false;
}
}

// Formatting function for row details
function format(d) {
// `d` is the original data object for the row
let retstr =
'<dl>' +
'<dt>Software Package:</dt>' +
'<dd>' +
'Name: ' + d.name + '<br />' +
'System: ' + d.system + '<br />' +
(d.description != 'None' ? 'Description: ' + escapeHTML(d.description) + '<br />' : '') +
(isValidURL(d.homepage) ? 'Homepage: ' + '<a href=\"'+escapeHTML(d.homepage)+'\" target=\"_blank\">'+escapeHTML(d.homepage)+'</a>' + '<br />' : '') +
(d.tags != 'None' ? 'Tags: ' + d.tags + '<br />' : '') +
'</dd>' +
'<dt>Available versions:</dt>' +
'<dd>' + d.nameVersion + '<br />' + '</dd>'
'</dl>'
return retstr;
}

let table = new DataTable('#swtable', {
// Note: This json file exists in the OLCF Sphinx backend infrastructure
// Elsewhere it will not exist, the table will be blank, and an error will be thrown
ajax: 'software_list_group.json',
columns: [
{
className: 'dt-control',
orderable: false,
data: null,
defaultContent: ''
},
{ data: 'name' },
{ data: 'system' },
{ data: 'description' }
],
order: [[1, 'asc']],
layout: {
top2Start: 'search',
topEnd: ''
}
});

// Add event listener for opening and closing details
table.on('click', 'td.dt-control', function (e) {
let tr = e.target.closest('tr');
let row = table.row(tr);

if (row.child.isShown()) {
// This row is already open - close it
row.child.hide();
}
else {
// Open this row
row.child(format(row.data())).show();
}
});
</script>