Skip to content

Commit de7098a

Browse files
committed
Zoltan and OpenFOAM, accidentally removed after a wrong operation. Changed Zoltan to use the modified ParMETIS from the standard software stack.
1 parent 3b2aa24 commit de7098a

File tree

2 files changed

+136
-0
lines changed

2 files changed

+136
-0
lines changed
Lines changed: 89 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,89 @@
1+
# Version 10, based on instructions from Esko Järvinen, CSC
2+
# Updated to version 10 by Orian Louant
3+
# Updated to version 12 by Stanislau Stasheuski
4+
5+
easyblock = 'Binary'
6+
7+
local_version_tag = 'master'
8+
9+
name = 'OpenFOAM'
10+
version = '13'
11+
versionsuffix = f'-{local_version_tag}'
12+
13+
homepage = 'http://www.openfoam.org/'
14+
15+
whatis = [
16+
'Description: The OpenFOAM (CFD software) distribution from the OpenFOAM Foundation'
17+
]
18+
19+
description = """
20+
OpenFOAM is the leading free, open source software for computational fluid dynamics (CFD),
21+
owned by the OpenFOAM Foundation and distributed exclusively under the General Public Licence (GPL).
22+
The GPL gives users the freedom to modify and redistribute the software and a guarantee of continued
23+
free use, within the terms of the licence.
24+
"""
25+
26+
usage = """
27+
To run OpenFOAM solvers on compute nodes use srun command:
28+
29+
srun foamSolverName -parallel
30+
31+
in either job script for sbatch or directly within salloc session.
32+
33+
Allrun scripts require some additional tweaking.
34+
"""
35+
36+
toolchain = {'name': 'cpeGNU', 'version': '25.03'}
37+
38+
39+
source_urls = ['https://github.com/OpenFOAM/OpenFOAM-%(version_major)s/archive/refs/tags']
40+
sources = [
41+
{
42+
'filename': f'OpenFOAM-%(version_major)s-version-%(version)s.tar.gz',
43+
'download_filename': 'version-%(version)s.tar.gz',
44+
}]
45+
patches = [
46+
('wmake-rules-linux64Cray-gcc13.patch', 0),
47+
]
48+
49+
builddependencies = [
50+
('buildtools', '%(toolchain_version)s', '', True),
51+
]
52+
53+
dependencies = [
54+
('cray-fftw', EXTERNAL_MODULE),
55+
('SCOTCH', '7.0.8'),
56+
('METIS', '5.1.0'),
57+
('Zoltan', '3.901'), # depends on ParMETIS
58+
]
59+
60+
unpack_options = '--strip-components=1'
61+
extract_sources = True
62+
buildininstalldir = True
63+
64+
local_project_name = '%(version_major)s-%(toolchain_name)s-%(toolchain_version)s'
65+
66+
install_cmd = ' && '.join([
67+
'./bin/tools/foamConfigurePaths --projectName %s-%s --dependency PARMETIS=OpenFOAM --dependency ParaView=none' % (local_project_name, local_version_tag),
68+
'printf "export PARMETIS_ARCH_PATH=$EBROOTPARMETIS\nexport PARMETIS_VERSION=parmetis-${EBVERSIONPARMETIS}\n" > ./etc/config.sh/parMetis',
69+
'sed -i \'125i *cpeGNU*) version=%(version_major)s ;;\' ./bin/foamEtcFile',
70+
'source ./etc/bashrc WM_COMPILER=Cray WM_CC=cc WM_CXX=CC WM_MPLIB=CRAY-MPICH MPICH_DIR=${CRAY_MPICH_PREFIX}',
71+
'./Allwmake -j%(parallel)s',
72+
])
73+
74+
sanity_check_paths = {
75+
'files': [],
76+
'dirs': ['platforms/linux64CrayDPInt32Opt/bin', 'platforms/linux64CrayDPInt32Opt/lib'],
77+
}
78+
79+
modextravars = {
80+
'FOAM_BASH' : '%(installdir)s/bashrc',
81+
'MPI_BUFFER_SIZE' : '2000000000',
82+
}
83+
84+
# source_sh fails, use execute as workaround
85+
modluafooter = """
86+
execute {cmd="source " .. pathJoin(root, "etc/bashrc") .. " WM_COMPILER=Cray WM_MPLIB=CRAY-MPICH WM_CC=gcc-13 WM_CXX=g++-13", modeA={"load"}}
87+
"""
88+
89+
moduleclass = 'cae'
Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
# This easyconfig was created by the BEAR Software team at the University of Birmingham.
2+
easyblock = 'ConfigureMake'
3+
4+
name = 'Zoltan'
5+
version = '3.901'
6+
7+
homepage = "https://sandialabs.github.io/Zoltan/"
8+
description = """Zoltan Dynamic Load Balancing and Graph Algorithm Toolkit"""
9+
10+
toolchain = {'name': 'cpeGNU', 'version': '25.03'}
11+
toolchainopts = {'pic': True}
12+
13+
github_account = 'sandialabs'
14+
source_urls = [GITHUB_SOURCE]
15+
sources = ['v%(version)s.tar.gz']
16+
checksums = ['030c22d9f7532d3076e40cba1f03a63b2ee961d8cc9a35149af4a3684922a910']
17+
18+
dependencies = [
19+
('SCOTCH', '6.1.3'),
20+
('ParMETIS', '4.0.3'),
21+
]
22+
23+
preconfigopts = 'mkdir build && cd build &&'
24+
configure_cmd = '../configure'
25+
configopts = ' '.join([
26+
'--enable-gzip',
27+
'--with-scotch',
28+
'--with-scotch-incdir=$EBROOTSCOTCH/include',
29+
'--with-scotch-libdir=$EBROOTSCOTCH/lib',
30+
'--with-parmetis',
31+
'--with-parmetis-incdir=$EBROOTPARMETIS/include',
32+
'--with-parmetis-libdir=$EBROOTPARMETIS/lib',
33+
'--disable-examples',
34+
'--disable-tests',
35+
])
36+
37+
prebuildopts = 'cd build &&'
38+
buildopts = 'everything'
39+
40+
preinstallopts = 'cd build &&'
41+
42+
sanity_check_paths = {
43+
'files': ['lib/libzoltan.a', 'include/zoltan.h'],
44+
'dirs': [],
45+
}
46+
47+
moduleclass = 'cae'

0 commit comments

Comments
 (0)