Build runs on a single CPU - not obvious how to use multiple CPUs
This page says that WM_NCOMPPROCS
should specify the number of CPUs, but WM_NCOMPPROCS
is never mentioned in the source tree.
Google doesn't know this either.
Multi-CPU option works by itself for almost all other projects.
No child items are currently assigned. Use child items to break down this issue into smaller parts.
Link issues together to show that they're related. Learn more.
Activity
- Maintainer
please see the section "Compile OpenFOAM faster". note that the valid versions in the link given by yourself was stated as 1.4.x.
please reopen the ticket if the issue remains relevant.
Edited by Kutalmış Berçin - Kutalmış Berçin closed
closed
- Maintainer
I don't experience any of these reported issues. Could you report the issue in a more explicit way, please?
- Maintainer
@kuti - he is working on FreeBSD not Linux, so I wouldn't be too surprised about somethings odd. Do you have an installation of FreeBSD about, or using container image?
- Please register or sign in to reply
- Yuri Z mentioned in issue #2518 (closed)
mentioned in issue #2518 (closed)
- Maintainer
Hi @yurivict - this is still totally weird. Any luck with "wmake -j N" or "./Allwmake -j N" at all?
Is there something different about the
make
used there? I'm guessing that it is not "GNU Make"Edited by Mark OLESEN Any luck with "wmake -j N" or "./Allwmake -j N" at all?
./Allwmake -j N
says that it runs on N cores but then only one compiler process runs at any given time.Is there something different about the make used there? I'm guessing that it is not "GNU Make"
GNU make (gmake) is placed in path as a
make
command for the duration of the build by the ports framework.$ gmake -v GNU Make 4.3 Built for amd64-portbld-freebsd13.0 Copyright (C) 1988-2020 Free Software Foundation, Inc. License GPLv3+: GNU GPL version 3 or later <http://gnu.org/licenses/gpl.html> This is free software: you are free to change and redistribute it. There is NO WARRANTY, to the extent permitted by law.
- Maintainer
Really, really weird. We are however calling
make
and notgmake
internally, so maybe you are still getting a different make somehow? - Maintainer
It continues to be pretty weird. What is the fastest/easiest way for a FreeBSD noob to get started? Not saying that I can tackle it right away or anything, but I am interested in seeing OpenFOAM also running on FreeBSD too.
@yurivict I encountered something similar on archlinux actually. What solved the issue for me was the
-q
flag. i.e. running./Allwmake -j -q
did the trick. I thing something with queuing up other files to compile at the same time is important in theAllwmake
command to utilize all cores.Also nice to see you here as well!
@mark can you comment on this?
Should the build parallelization documentation be updated to reflect the
-q
observations faced on archlinux and freebsd? Is there a distro that does not need the-q
flag for all core utilization that you know of which I can test on my own?- Maintainer
The
-q
is probably some other side-effect. We compile all of the time on opensuse/fedora/redhat/debian/ubuntu (ie, all of our regular builds) without using the-q
option at all.So the question is probably why Arch and FreeBSD behave differently.
Edited by Mark OLESEN
- Kutalmış Berçin reopened
reopened
I have a pre-written answer, copy-pasting it here:
Is there an easy way to test under FreeBSD?
- Install the FreeBSD VM image into VirtualBox.
- Boot FreeBSD
- Install git: pkg install git
- Check out the ports tree: git clone https://git.FreeBSD.org/ports.git /usr/ports
- cd /usr/ports/graphics/pcl-pointclouds # replace with the port you are interested in
- Install dependencies: pkg install -A
make missing
- Build: make
- Run tests: make test
This is for some existing port.
However, the port
science/openfoam
isn't committed yet since I am still working on it.Edited by Yuri Z./Allwmake -j -q
seems to build in parallel, but then it prints errors like these:clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/octrees/meshOctree/refinementControls/objectRefinement/hollowConeRefinement.o' clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/triSurfaceTools/triSurface2DCheck/triSurface2DCheck.o' clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/triSurfaceTools/triSurfaceChecks/triSurfaceChecks.o' clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/triSurfaceTools/triSurfaceCleanupDuplicates/triSurfaceCleanupDuplicates.o' clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/triSurfaceTools/triSurfaceCleanupDuplicates/triSurfaceCleanupDuplicatesFunctions.o' clang++: error: no such file or directory: '/disk-samsung/freebsd-ports/science/openfoam/work/OpenFOAM-v2112/build/linux64ClangDPInt32Opt/modules/cfmesh/meshLibrary/utilities/triSurfaceTools/triSurfaceCleanupDuplicateTriangles/triSurfaceCleanupDuplicateTriangles.o'
- Maintainer
Please consider anything under modules/ as purely optional. If you want, can either compile with at the top-level with "./Allwmake -prefix=none", move the modules/ directory elsewhere, or edit the modules/Allwmake to simply "exit 0" as its first thing.
This will let you concentrate on the core problems of OpenFOAM itself.
- Kutalmış Berçin added community label
added community label
I wonder if this is some weird bug only seen with clang++? Can you try with gcc?