1
votes

I have a following problem. I am a physicist. For my current work I have to numerical investigate some problem.

I calculate some 7D integrals using monte carlo method. I use OpenMP for parallel computing but my program work slowly at one computers. At work, man from IT department, says that he can make virtual machine, and I can calculate using distributed computing.

I use C++ and OpenMP(for parallel computing). My question is the following:

Will my program work at virtual machine with distributed computing? How I should modify my code for distributed computing(if it necessary)?

My code for parallel computing is very simple

omp_set_dynamic(0);
omp_set_num_threads(Npot);
#pragma omp parallel for shared(result, errors) private(i)`
for (i = 0; i < Npot; i++){
..... 
}
1
May be using CUDA with a high end graphic card? - Peter VARGA
I am not familiar with programing at all. If I understand correctly calculation by graphic card are good in case if operations are simple. But in my case integrand contain squared 2D integral with is contained special function (like hypergeometric function with complex parameters). - Peter
"I have a problem. I am a physicist." - love it :-) - Mark Setchell
A virtual machine is unlikely to make an algorithm run faster because ultimately you still only have the same amount of hardware. - Mark Setchell
It depends on number of real core wich will be includeed in virtual machine. - Peter

1 Answers

1
votes

OpenMP is to distribute the code over the cores of one processor. If you want to use multiple processors, like your pc and the VM, you will have to look into MPI. How you to connect the two together, I don't know. But now you have a starting point.

You could also use CUDA to run your code on your graphics card.