You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
# Assuming fij and atom_energy are tensors and data is an object with an eatoms attributeifreturn_device=="cpu":
# Convert tensors to numpy arrays if we're moving them to CPUfij=fij.cpu().numpy() # Ensure fij is moved to CPU before converting to numpy arraydata.eatoms=atom_energy.cpu().numpy().astype(np.double) # Move atom_energy to CPU, then convertelse:
# Ensure eatoms is a tensor on the target device, and copy atom_energy to it# The .to() method ensures the tensor is moved to the specified device and converted to the desired dtypeeatoms=atom_energy.to(device=return_device, dtype=torch.double)
data.eatoms=eatoms# Update data.eatoms with the new tensor# If you need to preserve the original eatoms tensor and only copy values from atom_energy, use the following:data.eatoms=torch.empty_like(atom_energy, device=return_device, dtype=torch.double)
data.eatoms.copy_(atom_energy.to(device=return_device, dtype=torch.double))
I've also tried to run it without the kokkos package, you can adjust the command by simply omitting the options related to kokkos. Some of the options offered like -sf kk, -k on, and -pk kokkos are specific to enabling and configuring the kokkos package for parallel execution on various architectures.
If your original command line call to LAMMPS includes these options, such as:
lmp -sf kk -k on -pk kokkos
To run LAMMPS without Kokkos, you would remove -sf kk, -k on, and -pk kokkos options, leaving you with:
lmp
The text was updated successfully, but these errors were encountered:
For reference:
I've also tried to run it without the
kokkos
package, you can adjust the command by simply omitting the options related tokokkos
. Some of the options offered like-sf kk, -k on, and -pk kokkos
are specific to enabling and configuring thekokkos
package for parallel execution on various architectures.If your original command line call to LAMMPS includes these options, such as:
To run LAMMPS without Kokkos, you would remove
-sf kk, -k
on, and-pk kokkos
options, leaving you with:The text was updated successfully, but these errors were encountered: