|
| 1 | +easyblock = 'EB_ESPResSo' |
| 2 | + |
| 3 | +name = 'ESPResSo' |
| 4 | +version = '%(software_commit)s' |
| 5 | + |
| 6 | +homepage = 'https://espressomd.org/wordpress' |
| 7 | +description = """A software package for Molecular Dynamics and Monte Carlo |
| 8 | +simulations of bead-spring models, with electrostatics, magnetostatics, |
| 9 | +hydrodynamics and reaction-diffusion-advection solvers.""" |
| 10 | + |
| 11 | +sources = [ |
| 12 | +{ |
| 13 | + 'source_urls': ['https://github.com/espressomd/espresso/archive/'], |
| 14 | + 'filename': 'espresso-%(software_commit)s.tar.gz', |
| 15 | + 'download_filename': '%(software_commit)s.tar.gz', |
| 16 | +}, |
| 17 | +{ |
| 18 | + 'source_urls': ['https://i10git.cs.fau.de/api/v4/projects/walberla%2Fwalberla/repository/archive?sha=59c9b8b1#'], |
| 19 | + 'filename': 'walberla-59c9b8b1.tar.gz', |
| 20 | +}, |
| 21 | +{ |
| 22 | + 'source_urls': ['https://github.com/icl-utk-edu/heffte/archive/'], |
| 23 | + 'filename': 'heffte-2.4.1.tar.gz', |
| 24 | + 'download_filename': 'v2.4.1.tar.gz', |
| 25 | +}, |
| 26 | +{ |
| 27 | + 'source_urls': ['https://github.com/kokkos/kokkos/archive/'], |
| 28 | + 'filename': 'kokkos-18b830e3360dff9f44a9a9c729ca9e74c037e354.tar.gz', |
| 29 | + 'download_filename': '18b830e3360dff9f44a9a9c729ca9e74c037e354.tar.gz', |
| 30 | +}, |
| 31 | +{ |
| 32 | + 'source_urls': ['https://github.com/ECP-copa/Cabana/archive/'], |
| 33 | + 'filename': 'Cabana-ebfaa51.tar.gz', |
| 34 | + 'download_filename': 'ebfaa51.tar.gz', |
| 35 | +}, |
| 36 | +{ |
| 37 | + 'source_urls': ['https://github.com/highfive-devs/highfive/archive/'], |
| 38 | + 'filename': 'highfive-0103467c3b609628fe3b892c6a85915610f2f3d2.tar.gz', |
| 39 | + 'download_filename': '0103467.tar.gz', |
| 40 | +}, |
| 41 | +] |
| 42 | +checksums = [{ |
| 43 | + 'espresso-%(software_commit)s.tar.gz': '73d71511eca932adcff4f33ac778c77279e97cec91ea1ac53987ba488fc1288d', |
| 44 | + 'walberla-59c9b8b1.tar.gz': 'a709d7299f2c06143946d9bb8033d4ddbb0cf8b9142e4bbaa15fecc78463038f', |
| 45 | + 'heffte-2.4.1.tar.gz': 'de2cf26df5d61baac7841525db3f393cb007f79612ac7534fd4757f154ba3e6c', |
| 46 | + 'kokkos-18b830e.tar.gz': 'dc0127134f47752f61e74c77237bd9ec560535c4283fef8c9643f947b3733063', |
| 47 | + 'Cabana-ebfaa51.tar.gz': 'fe5b1b1d419662b29a80cbd6703994b28c942ccbee3b201eca87e48a13836350', |
| 48 | + 'highfive-0103467.tar.gz': 'd0ce87abd07cdd676c6d6069d3b05f869138d115d8e22b935c9bd43c872c1f3d', |
| 49 | +}] |
| 50 | +patches = [ |
| 51 | + 'espresso.patch', |
| 52 | +] |
| 53 | + |
| 54 | +toolchain = {'name': 'foss', 'version': '2023b'} |
| 55 | +toolchainopts = {'usempi': True, 'pic': True} |
| 56 | + |
| 57 | +builddependencies = [ |
| 58 | + ('CMake', '3.27.6'), |
| 59 | + ('Ninja', '1.11.1'), |
| 60 | +] |
| 61 | + |
| 62 | +dependencies = [ |
| 63 | + ('Python', '3.11.5'), |
| 64 | + ('SciPy-bundle', '2023.11'), |
| 65 | + ('Boost.MPI', '1.83.0'), |
| 66 | + ('Mesa', '23.1.9'), |
| 67 | + ('GSL', '2.7'), |
| 68 | + ('IPython', '8.17.2'), |
| 69 | + ('Pint', '0.24'), |
| 70 | + ('HDF5', '1.14.3'), |
| 71 | + #('VTK', '9.3.0'), # error: libpython3.10.so.1.0: file not found |
| 72 | + #('PFFT', '20181230'), # not available in this toolchain |
| 73 | + #('CUDA', '12.1.1', '', SYSTEM), # deferred for now |
| 74 | +] |
| 75 | + |
| 76 | +# default CUDA compute capabilities to use (override via --cuda-compute-capabilities) |
| 77 | +if any(x[0] == 'CUDA' for x in dependencies): |
| 78 | + cuda_compute_capabilities = ['5.2', '6.0', '7.0', '7.5', '8.0', '8.6', '9.0'] |
| 79 | + |
| 80 | +configopts = f' -DESPRESSO_BUILD_TESTS=ON ' |
| 81 | +# make sure the right Python is used (note: -DPython3_EXECUTABLE or -DPython_EXECUTABLE does not work!) |
| 82 | +configopts += ' -D PYTHON_EXECUTABLE=$EBROOTPYTHON/bin/python ' |
| 83 | +configopts += ' -DCMAKE_INSTALL_LIBDIR:PATH=lib ' |
| 84 | +# workaround for https://gitlab.kitware.com/cmake/cmake/-/issues/22678 |
| 85 | +# (this only affects testsuite executable files in the build folder) |
| 86 | +_exe_linker_flags = ':'.join(f'%(builddir)s/easybuild_obj/_deps/{path}' |
| 87 | + for path in ['kokkos-build/containers/src', |
| 88 | + 'kokkos-build/core/src', |
| 89 | + 'kokkos-build/simd/src', |
| 90 | + 'heffte-build']) |
| 91 | +configopts += f' -DCMAKE_EXE_LINKER_FLAGS="-Wl,-rpath-link,{_exe_linker_flags}" ' |
| 92 | + |
| 93 | +test_cmd = 'ninja' |
| 94 | +runtest = f'check_unit_tests && {test_cmd} check_python' |
| 95 | + |
| 96 | +modextrapaths = {'PYTHONPATH': ['lib/python%(pyshortver)s/site-packages']} |
| 97 | + |
| 98 | +_binaries = ['ipypresso', 'pypresso'] |
| 99 | +_libs = [ |
| 100 | + # ESPResSo |
| 101 | + 'espresso_core', 'espresso_shapes', 'espresso_walberla', |
| 102 | + 'espresso_script_interface', 'script_interface', 'utils', '_init', |
| 103 | + # waLBerla |
| 104 | + 'libwalberla_core', 'libwalberla_executiontree', 'libwalberla_timeloop', |
| 105 | + 'libwalberla_field', 'libwalberla_blockforest', 'libwalberla_geometry', |
| 106 | + 'libwalberla_lbm', 'libwalberla_vtk', 'libwalberla_domain_decomposition', |
| 107 | + 'libwalberla_boundary', 'liblodepng', |
| 108 | + # Kokkos |
| 109 | + 'libkokkoscontainers', 'libkokkoscore', 'libkokkossimd', |
| 110 | + # heFFte |
| 111 | + 'libheffte', |
| 112 | +] |
| 113 | +_python_modules = [ |
| 114 | + '__init__.py', 'system.py', 'version.py', 'collision_detection.py', 'lb.py', |
| 115 | + 'accumulators.py', 'constraints.py', 'observables.py', 'particle_data.py', |
| 116 | +] |
| 117 | +if any(x[0] == 'PFFT' for x in dependencies): |
| 118 | + _libs.append('libwalberla_fft') |
| 119 | +if any(x[0] == 'HDF5' for x in dependencies): |
| 120 | + _libs.append('espresso_hdf5') |
| 121 | + _python_modules.append('io/writer/h5md.py') |
| 122 | +if any(x[0] == 'CUDA' for x in dependencies): |
| 123 | + _libs += [ |
| 124 | + 'espresso_cuda', 'espresso_walberla_cuda', 'libwalberla_gpu', |
| 125 | + ] |
| 126 | + _python_modules.append('cuda_init.py') |
| 127 | + |
| 128 | +_lib_path = 'lib/python%(pyshortver)s/site-packages/espressomd' |
| 129 | +sanity_check_paths = { |
| 130 | + 'files': [f'bin/{x}' for x in _binaries] + |
| 131 | + [f'{_lib_path}/{x}.{SHLIB_EXT}' for x in _libs] + |
| 132 | + [f'{_lib_path}/{x}' for x in _python_modules], |
| 133 | + 'dirs': ['bin', 'lib'] |
| 134 | +} |
| 135 | + |
| 136 | +sanity_check_commands = [ |
| 137 | + 'pypresso -h', 'ipypresso -h', |
| 138 | + 'pypresso -c "import espressomd.version;print(espressomd.version.friendly())"', |
| 139 | + 'python3 -c "import espressomd.version;print(espressomd.version.friendly())"', |
| 140 | +] |
| 141 | + |
| 142 | +moduleclass = 'chem' |
0 commit comments