SuperBuild fails at eb_spherecube.cpp(21) (Cuda 11, GCC 9)
markstock opened this issue · 6 comments
This spun off of #56
Using most recent pulls of AMReX, AMReX-Hydro, and incflo, a "superbuild" on Fedora 31, GCC 9.3.1, and CUDA 11.2.0 using cmake fails on the following error.
[ 77%] Building CUDA object CMakeFiles/incflo.dir/src/embedded_boundaries/eb_spherecube.cpp.o
/home/mstock/opt/incflo/src/embedded_boundaries/eb_spherecube.cpp(21): error: no instance of constructor "amrex::EB2::SphereIF::SphereIF" matches the argument list
argument types are: (double, {...}, __nv_bool)
/home/mstock/opt/incflo/src/embedded_boundaries/eb_spherecube.cpp(22): error: no instance of constructor "amrex::EB2::BoxIF::BoxIF" matches the argument list
argument types are: ({...}, {...}, __nv_bool)
This is a 2D-DOUBLE build with OpenMP and CUDA but no MPI.
It looks like src/embedded_boundaries/eb_spherecube.cpp
assumes 3D in it's constructor (code below), while RealArray
is defined in amrex/Src/Base/AMReX_Array.H
as Array<Real, AMREX_SPACEDIM>
.
EB2::SphereIF sphere(0.5, {1.8, 1.8, 2.8}, false);
EB2::BoxIF cube({1.85, 1.85, 2.85}, {2.5, 2.5, 3.5}, false);
This is a cmake build issue. In GNU Make, there is
ifeq ($(DIM), 3)
CEXE_sources += eb_spherecube.cpp
CEXE_sources += eb_tuscan.cpp
CEXE_sources += eb_twocylinders.cpp
endif
We should have the same logic in cmake.
@etpalmer63 Erik could you handle this?
@markstock Meanwhile, you could also try to build with make USE_CUDA=TRUE
in test_2d
.
@etpalmer63 Erik could you handle this?
Looking into it now.
OK, I think I have it. The PR is up here #58. I will let the CI run.
Running make USE_CUDA=TRUE USE_MPI=FALSE CUDA_ARCH=86 CUDA_PATH=/opt/cuda/11.2
inside test_2d
returns SUCCESS
. Nice.