Intel® oneAPI DPC++/C++ Compiler
Talk to fellow users of Intel® oneAPI DPC++/C++ Compiler and companion tools like Intel® oneAPI DPC++ Library, Intel® DPC++ Compatibility Tool, and Intel® Distribution for GDB*

First build today of n-body. I'm stuck.

BrianOBrien1
Beginner
626 Views

Hi.  I used to write C++ Application using IntelIPL.   Today I am compiling my first OneAPI application and need a little nudge in the right direction.

I am running on windows 10 with nVidia GTX 1060

I downloaded and the n-body simulation and imported into visual studio community 2022.

I set the compiler to Intel OneAPI DPC++/C++ Compiler.
and built both debug and release successfully.

However nothing happens on the screen when I run the program.
I get the a report output from the console and then the application exits.
I run it in the debugger, and it hangs, on these instructions:

Pointers please?  Was it suppose to show a graph of points moving?

 

 

 

template <size_t count, class F> void loop(F &&f) {  
   loop_impl(std::make_index_sequence<count>{}, std::forward<F>(f));
}
D:\Development\N-Body\x64\Release>Nbody.exe
===============================
Initialize Gravity Simulation
nPart = 16000; nSteps = 10; dt = 0.1
------------------------------------------------
s dt kenergy time (s) GFLOPS
------------------------------------------------
1 0.1 26.405 0.58758 12.635
2 0.2 313.77 0.037273 199.19
3 0.3 926.56 0.03788 196
4 0.4 1866.4 0.037541 197.76
5 0.5 3135.6 0.035854 207.07
6 0.6 4737.6 0.036693 202.33
7 0.7 6676.6 0.036044 205.98
8 0.8 8957.7 0.038001 195.37
9 0.9 11587 0.036453 203.67
10 1 14572 0.036256 204.77

# Total Time (s) : 0.93999
# Average Performance : 201.62 +- 4.3142
===============================

 

 

I moved on to the mandelbrot sample, it compiles and almost runs... it just pops up a blank screen and then i get an exception thrown.


mandelbrot.PNG

It seems to me that the method should have been CaclulateDP (double precision) instead it is calling itself and recusing into stack overflow.

 

 

 

 

 

 

 

 

0 Kudos
0 Replies
Reply