Number of CPU Cores

samsam
edited June 2017 in DualSPHysics_v4.0
Dear All,

As far as I know, DSPH automatically uses the available number of cores of GPU or CPU. My question is how can I allocate a fixed number? For example, I want to run a simulation on 32 CPU cores. How can I do that?

Thanks.

Comments

  • In the DualSPHysics directory there is a directory called HELP, inside on it you can check some guides with the commands of the different programs. You have to look for the command that you need in the DualSPHysics4_Help.out file.

    Regards.

  • Hello Luis,

    Thanks for your comment. So, I got the command "-ompthreads:" for parallel CPU execution from the help file. Can you please check if the following code is the right way to apply the command?

    %dualsphysics% %dirout%/%name% %dirout% -svres -cpu -ompthreads:<32>
    if not "%ERRORLEVEL%" == "0" goto fail


    Thanks.
  • Take out "<>" symbols on the number of cores and that is all.

    %dualsphysics% %dirout%/%name% %dirout% -svres -cpu -ompthreads:32
    if not "%ERRORLEVEL%" == "0" goto fail

    I think this command is only if u have just one physical processor (I guess you are using an Intel Xeon or something similar), if perhaps you are using a cluster you have to make some arrangements in your operational system but I don't know how to do that.

    Regards.
  • It worked fine. Thanks.

    I think DSPH is based on OpenMP and does not support MPI.
Sign In or Register to comment.