# IT4Innovations # LK 2023 name = 'OpenFOAM' version = 'v2212' homepage = 'https://www.openfoam.com/' description = """OpenFOAM is a free, open source CFD software package. OpenFOAM has an extensive range of features to solve anything from complex fluid flows involving chemical reactions, turbulence and heat transfer, to solid dynamics and electromagnetics.""" toolchain = {'name': 'intel', 'version': '2022b'} # Users have found that vectorizion caused OpenFOAM to produce some very incorrect results. # Disabling vectorize was confirmed to fix the the known issues. # With no test suite, sticking to known working toolchain options until proven otherwise. import os # core-avx2 is required due to a but in fortran compiler if os.environ.get("CLUSTERNAME") in ["KAROLINA"]: toolchainopts = {'pic': True, 'usempi': True, 'optarch': 'march=core-avx2', 'cstd': 'c++11'} else: toolchainopts = {'pic': True, 'usempi': True, 'cstd': 'c++11'} source_urls = ['https://sourceforge.net/projects/openfoam/files/%(version)s/'] sources = [SOURCE_TGZ] patches = [ ('OpenFOAM-v2212-cleanup.patch', 1), ] checksums = [ {'OpenFOAM-v2212.tgz': '0a3ddbfea9abca04c3a811e72fcbb184c6b1f92c295461e63b231f1a97e96476'}, {'OpenFOAM-v2212-cleanup.patch': '9a98e5079e2f89178286914b055447d2358615f0c940760f6a7c9979be71ad5d'}, ] builddependencies = [ ('CMake', '3.24.3'), ('flex', '2.6.4'), ] dependencies = [ ('ncurses', '6.3'), ('LLVM', '15.0.5'), ('Qt5', '5.15.7'), ('Boost', '1.81.0', '', ('GCC', '12.2.0')), ('imkl-FFTW', '2022.2.1'), ('numactl', '2.0.16'), # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes) ('METIS', '5.1.0'), ('SCOTCH', '7.0.3'), ('KaHIP', '3.14'), # ('CGAL', '5.2.4'), # ('ParaView', '5.11.0', '-mpi'), ('gnuplot', '5.4.6'), ] prebuildopts = 'export LD_PRELOAD="libmpi.so" &&' moduleclass = 'cae'