This project is read-only.

Multi-tread / Multi-core processing

Sep 25, 2009 at 3:24 PM

Dear Sirs!

Shall I get information in this question?

I have a quad-core CPU and when I use this SW the CPU utilization is only 25-26%.

Can you make a compillation what can run on 100% speed on 2 or 4 cores CPUs?

Thank you!


Sep 26, 2009 at 8:37 AM

There is some support in the code for multithreading but it is currently disabled.  I don't think anyone at the moment is planning to reintroduce it so for now, I'm sorry, I think you're going to be unlucky.



Sep 27, 2009 at 3:02 AM

The multithreading support is present but requires a weird module activated. When I was creating the source upload here I was playing about with it and couldn't get the module to behave in a stable manner. The source for that module is out of date and doesn't look like its being maintained anymore so it makes it really difficult to support. It's a shame as with multi core processors today creating a threaded environment should be a lot simpler than it currently is.

The jEnhSim should have a far easier time setting up multi threading as java has a lot of support for multi threading and seems a lot simpler to implement.

Sep 27, 2009 at 6:55 PM

If there's more interest I could possibly look at converting the multiprocessing to OpenMP.  I've used that tech in the past with good success.

This is with the caveat that I still haven't taken a look at the guts of the sim code and not sure how adaptable it would be :)


Aug 2, 2011 at 2:21 PM

How is the plan to reimplement Multiprocessing with OpenMP? Any Plans to do this?

Mar 16, 2012 at 5:51 PM

I managed to hack Enhsim and use the PPL (Parallel Patterns Library) parallel_foreach function in EP calculation,
so every EP stat gets executed simultaneously in thread groups.
It executes in approx. 25% compared to the standard sim on an i7 quad-code machine.

I fear it's a Windows only library, though. I will try to use OpenMP when/if I have time.

The hack is pretty raw and my knowledge of C++ and related libraries is far from deep, but testing so far seems ok.

I can upload a modified version of sources and executables in case anyone is interested