Skip to content

Commit

Permalink
using easyconfigs in lieu of submodules for openmc
Browse files Browse the repository at this point in the history
  • Loading branch information
LukeLabrie committed Jul 10, 2024
1 parent 90f17c2 commit f694e1b
Show file tree
Hide file tree
Showing 7 changed files with 171 additions and 31 deletions.
30 changes: 30 additions & 0 deletions easybuild/easyconfigs/c/Catch2/Catch2-2.13.10-GCCcore-11.3.0.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
easyblock = 'CMakeMake'

name = 'Catch2'
version = '2.13.10'

homepage = 'https://github.com/catchorg/Catch2'
description = """A modern, C++-native, header-only,
test framework for unit-tests, TDD and BDD
- using C++11, C++14, C++17 and later
"""

toolchain = {'name': 'GCCcore', 'version': '11.3.0'}

source_urls = ['https://github.com/catchorg/Catch2/archive/']
sources = ['v%(version)s.tar.gz']
checksums = ['d54a712b7b1d7708bc7a819a8e6e47b2fde9536f487b89ccbca295072a7d9943']

builddependencies = [
('binutils', '2.38'), # to make CMake compiler health check pass on old systems
('CMake', '3.29.3'),
]

separate_build_dir = True

sanity_check_paths = {
'files': ['include/catch2/catch.hpp'],
'dirs': ['lib/cmake'],
}

moduleclass = 'lib'
20 changes: 20 additions & 0 deletions easybuild/easyconfigs/g/gsl-lite/gsl-lite-0.41.0-foss-2022a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name = 'gsl-lite'
version = '0.41.0'

homepage = 'https://github.com/gsl-lite/gsl-lite'
description = "gsl-lite – A single-file header-only version of ISO C++ Guidelines Support Library (GSL) for C++98, C++11, and later "
software_license_urls = ['https://github.com/gsl-lite/gsl-lite/blob/master/LICENSE']
toolchain = {'name': 'foss', 'version': '2022a'}

source_urls = ['https://github.com/gsl-lite/%(namelower)s/archive']
sources = ['v%(version)s.tar.gz']
checksums = ['4682d8a60260321b92555760be3b9caab60e2a71f95eddbdfb91e557ee93302a']

builddependencies = [('CMake', '3.23.1'),('make','4.3')]

easyblock = 'CMakeMake'

sanity_check_paths = {
'files': ['include/gsl/gsl-lite.hpp','include/gsl-lite/gsl-lite.hpp'],
'dirs': ['include/gsl','include/gsl-lite'],
}
1 change: 0 additions & 1 deletion easybuild/easyconfigs/m/mcpl/mcpl-1.6.2-foss-2022a.eb
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ moduleclass = 'phys'

homepage = 'https://github.com/mctools/mcpl'
description = "Utilities for reading and writing .mcpl files: A binary format with lists of particle state information."
# software_license = 'LicenseCC0'
software_license_urls = ['https://github.com/mctools/mcpl/blob/master/LICENSE']
toolchain = {'name': 'foss', 'version': '2022a'}

Expand Down
26 changes: 12 additions & 14 deletions easybuild/easyconfigs/o/openmc/openmc-0.15.0-foss-2022a-DAGMC-3.2.3.eb
100644 → 100755
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
name = 'openmc'
version = '0.15.0'
versionsuffix = '-DAGMC-3.2.3'
moduleclass = 'phys'

homepage = 'https://openmc.org/'
description = "OpenMC is a community-developed Monte Carlo neutron and photon transport simulation code."
Expand All @@ -10,15 +9,9 @@ software_license = 'LicenseGCC'
software_license_urls = ['https://docs.openmc.org/en/latest/license.html']
toolchain = {'name': 'foss', 'version': '2022a'}

sources = [{
'filename': 'openmc-%(version)s.tar.gz',
'git_config': {
'url': 'https://github.com/openmc-dev',
'repo_name': 'openmc',
'tag': 'v%(version)s',
'recursive':True
},
}]
source_urls = ['https://github.com/openmc-dev/openmc/archive']
sources = ['v%(version)s.tar.gz']
patches = ['openmc-0.15.0_turn_off_submodule_check.patch']
checksums = ['32517c1af1abee615e0b49330fd6eb6d704dd96d903b5b415091aea8aa52bbf0']

builddependencies = [('CMake', '3.23.1'),('make','4.3')]
Expand All @@ -31,15 +24,20 @@ dependencies = [
('matplotlib','3.5.2'),
('lxml','4.9.1'),
('DAGMC','3.2.3'),
('mcpl','1.6.2')
('mcpl','1.6.2'),
('Catch2','3.6.0'),
('fmt','9.1.0'),
('gsl-lite','0.41.0'),
('pugixml','1.12.1'),
('xtensor','0.24.7')
]

easyblock = 'CMakeMake'

configopts = "-DOPENMC_USE_DAGMC=ON -DOPENMC_USE_OPENMP=ON -DOPENMC_USE_MPI=ON -DHDF5_PREFER_PARALLEL=OFF -DOPENMC_USE_MCPL=ON -DOPENMC_USE_UWUW=OFF"
postinstallcmds = ['pip install ../openmc/']
configopts = "-DOPENMC_USE_DAGMC=ON -DOPENMC_USE_OPENMP=ON -DOPENMC_USE_MPI=ON -DHDF5_PREFER_PARALLEL=OFF -DOPENMC_USE_MCPL=ON -DOPENMC_USE_UWUW=OFF -DOPENMC_CHECK_SUBMODULES=OFF"
postinstallcmds = ['pip install ../openmc-%(version)s/']

sanity_check_paths = {
'files': ['bin/openmc'],
'dirs': ['bin','include','lib','share'],
}
}
28 changes: 12 additions & 16 deletions easybuild/easyconfigs/o/openmc/openmc-0.15.0-foss-2022a.eb
Original file line number Diff line number Diff line change
@@ -1,6 +1,5 @@
name = 'openmc'
version = '0.15.0'
moduleclass = 'phys'

homepage = 'https://openmc.org/'
description = "OpenMC is a community-developed Monte Carlo neutron and photon transport simulation code."
Expand All @@ -9,15 +8,9 @@ software_license = 'LicenseGCC'
software_license_urls = ['https://docs.openmc.org/en/latest/license.html']
toolchain = {'name': 'foss', 'version': '2022a'}

sources = [{
'filename': f'openmc-{version}.tar.gz',
'git_config': {
'url': 'https://github.com/openmc-dev',
'repo_name': 'openmc',
'tag': f'v{version}',
'recursive':True
},
}]
source_urls = ['https://github.com/openmc-dev/openmc/archive']
sources = ['v%(version)s.tar.gz']
patches = ['openmc-0.15.0_turn_off_submodule_check.patch']
checksums = ['32517c1af1abee615e0b49330fd6eb6d704dd96d903b5b415091aea8aa52bbf0']

builddependencies = [('CMake', '3.23.1'),('make','4.3')]
Expand All @@ -29,17 +22,20 @@ dependencies = [
('h5py','3.7.0'),
('matplotlib','3.5.2'),
('lxml','4.9.1'),
('mcpl','1.6.2')
('mcpl','1.6.2'),
('Catch2','3.6.0'),
('fmt','9.1.0'),
('gsl-lite','0.41.0'),
('pugixml','1.12.1'),
('xtensor','0.24.7')
]

easyblock = 'CMakeMake'

configopts = "-DOPENMC_USE_DAGMC=OFF -DOPENMC_USE_OPENMP=ON -DOPENMC_USE_MPI=ON -DHDF5_PREFER_PARALLEL=OFF -DOPENMC_USE_MCPL=ON -DOPENMC_USE_UWUW=OFF"
postinstallcmds = ['pip install ../openmc/']
configopts = "-DOPENMC_USE_DAGMC=OFF -DOPENMC_USE_OPENMP=ON -DOPENMC_USE_MPI=ON -DHDF5_PREFER_PARALLEL=OFF -DOPENMC_USE_MCPL=ON -DOPENMC_USE_UWUW=OFF -DOPENMC_CHECK_SUBMODULES=OFF"
postinstallcmds = ['pip install ../openmc-%(version)s/']

sanity_check_paths = {
'files': ['bin/openmc'],
'dirs': ['bin','include','lib','share'],
}


}
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
diff --unified --recursive --text openmc-0.15.0.orig/CMakeLists.txt openmc-0.15.0.new/CMakeLists.txt
--- openmc-0.15.0.orig/CMakeLists.txt 2024-06-22 03:28:56.000000000 +0200
+++ openmc-0.15.0.new/CMakeLists.txt 2024-07-10 11:28:56.781174726 +0200
@@ -25,16 +25,17 @@
# Command line options
#===============================================================================

-option(OPENMC_USE_OPENMP "Enable shared-memory parallelism with OpenMP" ON)
-option(OPENMC_BUILD_TESTS "Build tests" ON)
-option(OPENMC_ENABLE_PROFILE "Compile with profiling flags" OFF)
-option(OPENMC_ENABLE_COVERAGE "Compile with coverage analysis flags" OFF)
-option(OPENMC_USE_DAGMC "Enable support for DAGMC (CAD) geometry" OFF)
-option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tallies" OFF)
-option(OPENMC_USE_MPI "Enable MPI" OFF)
-option(OPENMC_USE_MCPL "Enable MCPL" OFF)
-option(OPENMC_USE_NCRYSTAL "Enable support for NCrystal scattering" OFF)
-option(OPENMC_USE_UWUW "Enable UWUW" OFF)
+option(OPENMC_USE_OPENMP "Enable shared-memory parallelism with OpenMP" ON)
+option(OPENMC_BUILD_TESTS "Build tests" ON)
+option(OPENMC_ENABLE_PROFILE "Compile with profiling flags" OFF)
+option(OPENMC_ENABLE_COVERAGE "Compile with coverage analysis flags" OFF)
+option(OPENMC_USE_DAGMC "Enable support for DAGMC (CAD) geometry" OFF)
+option(OPENMC_USE_LIBMESH "Enable support for libMesh unstructured mesh tallies" OFF)
+option(OPENMC_USE_MPI "Enable MPI" OFF)
+option(OPENMC_USE_MCPL "Enable MCPL" OFF)
+option(OPENMC_USE_NCRYSTAL "Enable support for NCrystal scattering" OFF)
+option(OPENMC_USE_UWUW "Enable UWUW" OFF)
+option(OPENMC_CHECK_SUBMODULES "Check that submodules are available" ON)

# Warnings for deprecated options
foreach(OLD_OPT IN ITEMS "openmp" "profile" "coverage" "dagmc" "libmesh")
@@ -238,11 +239,12 @@
endif()

# Check to see if submodules exist (by checking one)
-if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vendor/pugixml/CMakeLists.txt")
- message(FATAL_ERROR "The git submodules were not downloaded! GIT_SUBMODULE was \
- turned off or failed. Please update submodules and try again.")
+if (OPENMC_CHECK_SUBMODULES)
+ if(NOT EXISTS "${CMAKE_CURRENT_SOURCE_DIR}/vendor/pugixml/CMakeLists.txt")
+ message(FATAL_ERROR "The git submodules were not downloaded! GIT_SUBMODULE was \
+ turned off or failed. Please update submodules and try again.")
+ endif()
endif()
-
#===============================================================================
# pugixml library
#===============================================================================
49 changes: 49 additions & 0 deletions easybuild/easyconfigs/x/xtensor/xtensor-0.24.7-foss-2022a.eb
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
easyblock = 'Bundle'

name = 'xtensor'
version = '0.24.7'

homepage = 'https://github.com/xtensor-stack/xtensor'
description = "xtensor is a C++ library meant for numerical analysis with multi-dimensional array expressions."

toolchain = {'name': 'foss', 'version': '2022a'}

builddependencies = [
('CMake', '3.23.1'),
('pybind11', '2.9.2'),
]
dependencies = [
('Python', '3.10.4'),
('SciPy-bundle', '2022.05'),
]

default_easyblock = 'CMakeMake'

default_component_specs = {
'source_urls': ['https://github.com/xtensor-stack/%(name)s/archive/'],
'sources': ['%(version)s.tar.gz'],
'start_dir': '%(name)s-%(version)s',
}

components = [
('xtl', '0.7.5', {
'checksums': ['3286fef5fee5d58f82f7b91375cd449c819848584bae9367893501114d923cbe'],
}),
('xsimd', '8.0.5', {
'checksums': ['0e1b5d973b63009f06a3885931a37452580dbc8d7ca8ad40d4b8c80d2a0f84d7'],
}),
('xtensor', version, {
'checksums': ['0fbbd524dde2199b731b6af99b16063780de6cf1d0d6cb1f3f4d4ceb318f3106'],
}),
('xtensor-python', '0.26.1', {
'checksums': ['eb64155c6824be471decf93927beedae3645714c8ce92f38e037434db2c2454a'],
'configopts': '-DPYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python',
}),
]

sanity_check_paths = {
'files': ['include/xtensor.hpp', 'lib/pkgconfig/xsimd.pc'],
'dirs': ['include/xsimd', 'include/xtensor', 'include/xtensor-python', 'include/xtl', 'lib/cmake'],
}

moduleclass = 'lib'

0 comments on commit f694e1b

Please sign in to comment.