Dear all:
I am trying to use Pencil code for the magnetohydrodynamic simulation.
By default, it uses mpif90 suit for the Intel compiler.
If I use GCC or some other compilers on an AMD machine, the code works too slowly.
How can I change "Makefile" in the code for the parallel computation?
For your reference, the related content in Makefile is as follows:
-----------------------------------------------------------------------------------------------------
# Default compiler settings.
AR = ar
FC = mpif90
FFLAGS =
F90FLAGS =
F77 = f90
F77FLAGS =
CFLAGS =
FCCLEANER =
MAKEOPTS =
CONVERSION_RELAXED =
#
# Defaults for external libraries.
#
CFLAGS_FFTW3 =
FFLAGS_FFTW3 =
LD_FFTW3 =
CFLAGS_FFTW2 =
FFLAGS_FFTW2 =
LD_FFTW2 =
#
# Extra compiler flags (what does the `GENERAL' refer to?). MR: could be renamed to EXTRA
#
FFLAGS_GENERAL =
CFLAGS_GENERAL =
#
# Preprocessing flags.
#
FPPFLAGS =
#
# Default double flags (can be overwritten in machine-specific section).
#
FFLAGS_DOUBLE = -r8
CFLAGS_DOUBLE = -DDOUBLE_PRECISION
#
# Default linker flags.
#
ifeq ($(LDFLAGS),)
LDFLAGS = -ldl
else
LDFLAGS += -ldl
endif
# Caution:
# This file has been created from `Makefile.src' and will be overwritten the
# next time `adapt-mkfile' is called. If you're about to make non-trivial
# changes, you probably want to edit the master file instead.
DLL_FFLAGS ?= -fPIC
DLL_LDFLAGS ?= -shared
#
# Overwrite settings that are local to each run directory.
#
include Makefile.local
#
# Double precision settings and similar. Must be included _after_
# Makefile.local, so we can set REAL_PRECISION=double there.
#
include Makefile.inc
#
# Fortran 2003 standard compilation settings.
#
include Makefile-standard.inc
#