Please give me inputs if my choice of using OpenMP is right. This is my use-case.
We have a Windows C++ software that performs the same huge complex calculations on a set of inputs(each is independent and could be done independently by a thread, where I am planning to use OpenMP). The way this would happen is a loop that loops through the inputs(using a for
loop) and calls a function with the input as a parameter(that does the complex calculation). Planning to use #pragma omp parallel for
to parallelize the for
loop. For some inputs, we might decide not to calculate the whole thing and so return from the function in the middle based on some criteria(requirement of quitting in the middle for some threads).
Also, what are the disadvantages of OpenMP? Why would someone not use OpenMP? Can we use it in a commercial software?