Running from the Command Line

The OpenCL solver has been marked as deprecated. We recommend that you use the CUDA GPU.

To run EDEM OpenCL GPU from the command line, the simulator engine has to be specified with the flag “-E” followed by the corresponding engine number.

  • 0 runs the CPU engine
  • 1 runs the GPU Open CL engine

In addition, you can set the Device Index for the GPU.

Setting the device index bypasses the EDEM OpenCL GPU Device Test, this is designed for use on hardware where the EDEM GUI is not available (such as running on a cluster). If more than 1 GPU card is available, the required card can be specified, and the name of each card is provided in the command line.

Device Index GPU Device name
0 Nvidia Quadro GP100
1 Nvidia GeForce GTX 1080
2 Nvidia GeForce GTX 1080

To run using the Nvidia Quadro GP100 card the following command would be required:
edem.exe -c -i c:\processing\mysim.dem -E 1 -D 0

or to use the AMD Radeon Pro WX 9100 card the -D 1 flag would be required.

For Multi-GPU GPU you would add the indices of all GPU cards to the command line. For example, to run the simulation on GPU devices 0 and 1, as specified by the Device index, enter the following:
edem -c -i c:\processing\mysim.dem -E 1 -D 0+1

The flags from the CPU version of EDEM are still be valid in order to set number of CPU processors used in the factory domains (-p), real time to simulate (-r), data save interval (-w), Cell grid size for factory space and particle to particle contact search (-g) and Time Step used (-t).

For example, to run on the command line with the GPU engine using only one card enter the following:
edem.exe -console -i simulation_deck.dem -E 1 -D 0 -p 4 -r 2 -w 0.1 –g 4 -t 1e-6

For Multi-GPU you would add the indices of all GPU cards to the command line, as shown previously. For example, to run the simulation on GPU devices 0 and 1 enter the following:
edem.exe -console -i simulation_deck.dem -E 1 -D 0+1 -p 4 -r 2 -w 0.1 –g 4 -t 1e-6

For Multi-GPU, you can define the axis about which the domain is split between devices. An example of running a 2 GPU simulation via command line with a split in the Y axis is as follows:
edem.exe -console -i simulation_deck.dem -E 1 -D 0+1 --gpu-split Y -p 4 -r 2 -w 0.1 –g 4 -t 1e-6

(c) 2023 Altair Engineering Inc. All Rights Reserved.

Intellectual Property Rights Notice | Technical Support