Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nvc++ errors with message "float128_type is undefined" #640

Closed
davetaflin opened this issue Sep 14, 2023 · 6 comments · Fixed by #641
Closed

nvc++ errors with message "float128_type is undefined" #640

davetaflin opened this issue Sep 14, 2023 · 6 comments · Fixed by #641

Comments

@davetaflin
Copy link

davetaflin commented Sep 14, 2023

nVidia's HPC toolkit (https://developer.nvidia.com/hpc-sdk-downloads) supplies compiler nvc++, which defines macro __PGI. Using it to compiling a C++ file that #includes <boost/geometry/index/rtree.hpp> issues the following error message (this was with Boost 1.83.0, but the error began occurring with 1.79.0):

.../boost_1_83_0/boost/multiprecision/detail/number_base.hpp", line 205: error: identifier "float128_type" is undefined
struct bits_of<float128_type>

Tested operating system: Ubuntu 20.04 LTS
Compiler: nvc++ 23.7-0 64-bit target on x86-64 Linux -tp haswell

@DJDavies2
Copy link

Is there a solution for this? I am seeing this issue although the versions are slightly different: boost 1.86, nvidia 22.7.

@mclow mclow transferred this issue from boostorg/boost Oct 31, 2024
@mborland
Copy link
Member

Do you have a minimal reproducer? If multiprecision is being run in the CUDA Kernel there's no hope of it working because this library does not support being run in device code. The lines in question are extracted below:

#if defined(_GLIBCXX_USE_FLOAT128) && defined(BOOST_GCC) && !defined(__STRICT_ANSI__)
#define BOOST_MP_BITS_OF_FLOAT128_DEFINED
template <>
struct bits_of<float128_type>
{
   static constexpr unsigned value = 113;
};
#endif

If you're using CMake with GCC as the host compiler all of those conditions are being met.

@DJDavies2
Copy link

The code doesn't get as far as doing anything, the compilation fails just with the #include, e.g.:

`
#include <boost/multiprecision/float128.hpp>

int main()
{
}
`

@mborland
Copy link
Member

mborland commented Nov 4, 2024

This gets things compiling locally: #641. Boost.Config says that the NVC++/PGI compiler should not be providing any kind of Float128 support. The NVC++ documentation only mentions _Float128 in a bug fix so I assume this is still correct.

@DJDavies2
Copy link

Thanks, that fix seemed to work for me.

@mborland
Copy link
Member

mborland commented Nov 6, 2024

Thanks for the confirmation.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants