- edited description
TACC Stampede3-skx Compilation Failing [-Wincompatible-function-pointer-type]
I am failing to compile on the new TACC Stampede3 skx-nodes (Intel Xeon Platinum 8160 ("Skylake"), documentation here). I am running into the following error that terminates the compilation:
/work2/09313/<user>/stampede3/einstein/Cactus/arrangements/CactusNumerical/ReflectionSymmetry/src/register.c:67:22: error: incompatible function pointer types passing 'CCTK_INT4 (const restrict CCTK_POINTER_TO_CONST, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const restrict CCTK_POINTER_TO_CONST *, const CCTK_INT4, const CCTK_INT4 *, const CCTK_INT4, const CCTK_INT4 *, const restrict CCTK_POINTER *, const CCTK_INT4)' (aka 'int (const void *const restrict, const int, const int, const int, const int, const int, const int, const void *const restrict *, const int, const int *, const int, const int *, void *const restrict *, const int)') to parameter of type 'CCTK_INT4 (*)(const CCTK_POINTER_TO_CONST, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_INT4, const CCTK_POINTER_TO_CONST *, const CCTK_INT4, const CCTK_INT4 *, const CCTK_INT4, const CCTK_INT4 *, const CCTK_POINTER *, const CCTK_INT4)' (aka 'int (*)(const void *const, const int, const int, const int, const int, const int, const int, const void *const *, const int, const int *, const int, const int *, void *const *, const int)') [-Wincompatible-function-pointer-types]
67 | (cctkGH, handle, ReflectionSymmetry_Interpolate);
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
/work2/09313/<user>/stampede3/einstein/Cactus/configs/vacuum/bindings/include/ReflectionSymmetry_Prototypes.h:56:19: note: passing argument to parameter 'symmetry_interpolate' here
56 | CCTK_INT (*const symmetry_interpolate)(const CCTK_POINTER_TO_CONST cctkGH ,
| ^
1 error generated.
I have attached the machine and option list being used for Stampede3-skx.
Comments (13)
-
reporter -
- marked as minor
downgrading to minor from blocker since it does not prevent compilation on all machines and stampede3 is not among the machines in the official list of supported systems
-
- changed status to new
-
these seem to differ only in the
restrict
keyword used by `ReflectionSymmetry`. The interface specification of the aliased functionCCTK_INT FUNCTION \ SymmetryRegisterGridInterpolator \ (CCTK_POINTER IN cctkGH, \ CCTK_INT IN sym_handle, \ CCTK_INT CCTK_FPOINTER IN symmetry_interpolate \ (CCTK_POINTER_TO_CONST IN cctkGH, \ CCTK_INT IN N_dims, \ CCTK_INT IN local_interp_handle, \ CCTK_INT IN param_table_handle, \ CCTK_INT IN coord_system_handle, \ CCTK_INT IN N_interp_points, \ CCTK_INT IN interp_coords_type, \ CCTK_POINTER_TO_CONST ARRAY IN interp_coords, \ CCTK_INT IN N_input_arrays, \ CCTK_INT ARRAY IN input_array_indices, \ CCTK_INT IN N_output_arrays, \ CCTK_INT ARRAY IN output_array_types, \ CCTK_POINTER ARRAY IN output_arrays, \ CCTK_INT IN faces))
has no
restrict
in it (not sure if this can even be expressed in the CCL file).So the function prototypes differ, though if that difference is something that the compiler may care about (since restrict is just a property of the function and does not affect externally visible behaviour) may be a different question.
Since this is just a warning, it should not actually stop the compilation though.
It maybe good to include the full compilation output as described on http://einsteintoolkit.org/support.html#general-guidelines-for-questionsIf this warning is indeed what makes the compilation abort I’d add
-Wno-incompatible-function-pointer-types
to
CFLAGS
andCXXFLAGS
of the option list (cfg file). -
This was discussed in today’s Einstein Toolkit call. Steve also encountered this issue with g++-14 which also flags this as an error.
The solution agreed on in the phone call is to remove the restrict keyword from ReflectionSymmetry, at least for this release.
A future change may addrestrict
(if supported by the compiler) to all array and pointer arguments. This is b/c the aliased functions may also be implemented in Fortran and Fortran requires therestrict
property for all arguments anyway. -
reporter Thank you for the suggestions. The compiler flag suggestion bypassed the error that was killing the compilation.
-Wno-incompatible-function-pointer-types
-
-
assigned issue to
-
assigned issue to
-
- changed status to open
-
Pull request is: https://bitbucket.org/cactuscode/cactusnumerical/pull-requests/22
-
Please review
-
Steve says: Please apply
-
Applied as git hash 6f421ce6 "ReflectionSymmetry: remove restrict from registered interpolation fct" of cactusnumerical
-
- changed status to resolved
- Log in to comment
Modules being loaded:
Compile instructions used:
All details can be found in the attached machine and optionlist files. Let me know if there is anything else I can provide.