I’m unable to use nv-nsight-cu-cli on a system running Yocto Linux (Poky). There seems to be an issue with boost::locale complied into nv-nsight-cu-cli. My test program is compiled with gcc 4.9.3 and glibc 2.23. I’ve tried NVIDIA Compute 1.0 and 2019.4.0 from the Ubuntu 14.04 and 16.04 Debian installers. You can see from the program output below that std::locale appears to be working. I’ve tried rebuilding the en_US.UTF-8 locale with localedef, but that doesn’t resolve the issue. Please help, and thanks!
My test program:
#include <cuda_runtime_api.h>
#include <stdio.h>
#include <locale>
#include <iostream>
int main()
{
std::wcout << "User-preferred locale setting is " << std::locale("").name().c_str() << '\n';
std::wcout << 1000.01 << '\n';
std::locale::global(std::locale(""));
std::wcout.imbue(std::locale());
std::wcout << 1000.01 << '\n';
std::wcout << "START" << '\n';
cudaDeviceSynchronize();
std::wcout << "END" << '\n';
return 0;
}
Program output when run standalone ./test:
User-preferred locale setting is C
1000.01
1000.01
START
END
Program output when run as LANG=en_US.UTF-8 ./test:
User-preferred locale setting is en_US.UTF-8
1000.01
1,000.01
START
END
Program output with Compute 2019.4.0… nv-nsight-cu-cli ./test:
User-preferred locale setting is C
1000.01
1000.01
START
terminate called after throwing an instance of 'N5boost6locale4conv21invalid_charset_errorE'
what(): Invalid or unsupported charset:ANSI_X3.4-1968
==ERROR== The application returned an error code (6)
==WARNING== No kernels were profiled
==WARNING== Profiling kernels launched by child processes requires the --target-processes all option
Program output with Compute 2019.4.0… LANG=en_US.UTF-8 nv-nsight-cu-cli ./test:
User-preferred locale setting is en_US.UTF-8
1000.01
1,000.01
START
terminate called after throwing an instance of 'N5boost6locale4conv21invalid_charset_errorE'
what(): Invalid or unsupported charset:ANSI_X3.4-1968
==ERROR== The application returned an error code (6)
==WARNING== No kernels were profiled
==WARNING== Profiling kernels launched by child processes requires the --target-processes all option
Program output with Compute 1.0… nv-nsight-cu-cli ./test:
User-preferred locale setting is C
1000.01
1000.01
START
terminate called after throwing an instance of 'N5boost6locale4conv21invalid_charset_errorE'
what(): Invalid or unsupported charset:ANSI_X3.4-1968
==PROF== ERROR: Target application terminated before first instrumented API call.
Program output with Compute 1.0… LANG=en_US.UTF-8 nv-nsight-cu-cli ./test:
User-preferred locale setting is en_US.UTF-8
1000.01
1,000.01
START
terminate called after throwing an instance of 'N5boost6locale4conv21invalid_charset_errorE'
what(): Invalid or unsupported charset:UTF-8
==PROF== ERROR: Target application terminated before first instrumented API call.