nvcc -O3 -DNDEBUG -DADD_ -Xcompiler "-fPIC -Wall -Wno-unused-function -fopenmp" -std=c++11 -DMKL_ILP64 -gencode arch=compute_89,code=sm_89 -gencode arch=compute_89,code=compute_89 -I/usr/local/cuda/include -I/opt/intel/oneapi/mkl/2024.2/include -I./include -I./testing -I./control -c -o magmablas/zgbtf2_kernels.o magmablas/
zgbtf2_kernels.cuIn file included from /usr/include/c++/13/string:51,
from /usr/include/c++/13/bits/locale_classes.h:40,
from /usr/include/c++/13/bits/ios_base.h:41,
from /usr/include/c++/13/streambuf:43,
from /usr/include/c++/13/bits/streambuf_iterator.h:35,
from /usr/include/c++/13/iterator:66,
from /usr/local/cuda/include/cuda/std/__iterator/iterator_traits.h:46,
from /usr/local/cuda/include/cuda/std/__iterator/iter_move.h:25,
from /usr/local/cuda/include/cuda/std/__iterator/concepts.h:41,
from /usr/local/cuda/include/cuda/std/__fwd/subrange.h:23,
from /usr/local/cuda/include/cuda/std/__fwd/get.h:26,
from /usr/local/cuda/include/cuda/std/__utility/pair.h:29,
from /usr/local/cuda/include/cuda/std/__functional/hash.h:35,
from /usr/local/cuda/include/cuda/std/detail/libcxx/include/__threading_support:23,
from /usr/local/cuda/include/cuda/std/__atomic/wait/polling.h:27,
from /usr/local/cuda/include/cuda/std/atomic:41,
from /usr/local/cuda/include/cuda/std/__cuda/atomic.h:24,
from /usr/local/cuda/include/cuda/atomic:14,
from /usr/local/cuda/include/cooperative_groups.h:61,
from magmablas/
zgbtf2_kernels.cu:15:
/usr/include/c++/13/bits/stl_algobase.h:281:56: error: macro "min" passed 3 arguments, but takes just 2
281 | min(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^
In file included from magmablas/
zgbtf2_kernels.cu:13:
./control/magma_internal.h:247: note: macro "min" defined here
247 | #define min(a, b) ((a) < (b) ? (a) : (b))
|
/usr/include/c++/13/bits/stl_algobase.h:303:56: error: macro "max" passed 3 arguments, but takes just 2
303 | max(const _Tp& __a, const _Tp& __b, _Compare __comp)
| ^
./control/magma_internal.h:243: note: macro "max" defined here
243 | #define max(a, b) ((a) > (b) ? (a) : (b))
|
In file included from /usr/include/c++/13/bits/chrono.h:39,
from /usr/include/c++/13/chrono:41,
from /usr/local/cuda/include/cuda/std/detail/libcxx/include/chrono:838,
from /usr/local/cuda/include/cuda/std/chrono:26,
from /usr/local/cuda/include/cuda/std/detail/libcxx/include/__threading_support:24:
/usr/include/c++/13/limits:317:11: error: macro "min" requires 2 arguments, but only 1 given
317 | min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
| ^
./control/magma_internal.h:247: note: macro "min" defined here
247 | #define min(a, b) ((a) < (b) ? (a) : (b))
|
/usr/include/c++/13/limits:321:11: error: macro "max" requires 2 arguments, but only 1 given
321 | max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
| ^
./control/magma_internal.h:243: note: macro "max" defined here
243 | #define max(a, b) ((a) > (b) ? (a) : (b))
The error is repeated many times and apparently when "min" and "max" macros are called. I tried to rename the macros in MAGMA internal to "_min" and "_max" to fix the conflict and it seemed to work, but there are many places in the code and I will face problems when I update MAGMA in the future. Is there any fix for it or am I doing something wrong?