-
- Downloads
COMP: remove commented Make/options item (#2668)
- applications/utilities/mesh/generation/foamyMesh/conformalVoronoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H 12 additions, 2 deletions...onoiMesh/conformalVoronoiMesh/CGALTriangulation3DKernel.H
- applications/utilities/preProcessing/viewFactorsGen/Make/options 0 additions, 2 deletions...tions/utilities/preProcessing/viewFactorsGen/Make/options
- wmake/rules/General/cgal 13 additions, 8 deletionswmake/rules/General/cgal
- wmake/rules/General/cgal-header-no-mpfr 18 additions, 0 deletionswmake/rules/General/cgal-header-no-mpfr
-
Hello. I'm building on a A64FX system (not Fugaku).
I'm having similar CGAL building issue like macOS. On that system, although I built CGAL 5.5.1 with
./makeCGAL gmp-none mpfr-none
,make/scripts/have_cgal
still gives meflavour=header
and leads towmake/rules/General/cgal-header-only
. I wonder if I'll have to manually override that?Thanks.
-
Sorry for the confusion. My problem is on a Arm64 Linux. Because the Fujitsu compiler is in Clang mode, I have to disable GMP and MPFR. But the script can only detect if my CGAL build is header-only or library.
As far as I know, the CGAL on homebrew is compiled with gmp and mpfr so they’re definitely installed on macOS.
-
More information: I tested all combinations with Fujitsu compiler. CGAL 5 is not working at all. CGAL 4 header only also failed. The only working combination is CGAL 4 library without GMP.
I haven’t tested on macOS yet, but on a Fujitsu system, cgal-header-no-mpfr rule won’t be triggered. Even if I manually override it still fails.
-
I just pushed a change to the fix-2664-CGAL-without-mpfr branch. If you can pick that file (also attached here for convenience) and see if that works.
-
It's not returning the correct result on A64FX system as I built it by
./makeCGAL -with-lib gmp-none mpfr-none
cgal=true flavour=library root="/lustre/home/gxue/OpenFOAM/ThirdParty-v2212/platforms/linuxARM64Fujitsu/CGAL-4.14.3" include="/lustre/home/gxue/OpenFOAM/ThirdParty-v2212/platforms/linuxARM64Fujitsu/CGAL-4.14.3/include" library="/lustre/home/gxue/OpenFOAM/ThirdParty-v2212/platforms/linuxARM64Fujitsu/CGAL-4.14.3/lib64
on macOS, with official homebrew CGAL 5 depends on gmp/mpfr.
cgal=true flavour=header-no-mpfr root="/opt/homebrew/opt/cgal" include="/opt/homebrew/opt/cgal/include" library=""
on macOS, the CGAL 4 formula provided by Gabriel Gerlero also depends on gmp/mpfr.
cgal=true flavour=library-no-mpfr root="/opt/homebrew/opt/cgal@4" include="/opt/homebrew/opt/cgal@4/include" library="/opt/homebrew/opt/cgal@4/lib"
It seems to me the script is trying to find if
mpfr.h
is available in the system directory? This might not be the real case all the time. On the A64FX system/usr/include/mpfr.h
comes with the system (Rocky Linux 8 AArch64) gcc. However the Fujitsu compiler (clang based) won't buildfoamyHexMesh
if I enable gmp/mpfr. On macOS the header file is also in/opt/homebrew/opt/mpfr/include/mphr.h
but the script can't find this path. Is there any method to detect if mpfr is actually linked in CGAL installation? -
I don't know if this method is 100% accurate: for CGAL 4 (library) it can be distinguished by
libCGAL_Core
. If gmp/mpfr is disabled,libCGAL_core
doesn't exist.For header-only CGAL, I've no idea as
mpfr.h
is always ininclude/CGAL
. In my case, CGAL (4 or 5) header only (makeCGAL script w/ or w/o mpfr) always lead to failed foamyHexMesh with Fujitsu compiler. It looks to me that header-only CGAL = always linked with mpfr, and the actually problem is up to whether the system clang toolchain provides gmp/mpfr.Edited by Guanyang Xue -
Would it be reasonable to guess that no mpfr is actually needed if we have a header only install?
I don't know of a proper way to query for an mpfr dependence, you can however influence how/where things are found with the
MPRF_ARCH_PATH
inside of etc/config.sh/CGAL. Something like the following must work:export MPFR_ARCH_PATH="/opt/homebrew/mpfr" # or export MPFR_ARCH_PATH=mpfr-none
Edited by Mark OLESEN -
I did some test on the A64FX HPC:
./makeCGAL
,./makeCGAL gmp-none mpfr-none
,./makeCGAL -with-lib
, and./makeCGAL
and./makeCGAL -with-lib gmp-none mpfr-none
.The script can find system gmp/mpfr that comes with system gcc and compile, but will fail later when building
foamyHexMesh
-- Preconfiguring library: GMP ... -- Found GMP: /usr/lib64/libgmp.so -- GMP has been preconfigured: -- UseGMP-file: -- GMP include: /usr/include -- GMP libraries: /usr/lib64/libgmp.so -- GMP definitions: -- USING GMP_VERSION = '6.1.2' -- Preconfiguring library: MPFR ... -- Found MPFR: /usr/lib64/libmpfr.so -- MPFR has been preconfigured: -- UseMPFR-file: -- MPFR include: /usr/include -- MPFR libraries: /usr/lib64/libmpfr.so -- MPFR definitions: -- USING MPFR_VERSION = '3.1.6'
$ diff -qr CGAL-4.14.3-headeronly CGAL-4.14.3-headeronly-nompfr/ Files CGAL-4.14.3-headeronly/share/openfoam-build and CGAL-4.14.3-headeronly-nompfr/share/openfoam-build differ $ cat CGAL-4.14.3-headeronly-nompfr/share/openfoam-build # Information from OpenFOAM build on 'Wed Feb 22 11:26:33 EST 2023' # CGAL=CGAL-4.14.3 BOOST=1.71.0 GMP=none MPFR=none CGAL_VERSION=1041431000 BOOST_VERSION=107100 CGAL_lib=lib64 BOOST_lib=lib64 CGAL_HEADER_ONLY=true $ diff -qr CGAL-4.14.3-library CGAL-4.14.3-library-nompfr/ Files CGAL-4.14.3-library/include/CGAL/compiler_config.h and CGAL-4.14.3-library-nompfr/include/CGAL/compiler_config.h differ Files CGAL-4.14.3-library/lib64/cmake/CGAL/CGALConfig.cmake and CGAL-4.14.3-library-nompfr/lib64/cmake/CGAL/CGALConfig.cmake differ Files CGAL-4.14.3-library/lib64/cmake/CGAL/CGALExports.cmake and CGAL-4.14.3-library-nompfr/lib64/cmake/CGAL/CGALExports.cmake differ Files CGAL-4.14.3-library/lib64/libCGAL.so and CGAL-4.14.3-library-nompfr/lib64/libCGAL.so differ Files CGAL-4.14.3-library/lib64/libCGAL.so.13 and CGAL-4.14.3-library-nompfr/lib64/libCGAL.so.13 differ Files CGAL-4.14.3-library/lib64/libCGAL.so.13.0.3 and CGAL-4.14.3-library-nompfr/lib64/libCGAL.so.13.0.3 differ Files CGAL-4.14.3-library/share/openfoam-build and CGAL-4.14.3-library-nompfr/share/openfoam-build differ $ cat CGAL-4.14.3-library-nompfr/share/openfoam-build # Information from OpenFOAM build on 'Wed Feb 22 11:48:12 EST 2023' # CGAL=CGAL-4.14.3 BOOST=1.71.0 GMP=none MPFR=none CGAL_VERSION=1041431000 BOOST_VERSION=107100 CGAL_lib=lib64 BOOST_lib=lib64 CGAL_HEADER_ONLY=false
If CGAL is built with
makeCGAL
script, you can useopenfoam-build
file to decide, But generally, there's no good way to distinguish if CGAL is built with gmp/mpfr(and I doubt if header-only means always with gmp/mpfr). I think the only good way is to ask non-gcc users to carefully setupetc/config.sh/CGAL
Edited by Guanyang Xue