Sets the number of threads

There are two ways to set the number of threads, one is directly in the "Environment" dialog box, and the other is in the Modify Configuration file. The specific setting method is as follows:

  • Click the "File" button, select "Options" in the menu, and directly set the "Number of Parallel Calculation Threads" in the "Environment" setting page of the pop-up " Options" dialog box.
  • The < ompnum threads > node in the system Config File SuperMap. XML is used to specify the number of threads, with an initial value of 2. The SuperMap. XML is located in the \ Bin folder of the component product installation directory. For example, if you set the number of threads to 4, the Config File should be modified to: <OMPNumThreads> 4</OMPNumThreads>

There are some differences and points to note between the above two methods:

  1. When the Application is started, it will preferentially read the number of threads in the Config File. During the running of the program, the number of threads can be modified in the "Number of Parallel Calculation Threads". If it is modified, the value read from the Config File when the program is started will be used.
  2. Modifying the number of threads in "Parallel calculation of the number of threads" takes effect immediately and automatically modifies the value in the Configuration file; The number of threads in the Config File is only read once when the Application is started. After manually Modify the Configuration file, the Application needs to be restarted to take effect.
  3. The Valid Range for the number of threads is 1-16. If the number of threads in the Config File is out of range, the setting has no effect. The default value of 2 is used; if the value set at "Number of parallel calculation threads" is greater than 16, the value set is automatically adjusted to 16.

For How to set a reasonable number of threads, you can refer to the following suggestions:

  • The specified multiple threads will be distributed among all the cores of the computer processor. When the number of threads is equal to the total number of cores of the processor, all the cores participate in the calculation, which can make full use of the computing resources of the computer.
  • When the number of threads is more than number of computer cores, the problem of thread scheduling and load balancing may lead to more time consumption, and even if the time of analysis and calculation is further reduced, the overall performance improvement may not be obvious. This is not recommended.

Related content