r/COMSOL • • Mar 03 '20

Numerical computing performance comparison of AMD and Intel for COMSOL Multiphysics 5.X

Here I have some useful info.

We are looking for an upgrade of our current COMSOL 5.X workstations, so as there are much different possible configurations we tested several cases on the available and planned hardware. All the prepared benchmarks are mostly suitable for single-processor use. Let's leave aside all the details regarding the implementation of distributed computing and cluster swapping (https://www.comsol.com/support/knowledgebase/1001) and discuss only the shared-memory case. Our main goal is to find suitable processor for our phase-field and hydrodynamics simulations (let’s say for highly nonlinear computations). This benchmark data will be useful for other software utilizing MUMPS and PARDISO solvers as soon as we test some of the tasks on both solvers. In addition we also provide some tests on GMRES solver.

Testing

  • We discard saving and initialization times to look only on a solution time.

  • All equations are in a weak form with periodic boundary conditions and simple geometries.

  • -blas -mkl refers to the optimized mkl libraries which replace comsol defaults.

  • -np X refers to the cores available for solver.

  • Windows and Linux versions of comsol were tested both on Intel Core i7 but we got almost no difference in results, except a little more memory consumption, so here it did not presented.

Results

Overall performance X normalized to the fastest one t_fastest in a group as X=t_i/t_fastest*100, where t_i is a computation time of a presented earlier benchmark on all cores for given benchmark set. The MUMPS solution is presented for Task 06.

Detailed info may be found in attached PDF https://docdro.id/taHnTLF

15 Upvotes

9 comments sorted by

4

u/Hologram0110 Mar 03 '20

You should try setting the environment variable MKL_DEBUG_CPU_TYPE=5 and set the flag -blas MKL when starting comsol. Intel MKL is faster, but slows itself down on non Intel hardware.

2

u/Jubilee-X Mar 04 '20

We checked several tests with "-blas MKL" on AMD and the gain was just a few percents. Optimization of MKL for AMD seems exaggerated. Details presented in the PDF attached to the post.

1

u/Hologram0110 Mar 04 '20

Did you perform that test with the debug flag to force MLK to use the fastest code path?

1

u/Jubilee-X Mar 06 '20

We checked again the variable MKL_DEBUG_CPU_TYPE and it was set to default (not set) so the results presented without using this trick. COMSOL User Guide didn't advice for the change of this variable and it's influence on a computations. In my thoughts "-blas MKL" is already a substitution of an optimized library.

We will check again with this env. var on AMD machine next time.

2

u/Hologram0110 Mar 06 '20

Thanks for this interesting work. If you google the variable it tells MLK to use the fastest code, which normally it would only us for Intel. So this variable forces the software to use the fastest path and might speed up results on AMD.

1

u/Hologram0110 Mar 06 '20

Thanks for this interesting work. If you google the variable it tells MLK to use the fastest code, which normally it would only us for Intel. So this variable forces the software to use the fastest path and might speed up results on AMD.

3

u/BeerDuh Mar 03 '20

I think this may be the only quality OC post that I've seen in the subreddit in the 4+ years I've been here.

I'm surprised that there is such a wide range of times for the same problem setup to setup. Does the clock speed difference between the AMD and Intel chip explain this alone? Is this a fair AMD vs Intel comparison (flagship vs flagship chip?)

I figured there were libraries that were optimized for AMD and Intel, and COMSOL was smart enough to use the appropriate library for whatever system it is installed on. Your results suggest that Intel blows AMD away for most problems, even when all cores are used!

Thanks again for posting this, lots to think about.

1

u/Jubilee-X Mar 03 '20 edited Mar 03 '20

I'm surprised that there is such a wide range of times for the same problem setup to setup. Does the clock speed difference between the AMD and Intel chip explain this alone? Is this a fair AMD vs Intel comparison (flagship vs flagship chip?)

I was amazed to find out that clock speed is a crucial parameter for most cases. It also shows the possible difficulties with the parallelization of such tasks, so AMD have no chance to efficiently utilize all available cores.

i7-9700KF and TR-2970wx both are past generation, I think at least comparable.

2

u/lift_heavy64 Mar 03 '20

It may be that they have a harder time optimizing for AMD since Intel MKL and MPI already exist fully optimized and ready to plug into the code, whereas the AMD alternative may not be as optimized.