Compilers for parallel computation in AMD

Skip to first unread message

Jul 26, 2022, 10:04:06 PM7/26/22
to pencil-code-discuss
Dear All:

May I ask you about AMD machine's compilers for pencil parallel computation?
Pencil code for parallel computing seems to use mpif.f90 by default.
(gfortran with nonmpicomm)
But with intel compiler in AMD the computation speed drops by 1/3.
I wonder if there are other compilers suited for mpicom for AMD CPUs.
And what is the best setting method in that case?

There seem to be several compilers available according to the manual. 
pc_build -f Intel
pc_build -f Intel_MPI
pc_build -f Cray
pc_build -f Cray_MPI
But none of them work.
I wonder if the reason is the incorrect setting of FC, FCC in Makefile.
FC= mpif90, F77=f90



Hongzhe Zhou

Jul 27, 2022, 4:53:48 AM7/27/22
to pencil-code-discuss
Hi Kiwan,

I have been using the gnu compiler (GNU-GCC_MPI), and it works with parallel computation.



Jul 27, 2022, 11:05:48 AM7/27/22
Hi, Hongzhe.

I tried GNU-GCC_MPI.
Unfortunately, it still uses mpif90, which lags the calculation with AMD CPUs.
Anyway, thanks a lot.


> --
> You received this message because you are subscribed to a topic in the Google Groups "pencil-code-discuss" group.
> To unsubscribe from this topic, visit
> To unsubscribe from this group and all its topics, send an email to
> To view this discussion on the web visit

Philippe-A. Bourdin

Jul 27, 2022, 2:55:28 PM7/27/22
to pencil-code-discuss
Hello Kiwan,

Please not that "mpif90" is not a compiler, it is a wrapper that call the actual compiler, which could be gfortran or something else, depending on which module you have loaded.

If you want to use hardware acceleration, with "gfortran" there is the option "-march=native" which optimizes the code depending on the CPU where the compilation takes place. Please check with the documentation of your computing center, if that is the desired option - or something else.

If you want the shortcut, this shoudl do the trick for optimized production runs:
pc_build -f GNU-GCC_MPI,GNU-GCC_optimal

Best greetings,

Matthias Rheinhardt

Aug 30, 2022, 5:38:07 AM8/30/22

Dear Pencil Code developers,

as decided during the last PCUM we shall have semi-regular developer meetings apart from the PC office hours. I propose to meet for the first time on this week's Thursday in the afternoon, say at 15 CEST to allow Wlad to participate.

Please let me know your opinions.



Matthias Rheinhardt

Sep 1, 2022, 9:06:07 AM9/1/22

Please join at

Zoom is the leader in modern enterprise video communications, with an easy, reliable cloud platform for video and audio conferencing, chat, and webinars across mobile, desktop, and room systems. Zoom Rooms is the original software-based conference room solution used around the world in board, conference, huddle, and training rooms, as well as executive offices and classrooms. Founded in 2011, Zoom helps businesses and organizations bring their teams together in a frictionless environment to get more done. Zoom is a publicly traded company headquartered in San Jose, CA.


Von: Matthias Rheinhardt
Gesendet: Dienstag, 30. August 2022 11:38:04
Betreff: developers' meeting
Reply all
Reply to author
0 new messages