compile error building master with intel compiler

I’m trying to build master on centos-7 with intel icc (ICC) 19.1.1.217 20200306 and I get this compile error:

Filters/Sources/vtkPlaneSource.cxx(405): error: more than one instance of overloaded function "abs" matches the argument list:
        function "abs(int)"
        function "std::abs(long long)"
        function "std::abs(long)"
        argument types are: (double)
if (abs(angle) < EPSILON)
    ^

Can I safely change abs into std::abs?

std::fabs seems appropriate here. Please consider submitting a patch

https://gitlab.kitware.com/vtk/vtk/blob/master/Documentation/dev/git/develop.md

Please also consider submitting a nightly build to https://open.cdash.org/index.php?project=VTK It seems there are no icc builds there, and without one, such errors are bound to return.

As the input is a double, fabs shouldn’t be used here. In any case, std::abs is better since it provides the proper double overload (see here).

Yes indeed, std::abs is fine. (interestingly std::fabs has a double override as well)

Wait, what? Both fabs() and std::fabs() are fine with double.

Is there some documentation available on what this means in terms of workload for involved machines, and what kind of maintenance effort is needed to the keep the build process alive? I can discuss this with my boss to see if my company is willing to do this but I couldn’t find any relevant information from the dashboard or project menu items to convince them with.

Yep you’re right, for some reason I thought there was no double overload for fabs :slight_smile:

FWIW, we’re working on Intel CI runs in this MR.