From cb2de211b2f07e04cd8726b0fb4a842d2a01d6b1 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 17 Sep 2021 22:52:13 -0400 Subject: [PATCH] small corrections --- src/GPU/pair_eam_alloy_gpu.cpp | 7 ++++--- src/GPU/pair_eam_fs_gpu.cpp | 5 ++++- 2 files changed, 8 insertions(+), 4 deletions(-) diff --git a/src/GPU/pair_eam_alloy_gpu.cpp b/src/GPU/pair_eam_alloy_gpu.cpp index e363ca670d..fcfbc69dc7 100644 --- a/src/GPU/pair_eam_alloy_gpu.cpp +++ b/src/GPU/pair_eam_alloy_gpu.cpp @@ -71,6 +71,7 @@ double eam_alloy_gpu_bytes(); PairEAMAlloyGPU::PairEAMAlloyGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE) { + one_coeff = 1; respa_enable = 0; reinitflag = 0; cpu_time = 0.0; @@ -316,7 +317,7 @@ void PairEAMAlloyGPU::coeff(int narg, char **arg) if (setfl) { for (i = 0; i < setfl->nelements; i++) delete [] setfl->elements[i]; delete [] setfl->elements; - delete [] setfl->mass; + memory->destroy(setfl->mass); memory->destroy(setfl->frho); memory->destroy(setfl->rhor); memory->destroy(setfl->z2r); @@ -357,6 +358,7 @@ void PairEAMAlloyGPU::coeff(int narg, char **arg) if (i == j) atom->set_mass(FLERR,i,setfl->mass[map[i]]); count++; } + scale[i][j] = 1.0; } } @@ -373,8 +375,7 @@ void PairEAMAlloyGPU::read_file(char *filename) // read potential file if (comm->me == 0) { - PotentialFileReader reader(PairEAM::lmp, filename, - "eam/alloy", unit_convert_flag); + PotentialFileReader reader(PairEAM::lmp, filename, "eam/alloy", unit_convert_flag); // transparently convert units for supported conversions diff --git a/src/GPU/pair_eam_fs_gpu.cpp b/src/GPU/pair_eam_fs_gpu.cpp index 6e463476d7..c84fd328d6 100644 --- a/src/GPU/pair_eam_fs_gpu.cpp +++ b/src/GPU/pair_eam_fs_gpu.cpp @@ -70,6 +70,7 @@ double eam_fs_gpu_bytes(); PairEAMFSGPU::PairEAMFSGPU(LAMMPS *lmp) : PairEAM(lmp), gpu_mode(GPU_FORCE) { + one_coeff = 1; respa_enable = 0; reinitflag = 0; cpu_time = 0.0; @@ -315,7 +316,7 @@ void PairEAMFSGPU::coeff(int narg, char **arg) if (fs) { for (i = 0; i < fs->nelements; i++) delete [] fs->elements[i]; delete [] fs->elements; - delete [] fs->mass; + memory->destroy(fs->mass); memory->destroy(fs->frho); memory->destroy(fs->rhor); memory->destroy(fs->z2r); @@ -356,6 +357,7 @@ void PairEAMFSGPU::coeff(int narg, char **arg) if (i == j) atom->set_mass(FLERR,i,fs->mass[map[i]]); count++; } + scale[i][j] = 1.0; } } @@ -454,6 +456,7 @@ void PairEAMFSGPU::read_file(char *filename) MPI_Bcast(&file->nr, 1, MPI_INT, 0, world); MPI_Bcast(&file->dr, 1, MPI_DOUBLE, 0, world); MPI_Bcast(&file->cut, 1, MPI_DOUBLE, 0, world); + MPI_Bcast(&rhomax, 1, MPI_DOUBLE, 0, world); // allocate memory on other procs if (comm->me != 0) {