print warning when GPU pair style increases the communication cutoff

This commit is contained in:
Axel Kohlmeyer 2019-10-21 03:09:02 -04:00
parent 9a7caebf57
commit b3dbf7925a
No known key found for this signature in database
GPG Key ID: D9B44E93BF0C375A
7 changed files with 30 additions and 6 deletions

View File

@ -390,6 +390,11 @@ have fully consistent image flags, since some bonds will cross
periodic boundaries and connect two atoms with the same image
flag. :dd
{Increasing communication cutoff for GPU style} :dt
The pair style has increased the communication cutoff to be consistent with
the communication cutoff requirements for this pair style when run on the GPU. :dd
{KIM Model does not provide 'energy'; Potential energy will be zero} :dt
Self-explanatory. :dd

View File

@ -133,4 +133,9 @@ E: Unknown error in GPU library
Self-explanatory.
W: Increasing communication cutoff for GPU style
The pair style has increased the communication cutoff to be consistent with
the communication cutoff requirements for this pair style when run on the GPU.
*/

View File

@ -206,8 +206,11 @@ void PairSWGPU::init_style()
neighbor->requests[irequest]->ghost = 1;
}
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin) )
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin)) {
comm->cutghostuser=2.0*cutmax + neighbor->skin;
if (comm->me == 0)
error->warning(FLERR,"Increasing communication cutoff for GPU style");
}
}
/* ----------------------------------------------------------------------

View File

@ -240,8 +240,11 @@ void PairTersoffGPU::init_style()
neighbor->requests[irequest]->ghost = 1;
}
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin) )
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin)) {
comm->cutghostuser = 2.0*cutmax + neighbor->skin;
if (comm->me == 0)
error->warning(FLERR,"Increasing communication cutoff for GPU style");
}
}
/* ----------------------------------------------------------------------

View File

@ -232,8 +232,11 @@ void PairTersoffMODGPU::init_style()
neighbor->requests[irequest]->ghost = 1;
}
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin) )
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin)) {
comm->cutghostuser = 2.0*cutmax + neighbor->skin;
if (comm->me == 0)
error->warning(FLERR,"Increasing communication cutoff for GPU style");
}
}
/* ----------------------------------------------------------------------

View File

@ -254,8 +254,11 @@ void PairTersoffZBLGPU::init_style()
neighbor->requests[irequest]->ghost = 1;
}
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin) )
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin)) {
comm->cutghostuser = 2.0*cutmax + neighbor->skin;
if (comm->me == 0)
error->warning(FLERR,"Increasing communication cutoff for GPU style");
}
}
/* ----------------------------------------------------------------------

View File

@ -234,9 +234,11 @@ void PairVashishtaGPU::init_style()
neighbor->requests[irequest]->ghost = 1;
}
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin) )
if (comm->cutghostuser < (2.0*cutmax + neighbor->skin)) {
comm->cutghostuser=2.0*cutmax + neighbor->skin;
if (comm->me == 0)
error->warning(FLERR,"Increasing communication cutoff for GPU style");
}
}
/* ----------------------------------------------------------------------