Go Back   Flexsim Community Forum > Flexsim Software > Gripes and Goodies
FAQ Downloads Calendar Search Mark Forums Read vBExperience Register

Gripes and Goodies Software problems and suggestions

Reply
 
Thread Tools Display Modes
  #1  
Old 05-21-2008
KelvinHo KelvinHo is offline
Flexsim User
 
Join Date: Jan 2008
Location: Hong Kong
Posts: 129
Thanks: 44
Thanked 22 Times in 7 Posts
Downloads: 18
Uploads: 1
Rep Power: 56
KelvinHo will become famous soon enough
Default 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
Attached Thumbnails
Click image for larger version

Name:	flexsim  CPU usage.jpg
Views:	233
Size:	70.4 KB
ID:	282   Click image for larger version

Name:	config.jpg
Views:	221
Size:	44.0 KB
ID:	283  
Reply With Quote
  #2  
Old 05-22-2008
Brandon Peterson's Avatar
Brandon Peterson Brandon Peterson is offline
The Flexsim Consultant
 
Join Date: Jul 2007
Location: Salt Lake City, Utah
Posts: 369
Thanks: 184
Thanked 452 Times in 219 Posts
Downloads: 29
Uploads: 7
Rep Power: 336
Brandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud ofBrandon Peterson has much to be proud of
Default

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.
Reply With Quote
  #3  
Old 05-22-2008
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 270
Thanks: 53
Thanked 433 Times in 149 Posts
Downloads: 72
Uploads: 4
Rep Power: 329
Anthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud of
Default

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.
__________________
Anthony Johnson
Reply With Quote
  #4  
Old 05-25-2008
Nico Zahn's Avatar
Nico Zahn Nico Zahn is offline
Flexsim User
 
Join Date: Sep 2007
Location: Bingen am Rhein, Germany
Posts: 173
Thanks: 63
Thanked 56 Times in 31 Posts
Downloads: 19
Uploads: 4
Rep Power: 83
Nico Zahn has a spectacular aura aboutNico Zahn has a spectacular aura about
Default

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.
Reply With Quote
  #5  
Old 05-26-2008
Anthony Johnson's Avatar
Anthony Johnson Anthony Johnson is offline
Manager of Product Development
 
Join Date: Jul 2007
Posts: 270
Thanks: 53
Thanked 433 Times in 149 Posts
Downloads: 72
Uploads: 4
Rep Power: 329
Anthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud ofAnthony Johnson has much to be proud of
Default

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.
__________________
Anthony Johnson
Reply With Quote
The Following 3 Users Say Thank You to Anthony Johnson For This Useful Post:
Jörg Vogel (07-03-2008), Nico Zahn (05-26-2008), RalfGruber (06-05-2008)
  #6  
Old 03-09-2010
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 55
Thanks: 14
Thanked 3 Times in 2 Posts
Downloads: 14
Uploads: 0
Rep Power: 22
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Brandon Peterson View Post
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
Any news on this?

Have you solved that you can run Flexsim with different cores?

Thanks !!
Reply With Quote
  #7  
Old 03-09-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Preston, UK
Posts: 211
Thanks: 67
Thanked 343 Times in 130 Posts
Downloads: 20
Uploads: 0
Rep Power: 259
Jason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud of
Default

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.
Reply With Quote
  #8  
Old 03-09-2010
juan alberto juan alberto is offline
Flexsim User
 
Join Date: May 2009
Location: Valencia, Spain
Posts: 55
Thanks: 14
Thanked 3 Times in 2 Posts
Downloads: 14
Uploads: 0
Rep Power: 22
juan alberto is on a distinguished road
Default

Quote:
Originally Posted by Jason Lightfoot View Post
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.
I want to know if I can execute each replication in a different thread. Can you answer it? Thank you!
Reply With Quote
  #9  
Old 03-09-2010
Jason Lightfoot Jason Lightfoot is offline
Flexsim Consultant
 
Join Date: Aug 2007
Location: Preston, UK
Posts: 211
Thanks: 67
Thanked 343 Times in 130 Posts
Downloads: 20
Uploads: 0
Rep Power: 259
Jason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud ofJason Lightfoot has much to be proud of
Default

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.
Reply With Quote
Reply

Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
photo eye usage Martijn van Oostenbrugge Q&A 5 05-07-2008 10:23 AM


All times are GMT -6. The time now is 08:26 PM.


Powered by vBulletin® Version 3.8.4
Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Powered by NuWiki v1.3 RC1 Copyright ©2006-2007, NuHit, LLC
Copyright 1993-2010 Flexsim Software Products, Inc.