core
core copied to clipboard
Check compatibility of zoltan and metis idx at config time
At zoltan/apfZoltanCallbacks.cc:305 we check that zoltan and metis integers are the same size. Since the check only involves compile time constants, this should be done at config time, rather than inside a runtime assert (saving users several hours of debugging).
E.g., one could use the try_compile cmake command, to check that the following compiles:
#include <metis.h>
#include <zoltan_types.h>
int main (int, char**) {
typename std::enable_if<sizeof(ZOLTAN_ID_TYPE)*8 == IDXTYPEWIDTH, int>::type i = 0;
return i;
}
If this is not acceptable, the assert should at the very least be replaced with a static_assert.