
Hi Botond, You probably should not look at the % use of each core. Use the OMP_NUM_THREADS variable to do a scaling experiment of elapsed time with 1,2,4,8 etc up to the number of physical cores to see how close you are getting to perfect scaling. You also need to be careful to "prime the OpenMP pump" before your timing loop as OpenMP starts up the threads in a thread pool. Getting perfect scaling is always tricky when using OpenMP or other mult-threading approaches. There can be software issues with memory contention and locks, or overheads based on your hardware. Using a tool like Intel Amplifier or other thread profiling tools are essential to understanding the issue and finding the bottlenecks. Andrew On Mon, Dec 21, 2020 at 10:00 AM <btyukodi@brandeis.edu> wrote:
Hi All,
I have implemented a simulation as an OpenMesh app. In general, I have calculations on n separate meshes and occasionally a joint calculation which affects all of the meshes. I was trying to parallelize the simulation via OpenMP, assigning a separate core to each of the meshes. For testing, I am running in a regime where there are no joint calculations so all the calculations should be completely independent. Yet, none of my CPUs run at 100%, they are at around 80%. When I run it on a single core, it's constantly near 100%.
I was wondering whether there are any global shared variables which prevent such parallelization or what needs to be modified in the cmake file. Currently, I do
set(CMAKE_CXX_FLAGS_RELEASE "-O3 -fopenmp")
and it seems to compile and use the defined number of cores. Is there anything else to be done? Note that I do not want to parallelize OpenMesh itself, I just want to parallelize my own little app, a single for loop.
Thank you, Botond _______________________________________________ OpenMesh mailing list -- openmesh@lists.rwth-aachen.de To unsubscribe send an email to openmesh-leave@lists.rwth-aachen.de https://lists.rwth-aachen.de/postorius/lists/openmesh.lists.rwth-aachen.de