The EDEM Simulator Engine
You can run a simulation in CPU or GPU modes. The GPU mode requires supported GPU hardware.
Selecting Engines
You can select CPU or GPU Engine.
In the CPU solver, you can select the number of CPU cores, the number available depends on the CPU hardware available.
The GPU solver is selected from the Selected Engine dropdown. In addition, you must select the number of CPU Cores as the processing is handled by the GPU card. Upto 4 CPUs is the recommended optimal value.
Checking GPU Compatibility
The EDEM GPU requires your GPU device to support OpenCL 1.2 or above.
To check hardware compatibility with the GPU:
- Navigate to Tools > Options > Simulator Engine.
- Select the GPUs from the list and then select Start test.
EDEM will report if the test and GPU setup is successful. If multiple GPU devices are found a test should be run on each GPU device required to run EDEM .
The test is a standard hardware test for GPU. If the test fails, please make sure your Graphics Card drivers are up to date and try again or contact support with details of the GPU device used.
Once the test has run successfully, the GPU option is accessible from the Selected Engine dropdown.
Simulator Engine – GPU Solver
When you select the GPU Solver engine, specify the following:
Number of CPU Cores
The GPU engine works with both CPU and GPU. The recommended number of CPU cores when running GPU is 4 as this provides a good balance of speed vs. CPU use. If using the GPU with the EDEM API then the API models run on CPU when the contact detection runs on the GPU. As such, depending on the complexity and definition of the API model more than 4 CPUs may provide the optimal speed.
Number of GPU Devices
This displays the Number of GPU Devices available on the installed GPU hardware, this is not a value that can be modified. The definition of Compute Unit differs depending on the GPU manufacturer. A compute unit is a Stream Multiprocessor for an NVidia GPU or a SIMD engine in an AMD GPU. For Nvidia each stream multiprocessor has a certain number of processing elements or what Nvidia calls ‘CUDA Cores’. Typically the more processing elements the faster the GPU card.
Available memory percentage indicates the maximum % of the computer’s graphic memory that EDEM is going to use. The default value is set to 75% in order to allow some memory for other non-EDEM related processes.
Total available memory size shows the value in Megabytes that the percentage above represents for the selected GPU device.
GPU – Advanced Settings
When selecting the GPU solver engine, the following GPU Advanced settings are available:
Sphere-Geometry Grid Settings
You can set the Sphere-Geometry (Particle-Geometry) grid settings to be a different value to the Sphere-Sphere grid. The default recommended value targets the fastest simulation speed for GPU. However, you can also set your own custom value.
Alternative Contact Detection
The alternative contact detection method is a hybrid contact detection option which switches between two algorithms depending on simulation settings. The algorithms primarily offer benefits when working with a large particle size distribution or with a domain consisting of large amounts of empty space. In these situations memory usage should be reduced resulting in an ability to run larger simulations in comparison to the standard contact detection method.
Multi-GPU Settings
Memory Compact Time defines an interval at which Multi-GPU simulations will do a memory compact - reducing the physical GPU memory used while running Multi-GPU simulations. This is achieved by removing unused blocks of memory generated when particles pass from one GPU domain to another. This same process happens during regular save internals so Memory Compact Time will only have a significant impact when saving infrequently (i.e. when Save Interval > Memory Compact Time). Default value is 0.5 s and it is not advised to use very small values since this will impact simulation performance.
-
GPU Factory
If ‘Use Factory Group’ is selected, then this allows you to group particle factories together. All the particles in a simulation are created and tracked within factory domains by the CPU. The CPU will stop processing these particles and hand them over to the GPU once they leave the factory domain. If they re-enter or cross any factory domain afterwards, the CPU will not acknowledge them. Any particles re-entering the factory will likely lead to a particle explosion in the factory domain.
To avoid this unexpected behavior, if several factories are close to each other and the particles might pass through each other’s factory domain, you can enable “Use Factory Group”. This feature allows you to group several factories together in order to make EDEM deal with them as one factory domain through the CPU.
The larger the number of particles inside the factory domain (one factory or one group of factories), the higher the CPU usage and the lower the GPU usage involved. In extreme cases, where the factory covers the whole domain, all particles would be processed by CPU.
At the same time, EDEM will detect when a factory stops generating particles. Hence, the corresponding factory domain would become invalid and all the particle information within it would be handed over from CPU to GPU to proceed with the calculations.-
Use Factory Group checkbox: Enable/Disable the use of factory groups in the GPU simulation.
-
Groups: The dropdown list shows all the factory groups already defined. Add/delete a new group by clicking on the green/red crosses next to the selected group. You can also rename a Factory Group.
-
Factories: The box shows the Grouped Factories within the highlighted Group in the “Groups” dropdown list. Factories can be added and removed with the green/red cross below the Factories box. Any factory defined in the creator that has not been used in any other Factory Group will be selectable for a new grouping.
-
Number of Cores
This enables the number of processor cores used in the simulation to be specified using the Number of Cores dropdown. When you start a simulation, EDEM checks out the requested number of units from the license server (if available).
If your computer has hyper-threading enabled, EDEM will include these in the number of processors but these will not provide the same performance improvement as real cores.
CUDA Simulator Advanced options
The Advanced settings within GPU Options for the CUDA solver contains new settings specific to the CUDA solver. These settings allow the customization of particle to geometry and particle to particle overlap calculations although It is recommended to use the default settings unless non-physical behavior is seen. These can be reset by selecting Defaults at the bottom of the toolbar.
(c) 2023 Altair Engineering Inc. All Rights Reserved.