run CPU console app in GPU thread

Hello Anybody! Thell me please. How to run this console application https://www.cs.unm.edu/~mccune/mace4/ in GPU threads (or blocks) with CUDA?

What are you trying to accomplish?

  1. Are you trying to accelerate the solver?
  2. Is it a bottleneck?
  3. Have you confirmed the math is even parallelizable?

If yes, yes, and yes, then download the CUDA toolkit and review the examples. You will need to port the code to CUDA.

Thank you for you answer! Yes, yes, and yes, but I no have some skills. Prover and Mace have sources in https://github.com/theoremprover-museum/prover9/tree/master/source I compile it with CygwinX86. How to compile this console application with NVCC without rewrite all sources - for theorem proving in one GPUThread of one GPUBlock (I need parallele prove big count of theorems).

I would definitely start with trying to compile everything with NVCC first. Maybe this link with help.

https://devblogs.nvidia.com/separate-compilation-linking-cuda-device-code/

Once you have that then start by porting a simple function to CUDA. The links below are great to start with. The first one is a good introduction to CUDA and the second show you a good way to iterate over a large array with 1 block and 1 thread.

https://devblogs.nvidia.com/even-easier-introduction-cuda/

https://devblogs.nvidia.com/cuda-pro-tip-write-flexible-kernels-grid-stride-loops/

You also want to check out our DLI courses on accelerated computing!

https://www.nvidia.com/en-us/deep-learning-ai/education/

Thank You for links. Now I read the base conceptions in the book “Sanders,Kandrot-CUDA by Example An Introduction to General-Purpose GPU Programming-2010”.

NVCC uses only cl.exe (part of MSVS)? But Prover9 sources written on GCC. It is possible to compiles NVCC with use GCC in Windows? Or this is only for Ubuntu way?

I don’t use Windows so I’m going to point you to link again. Sorry.

http://www.mingw.org/

Might be easier to work on Ubuntu…

No, you can’t use gcc on windows. Only cl.exe

The supported environments for windows development for CUDA are covered in the CUDA windows install guide.