easybuilders / easybuild-easyblocks

Collection of easyblocks that implement support for building and installing software with EasyBuild.
https://easybuild.io
GNU General Public License v2.0
104 stars 284 forks source link

OpenFOAM v1706 does not build #1371

Closed mboisson closed 6 years ago

mboisson commented 6 years ago

I am using the following EasyConfig :

name = 'OpenFOAM'
version = 'v1706'

homepage = 'http://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': 'iompi', 'version': '2016.4.11'}
toolchainopts = {'cstd': 'c++11'}

source_urls = ['https://sourceforge.net/projects/openfoamplus/files/%(version)s']
sources = ['OpenFOAM-%(version)s.tgz']

checksums = ['630d30770f7b54d6809efbf94b7d7c8f']

#patches = ['OpenFOAM-%(version)s_cleanup.patch', 'OpenFOAM-3.0.1_new_malloc.patch' ]

# Need to load an older module, because the nix one does not work
#prebuildopts = "module load flex/2.5.39 && "

dependencies = [
    ('libreadline', '6.3'),
    ('ncurses', '6.0'),
    # OpenFOAM requires 64 bit METIS using 32 bit indexes (array indexes)
    ('METIS', '5.1.0'),
    ('SCOTCH', '6.0.4'),
]

builddependencies = [
    ('Bison', '3.0.4'),
    ('CMake', '3.6.1'),
    ('flex', '2.5.39'),
    ('CGAL', '4.9'),
]

OpenFOAM build fails in the sanity checks with :

== 2018-02-28 22:47:54,074 environment.py:97 INFO Environment variable LOADEDMODULES set to nixpkgs/16.09:gcccore/.5.4.0:icc/.2016.4.258:ifort/.2016.4.258:intel/2016.4:openmpi/2.1.1:iompi/.2016.4.11:metis/5.1.0:scotch/6.0.4:python/2.7.13:boost/1.60.0:qt/5.6.1:cgal/4.9 (previous value: 'nixpkgs/16.09:gcccore/.5.4.0:icc/.2016.4.258:ifort/.2016.4.258:intel/2016.4:openmpi/2.1.1:iompi/.2016.4.11')
== 2018-02-28 22:47:54,074 environment.py:97 INFO Environment variable CFLAGS set to -O2 -xCore-AVX2 -ftz -fp-speculation=safe -fp-model source -std=c++11 -no-prec-div (previously undefined)
== 2018-02-28 22:47:54,143 build_log.py:158 ERROR EasyBuild crashed with an error (at ?:124 in __init__): Sanity check failed: no file of ('OpenFOAM-v1706/platforms/linux64IccDPInt32Opt/lib/mpi/libPstream.so',) in /home/mboisson/.local/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/v1706, no file of ('OpenFOAM-v1706/platforms/linux64IccDPInt32Opt/lib/mpi/libptscotchDecomp.so',) in /home/mboisson/.local/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/v1706, no file of ('OpenFOAM-v1706/platforms/linux64IccDPInt32Opt/lib/libscotchDecomp.so',) in /home/mboisson/.local/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/v1706 (at easybuild/lib/python2.7/site-packages/easybuild-framework/easybuild/framework/easyblock.py:2228 in _sanity_check_step)
== 2018-02-28 22:47:54,143 easyblock.py:2703 WARNING build failed (first 300 chars): Sanity check failed: no file of ('OpenFOAM-v1706/platforms/linux64IccDPInt32Opt/lib/mpi/libPstream.so',) in /home/mboisson/.local/easybuild/software/2017/avx2/MPI/intel2016.4/openmpi2.1/openfoam/v1706, no file of ('OpenFOAM-v1706/platforms/linux64IccDPInt32Opt/lib/mpi/libptscotchDecomp.so',) in /hom
== 2018-02-28 22:47:54,144 easyblock.py:280 INFO Closing log for application name OpenFOAM version v1706

Looking in the log.linux64GccDPInt32Opt file, I see this :

No ThirdParty directory found - skipping
==> skip optional libccm adapter
==> skip scotch (no header)
==> skip metis (no header)
==> skip randomProcesses library (no FFTW)
==> skip SloanRenumber (no boost)
==> skip zoltanRenumber (no library)
WARNING: skipped - needs a VTK or a ParaView installation
==> skip dnsFoam solver (no FFTW)
==> skip optional ccm conversion components (no libccm.so)
==> skip boxTurb utility (no FFTW)
==> skip build of ParaView plugins
==> skip noise utility (no FFTW)

i.e. it does not find scotch. Before you ask, yes, the heads are in scotch's include directory.

I looking at the easybuild logfile, I figured out that it sets SCOTCH_ROOT (and other *_ROOT) environment variables rather than editing etc/config.sh/scotch and such. Yet, in the OpenFOAM source directory, nowhere are this environment variables used.

Is there something I am missing here ?

I was told to tag @olesenm

olesenm commented 6 years ago

I'm not sure which configs your working with, but the first suggestion would be to try with openfoam-1712, since @boegel and I just decided this morning to not really both much about older versions. AFAIK support for 1712 is now merged in and presumably works.

If you need to work with 1706, I can point you these patches: https://github.com/olesenm/easybuild-easyconfigs/commit/ee472f7cf92b0b23e3ed89e7a13366638e1cbaf4

mboisson commented 6 years ago

I tried v1712 as well (just changing the version from the above easyconfig) and it failed in the same way.

mboisson commented 6 years ago

Ah, I think the patch is what I was missing, I see SCOTCH_ROOT referred in there...