LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] use kokkos in lammps library
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] use kokkos in lammps library


From: Steve Plimpton <sjplimp@...24...>
Date: Tue, 11 Jul 2017 07:50:58 -0600

It might depend on what the variable you
are extracting calculates.  When Kokkos is
run with GPUs, then some per-atom data lives
on the GPU, and just a copy on the CPU.  If
the variable is using per-atom values, it would
only be accessing the CPU values.  Which may
not be up to date with the GPU.  In LAMMPS
runs, there is logic in the code to insure the
CPU and GPU values are in-sync when needed.
That logic may not be present when just accessing
a variable via a library method.

Stan (CCd) can probably comment.

Steve


On Tue, Jul 11, 2017 at 6:43 AM, Axel Kohlmeyer <akohlmey@...24...> wrote:
On Tue, Jul 11, 2017 at 3:12 AM, Duan, Zhiyao <zhiyao.duan@...6975...> wrote:
> Dear all,
>
> I wonder if kokkos is compatible with  lammps library mode?

there are no provisions for KOKKOS in the library interface. so for as
long as you are doing operations, that are compatible with normal
input scripts, it should function like a regular LAMMPS executable.
however, if you are modifying data directly, that needs to be managed
special with KOKKOS, then it is not likely to work.

> I tried to extract energy and forces using lammps_extract_variable, but all returned values are 0.
> The code works well in non-kokkos mode.

there is no special treatment of variables by KOKKOS and no KOKKOS
related operations in the lammps_extract_variable() function, so
reading of variables should work as well with the library interface
(or not) as in a standalone executable.

axel.

> Any ideas? Thank you in advance.
>
> Zhiyao
>
>
> ------------------------------------------------------------------------------
> Check out the vibrant tech community on one of the world's most
> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
> _______________________________________________
> lammps-users mailing list
> lammps-users@...12...396...sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/lammps-users



--
Dr. Axel Kohlmeyer  akohlmey@...43...4...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.

------------------------------------------------------------------------------
Check out the vibrant tech community on one of the world's most
engaging tech sites, Slashdot.org! http://sdm.link/slashdot
_______________________________________________
lammps-users mailing list
lammps-users@...6297....sourceforge.net
https://lists.sourceforge.net/lists/listinfo/lammps-users