A question about a parallel computation with AOCC compiler fit for AMD machine

14 views
Skip to first unread message

pki...@gmail.com

unread,
Nov 13, 2023, 12:52:49 AM11/13/23
to pencil-code-discuss

Dear all:

I am trying to use Pencil code on AMD machine. But the parallel computation with mpif90 and the intel compiler in the AMD machine is too slow. (At least AMD is 3 times as slow as the Intel CPU with Intel compiler) The Intel compiler seems to have been made to work the most efficiently on the Intel machine.

AMD has its own compiler AOCC. It supports C/C++ (clang, clang++) and fortran (flang). If I compile a code using openMP with AOCC and run it, it is twice as fast as GCC or G++. I think pencil code will work efficiently on the AMD machine with AOCC if the setting is correct. What should be changed or added in the code if we wish to use the AMD machine with AOCC compiler?

Best,

Kiwan

Matthias Rheinhardt

unread,
Nov 13, 2023, 5:13:47 AM11/13/23
to pencil-code-discuss

Hi Kiwan,


PencilCode can be build with flang/clang. I recall one code modification needed, but most likely it is not checked in. Let me also look up the compiling/linking options.


Best,

Matthias


Von: pencil-co...@googlegroups.com <pencil-co...@googlegroups.com> im Auftrag von pki...@gmail.com <pki...@gmail.com>
Gesendet: Montag, 13. November 2023 06:52:49
An: pencil-code-discuss
Betreff: A question about a parallel computation with AOCC compiler fit for AMD machine
 
--
You received this message because you are subscribed to the Google Groups "pencil-code-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email to pencil-code-dis...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/pencil-code-discuss/4127596a-aa29-441d-998c-68c68100caadn%40googlegroups.com.

Matthias Rheinhardt

unread,
Nov 13, 2023, 11:52:29 AM11/13/23
to pencil-code-discuss

Hi again,


you can use the configuration in compilers/separate/AMD_flang.conf.

In the code, there is one problem: flang doesn't like "entry". This appears once in mpicomm.f90, 

in subroutine  mpigather_and_out_real. You can make a local change by commenting out the entry-statement, the two lines below, and related declarations and creating a new (dummy) subroutine mpigather_and_out_cmplx.

Would be a temporary solution unless we have a lasting one.

On the CSC cluster Mahti, I use modules


  1) csc-tools (S)   2) StdEnv   3) idl/8.8.3   4) aocc/3.2.0   5) openblas/0.3.18-omp   6) mpich/4.0.1   7) hdf5/1.10.7-mpi



Best,

Matthias 



Von: pencil-co...@googlegroups.com <pencil-co...@googlegroups.com> im Auftrag von pki...@gmail.com <pki...@gmail.com>
Gesendet: Montag, 13. November 2023 06:52:49
An: pencil-code-discuss
Betreff: A question about a parallel computation with AOCC compiler fit for AMD machine
 

Dear all:

KWP

unread,
Nov 14, 2023, 6:20:15 AM11/14/23
to pencil-co...@googlegroups.com
Hi, Matthias.
Thank you for the explanation.
It sounds rather complicated.
I will try it soon and shall most probably be back.

Best,

Kiwan
> To view this discussion on the web visit https://groups.google.com/d/msgid/pencil-code-discuss/2f91880ebc954e74a620a522fdf98c7c%40su.se.
Reply all
Reply to author
Forward
0 new messages