ATTENTIONThis FlexSim Community Forum is read-only. Please post any new questions, ideas, or discussions to our new community (we call it Answers) at https://answers.flexsim.com/. Our new Question & Answer site brings a modern, mobile-friendly interface and more focus on getting answers quickly. There are a few differences between how our new Q&A community works vs. a classic, threaded-conversation-style forum like the one below, so be sure to read our Answers Best Practices. |
flexsim.com |
#1
|
|||
|
|||
Duel Core CPU usage
Hi all,
I notice that while running the model, the CPU usage is only 50%, (see attachment)I think it might be the Duel COre CPU issue. In order to speed up the simulation, is there anyway to use more than 50% CPU resource? Also attach with my comp config Kelvin |
#2
|
||||
|
||||
Kelvin,
No there is currently not a way to use both processors on a dual core machine. The reason for this is that Flexsim can not run on more than one thread. Multi-threaded applications need to be OK with different functions happening in non-specific orders but discrete event simulations require that events happen in very specific orders. We are working on ways to try and make this possible in future releases but it is a very hard problem to solve in a way that makes it easy to implement for the user. Brandon
__________________
thats not normal. |
#3
|
||||
|
||||
Kelvin,
If you are doing an experiment and want to finish the experiment faster, you can always run two instances of Flexsim at the same time, with one doing one experiment and the other doing another experiment. This will let you use the whole CPU, but you just won't be able to merge the experiments at the end (unless you can get into the tree structure and do some scripting to merge the two). Also, I've done some experimenting with using OpenMP, a somewhat well known multithreading standard, in a project I've done. I haven't been able to get it to work yet, but there is potential there. However, the benefit will probably be marginal because, as Brandon said, discrete event simulation and multithreading don't go together naturally. There is a lot of sorting, ordered search, etc., and those just aren't things that lend themselves well to multithreading. Perhaps the "multiple instances of Flexsim" solution is the way to go, and we should just have an easier mechanism for merging experiment results. |
#4
|
||||
|
||||
Hi, till now I was convinced that running more than one instance of Flexsim at a time on one machine will cause some conflicts?
So can I run two instances or more at once without problems?
__________________
kind regards Nico. |
#5
|
||||
|
||||
There are problems with running two instances of Flexsim if you have to compile your model, because that uses some shared files in the program directory, which can cause problems. But if your models do not need to be compiled, then you can run as many instances of Flexsim as you like.
|
The Following 3 Users Say Thank You to Anthony Johnson For This Useful Post: | ||
RalfGruber (06-05-2008) |
#6
|
|||
|
|||
Quote:
Have you solved that you can run Flexsim with different cores? Thanks !! |
#7
|
|||
|
|||
Anthony has answered this already, so these are just additional notes.
If you switch on some advanced graphics features (antialiasing etc.. through the manufacturers GPU control panel) you will probably start to see that the other core(s) used as it can aid the graphics processor - so it seems you can make your models look better with some help from the idle core. Other than that the most consistent benefit in using multiple cores is to run different replications on each core. In this way, the type of problem is 'massively parallel' and the benefit scales linearly with the number of cores. Currently this is something a fairly capable modeller can solve by not compiling the model (or if necessary putting compiled code in a DLL) managing their stream initialisation using the function randinit (I recommend streams 101 and above which are clear of the ones Flexsim automatically resets). Of course your model needs to be repeatable, which means all variables/labels need to be reset to the same values for each replication and task executers need to be reset to the same position. To collect the results centrally, it might be easiest (depending on the modellers skillset) to use a database and store the scenario and replication against each record. |
#8
|
|||
|
|||
Quote:
|
#9
|
|||
|
|||
Yes you can . But you need to take control of what makes one replication different from another - and usually that is done through controlling the random number stream initialization and making good use of the stream parameter in the time distribution functions so that they match the streams you're taking control over.
There's some example code for generating repeatable stream initialization values based on replication here: http://www.flexsim.com/community/for...=2314#post2314 These days I think the code can just go in the model reset area. How you then choose to adjust the replications so that each instance runs a different set, is then up to you . You could use global variable called 'replicationOffset' that you add onto the replication variable in that code. One instance of Flexsim would have an offset of zero and the other could be the half the number of replications you need, which would also be the number you would enter in the experiment table's 'number of replications' field in both instances. It's not seamless as I've described it here, but it could be, depending on your coding experience and the effort you put in. |
Thread | Thread Starter | Forum | Replies | Last Post |
photo eye usage | Martijn van Oostenbrugge | Q&A | 5 | 05-07-2008 12:23 PM |