Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revisionPrevious revision
Next revision
Previous revision
kb:parallel [2018/01/05 17:41] – [Practical Issues] enviadminkb:parallel [2021/04/21 09:38] (current) – [Practical Issues] enviadmin
Line 5: Line 5:
 Parallel computing is a wonderful option to reach never observed calculation speeds, but it is also a source of pitfalls and misunderstandings. According to Stephen Toub from Microsoft [1], there are even pitfalls for pitfalls. Parallel computing is a wonderful option to reach never observed calculation speeds, but it is also a source of pitfalls and misunderstandings. According to Stephen Toub from Microsoft [1], there are even pitfalls for pitfalls.
  
-Many people have a concept what parallel computing is, and they want to have it in their applications, but as this is a relatively new area of computing, it contains many misunderstandings and misleading expectations we try to clarify in this Knoledge Base.+Many people have a concept what parallel computing is, and they want to have it in their applications, but as this is a relatively new area of computing, it contains many misunderstandings and misleading expectations we try to clarify in this Knowledge Base.
  
-So, please read the following sections carefully to get most of the new options of ENVI-met.+ 
 +====== Q&A on Parallel Computing with ENVI-met  ====== 
 + 
 +Please read the following sections carefully to get most of the new options of ENVI-met.
  
 ~~QNA~~ ~~QNA~~
Line 36: Line 39:
 Parallel computing is at its best if the packages send are large and the tasks included are heavy like in large ENVI-met models. Parallel computing is at its best if the packages send are large and the tasks included are heavy like in large ENVI-met models.
  
-Imagine yourself going shopping with 5 friends in a supermarket. You (the main task) will be responsible for distributing the tasks ("Get a package of milk") over your friend. You will assign the task, collect the items returned, delete them from your shopping list and assign new task to the waiting friends.+Imagine yourself going shopping with 5 friends in a supermarket. You (the main task) will be responsible for distributing the tasks ("Get a package of milk") over your friends. You will assign the tasks, collect the items returned, delete them from your shopping list and assign  new tasks to the waiting friends.
  
 If the tasks are very easy, because the supermarket is small and well organized and the items are easy to find, your friends will be back with the assigned items very quickly and you will be very busy with your (non-parallel) coordination tasks.  If the tasks are very easy, because the supermarket is small and well organized and the items are easy to find, your friends will be back with the assigned items very quickly and you will be very busy with your (non-parallel) coordination tasks. 
  
-In fact, you may find out that it would be actually faster to do the shopping for you alone and process one item after the other on the list.+In fact, you may find out that it would be actually faster to do the shopping on your own and process one item after the other on the list.
  
-The larger the supermarket gets and the more complicated the items to find are, the more you benefit from the help of your friends. Ideally, they all require the same amount of time to fetch the items and come back to you in one block. That's the situation when parallel work will be most efficient. +The larger the supermarket gets and the more complicated the items are to find (large models, complex calculation tasks), the more you benefit from the help of your friends. Ideally, they all require the same amount of time to fetch the items and come back to you in one block. That's the situation when parallel work will be most efficient.  
 + 
 + 
 +??? Can I run ENVI-met on any Supercomputer ? 
 +Yes, if the Supercomputer runs under or supports WINDOWS. If the operating system is LINUX or other, you cannot run ENVI-met as there is no LINUX version so far.
  
  
Line 62: Line 69:
 If you plan to run more than one simulation on the same computer, you should select modified Parallel Computing options in the ProjectWizard such as "HALF" (running 2 simulations) or "QUAD" (4 simulations).  If you plan to run more than one simulation on the same computer, you should select modified Parallel Computing options in the ProjectWizard such as "HALF" (running 2 simulations) or "QUAD" (4 simulations). 
  
-You may also decide to turn of parallel computing in general (set 1 Core), because you already perform a kind of parallel computing when executing serveral ENVI-mets at the same time.+You may also decide to turn of parallel computing in general (set 1 Core), because you already perform a kind of parallel computing when executing several ENVI-mets at the same time.
  
  
-??? When I run the model, my CPU does not reach 100% usage if I told ENVI-met to use all cores+??? When I run the model, my CPU does not reach 100% usage although I told ENVI-met to use all cores
  
-This questions relates, at least in parts, to the question //Is the whole model run in parallel?// . As described there, not all parts of ENVI-met can be run in parallel, so there is always a siginificant non-parallel amount of computation running on a single core. +This questions relates, at least in parts, to the question //Is the whole model run in parallel?// . As described there, not all parts of ENVI-met can be run in parallel, so there is always a significant non-parallel amount of computation running on a single core. 
  
 Moreover, and this relates to the question //Is parallel computing always faster (than sequential computing)// ? each execution of a parallel processes requires some overhead in the main process, before the parallel task is launched. This work can also only be done non-parallel. Moreover, and this relates to the question //Is parallel computing always faster (than sequential computing)// ? each execution of a parallel processes requires some overhead in the main process, before the parallel task is launched. This work can also only be done non-parallel.
Line 76: Line 83:
 ??? I assigned only one core to ENVI-met, but still all cores are actually used when I look at the task manager ??? I assigned only one core to ENVI-met, but still all cores are actually used when I look at the task manager
  
-Well, //assigning one core// is over-simplification of the whole process. What it actually means is, that ENVI-met will request computing power equivalent to the computing resources of one CPU core. Under WINDOWS (and any other moder OS), an application does not consist of ONE thread, even if it is "single threaded". It is listening to messages, is corresponds with the WINDOWS system, it paints the screen output etc etc. +Well, //assigning one core// is an over-simplification of the whole process. What it actually means is, that ENVI-met will request computing power equivalent to the computing resources of one CPU core (that is 25 tasks per CPU core). Under WINDOWS (and any other modern OS), an application does not consist only of ONE thread, even if it is "single threaded". It is listening to messages, is corresponds with the WINDOWS system, it paints the screen output etc etc.  
 + 
 +So, normally all the computing power demanded by an application is distributed in threads over all available CPU cores. So, setting ENVI-met to use e.g. 1 core still will cause all CPU cores to be involved in the processes unless you set up very specific settings on your computer. 
 + 
 +??? I started an ENVI-met without any specific CPU usage instructions. How many CPUs cores will it use? 
 + 
 +The default setting is to use all available CPU cores, that are assigned by the operating system. How many cores this will actually be in the end, will not only depend on your computer, but also on the amount of other applications running parallel to ENVI-met. Also, the amount of cores is assigned dynamically by WINDOWS and is also requested dynamically by ENVI-met depending on the specific simulation task. In other words: If ENVI-met is operating in a model section that is not parallel, it will not request more than one core.
  
-So, normally all the computing power demanded by an application is distributed in single threads over all available CPU cores. So, setting ENVI-met to use e.g. 1 core still will cause all CPU cores to be involved in the processes unless you set up very specific settings on your computer.