Hello everyone.
I’ve been struggling to build lammps with gpu acceleration using an AMD Radeon R9 380 video card.
What I did was use the Makefile.linux_opencl to build the libgpu.a. The config for the Makefile was:
/* ----------------------------------------------------------------------
Generic Linux Makefile for OpenCL
------------------------------------------------------------------------- */
which file will be copied to Makefile.lammps
EXTRAMAKE = Makefile.lammps.opencl
#OCL_TUNE = -DFERMI_OCL # – Uncomment for NVIDIA Fermi
OCL_TUNE = -DKEPLER_OCL # – Uncomment for NVIDIA Kepler
OCL_TUNE = -DCYPRESS_OCL # – Uncomment for AMD Cypress
OCL_TUNE = -DGENERIC_OCL # – Uncomment for generic device
this setting should match LAMMPS Makefile
one of LAMMPS_SMALLBIG (default), LAMMPS_BIGBIG and LAMMPS_SMALLSMALL
LMP_INC = -DLAMMPS_SMALLBIG
OCL_INC = -L/usr/lib/x86_64-linux-gnu # Path to CL directory
OCL_CPP = mpic++ (DEFAULT_DEVICE) -O3 -DMPI_GERYON -DUCL_NO_EXIT -DMPICH_IGNORE_CXX_SEEK (LMP_INC) $(OCL_INC)
OCL_LINK = -lOpenCL
OCL_PREC = -D_DOUBLE_DOUBLE
BIN_DIR = ./
OBJ_DIR = ./
LIB_DIR = ./
AR = ar
BSH = /bin/sh
include Opencl.makefile
Hello everyone.
I've been struggling to build lammps with gpu acceleration using an AMD
Radeon R9 380 video card.
[...]
I managed to make the libgpu.a. After that, I changed to src dir and did
make yes-gpu. With no errors it made the lmp_gpu. But when I try to run
lammps using this command:
* mpirun -np 4 lmp_gpu -sf gpu -pk gpu 1 -in in.test*
I receive this message *:*
*LAMMPS (11 Aug 2017)LAMMPS (11 Aug 2017)LAMMPS (11 Aug 2017)LAMMPS (11
Aug 2017)*
[...]
It's strange because lammps is creating 4 tasks separately (it created the
same 4000 atoms 4 times!!), not dividing the task in 4.
when you receive the output as many times as you have MPI tasks, then you
have compiled against an MPI library that is not consistent with your
'mpirun' executable.
it has *nothing* to do with the GPU library.
So, the question is: What I did wrong? I even tried build all over again
but uncommenting the options (one each time):
# OCL_TUNE = -DCYPRESS_OCL # -- Uncomment for AMD Cypress
you should uncomment that even if you don't have this kind of GPU. it will
be very likely better than the default settings.
but note, there hasn't been a serious test or update for *any* GPU support
in LAMMPS with AMD GPUs by LAMMPS developers in a very long time due to
lack of suitable hardware.
# OCL_TUNE = -DGENERIC_OCL # -- Uncomment for generic device
But in the end I keep receiving the same error.
I've installed lammps with the option Pre-Built Ubuntu (which gives me the
lammps-daily). Ubuntu version 16.04. Processor i7 3770.
Ps.: When I run without the gpu, everything works just fine.
that probably has the consistent MPI library.
axel.