Undefined reference error to 'fatbinwrap' - CUDA/C++ [duplicate] - c++

I would linke to know if it is possible to use gcc/g++ as the c/c++ compiler in windows based CUDA? Furthermore, how can I compile fortran together with nvcc?
I am running CUDA 10.2 and the mingw gcc 8.1.0.

No it is not possible. The only supported host compiler for use with CUDA on windows is cl.exe, the compiler that ships with visual studio C++.
If you use the WSL2 environment on windows, then you can use gcc/g++ with CUDA in that linux-like environment.

Related

Can I use Thread Sanitizer on Windows 10?

I'd like to test data races in C++ on windows 10(64 bit), but it seems that Visual C++ doesn't support it yet.
So, I installed Cygwin and got g++ 11.2.0, tried compiling my C++ code with -fsanitize=thread -fPIE -pie -g, but it failed with -ltsan not found error.
The doc doesn't say anything about Windows. Is it even possible to use Thread Sanitizer on Windows? If so, How?
The sanitizers you linked are implemented in Clang, not MSVC or gcc.
You can use clang with Visual Studio. To do so you need to install the appropiate toolchain.
You can run clang directly on Windows, via cygwin or via WSL.
In addition could you post your complete compile command (e.g. via godbolt.org)?
e.g.: https://godbolt.org/z/fax6o9E1f
Just use WSL and use thread sanitizer on it.

Does ifort support coarrays on mac

So I followed all of the instructions on Intel site to get parallel studios and ifort installed on my MacBook Pro. I have confirmed I can correctly compile regular Fortran program and execute them, but I cannot seem to find any distinct answers as to if ifort on Mac supports coarrays.
The compiler documentation for Intel Fortran version 19.1 says there is no support for coarray on macOS. It's available on Windows and Linux though.

Why does mingw-w64 support strcpy_s() while tdm-gcc fails compiling that call?

I'm trying to compile an open source library from bitbucket for various platforms. Compiling for Windows works only using the mingw-w64/32 4.8 compiler. Other compilers like tdm-gcc 5.1 fail at those lines calling "strcpy_s", stating they are not defined in this scope. On Linux, compiling works without a problem using the standard gcc on Ubuntu 16.04. I'm aware of the workaround to replace the (c++ 11) strcpy_s with std::strcpy.
I don't understand why this is happening because the tdm-gcc is even more up to date than the mingw-w64 version.

How can I create the project in Eclipse-nsight which use both Intel C++ and CUDA C++?

I want to use ICC (Intel C++ Compiler) with CUDA NVCC (nVidia C++ Compiler) on Linux in the Eclipse-nsight.
I installed CUDA 5.5 with Eclipse-nsight and Intel Cluster Studio 2013 XE
and then I installed plug-ins (ICC toolchain) in the Eclipse-nsight via menu Help-> Install New Software ... https://software.intel.com/en-us/articles/intel-c-compiler-for-linux-using-intel-compilers-with-the-eclipse-ide-pdf
Now I can create Intel C++ project or CUDA C++ project. But how can I create the project which can contain at the same time both. Cpp-files and. Cu-file, and which automatic compile Cpp-files by using ICC and Cu-file by using NVCC?
Which project should I create: Intel C++ or CUDA C++, and what should I do then?
(Or may be someone known how can I create the project in Eclipse-nsight which use both GCC and ICC, and it will help me)
In CUDA project properties, specify the ccbin NVCC command line flag.

Minimal GCC C++ Compiler

I'm trying to minimize the resources required to compile and run c++ code with GCC. I downloaded DevC++'s portable version but I'm looking more towards what files do I need to ONLY run gcc via command prompt and compile against all standard libraries. I'm not interested in Windows applications, only command prompt.
Is there an already stripped version of GCC out there? And if not, would anyone be able to lend me a hand
*I know of CygWin, and MinGW already, I'm looking for the bare minimals to using the cpp compiler for GCC. Like Tiny C where the entire functioning compiler and libraries is under 200 kilobytes, I'm looking to emulate that workflow with a cpp compiler.
MinGW
MinGW, a contraction of "Minimalist GNU for Windows", is a minimalist development environment for native Microsoft Windows applications.
Primarily intended for use by developers working on the native MS-Windows platform, [...] MinGW includes:
A port of the GNU Compiler Collection (GCC), including C, C++, ADA and Fortran compilers;
GNU Binutils for Windows (assembler, linker, archive manager)
A graphical and a command-line installer for MinGW and MSYS deployment on MS-Windows