# Using DDM and Multiple Threads and calculation of number of tokens in Marc/Mentat 2015

 Tech Articles ID KB8022579 Status: Published Published date: 04/21/2016 Updated: 04/22/2016 Reported In: Marc & Mentat

### Abstract (Question)

How to set up Domain Decomposition Method (DDM) and Multiple Threads for “Matrix Solver” and “Assembly And Recovery” in Marc/Mentat to increase running speed and how to calculate number of tokens needed for a particular number of CPUs used in a Marc parallel run?

Determination of how many DDM is most effective in a Marc analysis is in general model dependent.  A combination of DDM, and Multiple threads for “Matrix Solver” and “Assembly And Recovery” can be used to be most effective. In order to use Multiple threads for “Matrix Solver", Pardiso solver is most effective.

As an example, assume a computer with 24 CPUs.

One of the options for large models would be to use

DDM # of Domains 4;

Assembly And Recovery "Per Domain 6" and #Threads 24 (which is multiplication of "DDM # Domains 4" and "Assembly And Recovery Per Domain 6")  ;

This setup would use 24 CPUs

To run Marc in command prompt, the following command should be used:

run_marc -j jobname -np 4 -nts 24 -nte 24

In Mentat, the following setup should be used: For smaller models, other combinations could be used such as:

run_marc -j jobname -np 4 -nts 16 -nte 16

run_marc -j jobname -np 2 -nts 16 -nte 16

run_marc -j jobname -np 2 -nts 8 -nte 8 and so on.

These all depends on how much tokens available to use. The calculation of tokens needed for a particular setup is purely depends on the number of CPUs used.

Below is an example of calculation of tokens needed for a particular setup.

run_marc -j jobname -np 4 -nts 24 -nte 24

In this setup,  24 CPUs are used.

The token calculations for this is as follows:

Total Tokens = 160  + (40*1) + (25*2) + (15*4) + (12*8) + (9*8)  = 478

This calculation is based on the bellow table. Based on the above table, one can calculate the tokens required for other combinations of Marc runs.

For additional CPU's over 24 use the following to calculate total tokens required:

CPUs 25th to 32nd, use 9 tokens per CPU

CPUs 33rd and above, use 6 tokens per CPU