Description
The AmrLevel tutorial is hard-coded in double precision, which means it fails to build against AMReX with single-precision support since the memory pool bindings in Fortran only expose single or double precision routines.
Example reproducer with CMake (but not specific to CMake):
cmake .. -DENABLE_TUTORIALS=ON -DENABLE_DP=OFF
make tutorials VERBOSE=ON
(Seen with both GCC 7.5 and Clang 6.0 on my Ubuntu 18.04.)
amrex/Tutorials/Amr/Advection_AmrLevel/Source/Src_3d/slope_3d.f90:146:72: call bl_allocate(dsgn, lo(1), hi(1), lo(2), hi(2), lo(3)-1, hi(3)+1)
1
Error: There is no specific subroutine for the generic 'bl_allocate' at (1)
The solution is probably to expose bindings to SP and DP in the Fortran memory pool interfaces, independent of the build type. (In the practical case, a user might use SP by default and has some selected helper functionality in DP for numerical reasons.)
Refs.:
amrex/Src/Base/AMReX_mempool_mod.F90
Line 5 in 370bccc
amrex/Tutorials/Amr/Advection_AmrLevel/Source/Src_3d/slope_3d.f90
Lines 144 to 146 in 370bccc