synchronize API with library.h, zero struct on allocation, determine exception support at runtime.

This commit is contained in:
Axel Kohlmeyer
2023-01-13 05:30:49 -05:00
parent 59a9161435
commit b03e9609ce
3 changed files with 24 additions and 20 deletions

View File

@ -92,6 +92,12 @@ int main(int narg, char **arg)
if (me == 0) printf("ERROR: Could not load shared LAMMPS library\n");
MPI_Abort(MPI_COMM_WORLD,1);
}
/* must match the plugin ABI version */
if (plugin->abiversion != LAMMPSPLUGIN_ABI_VERSION) {
if (me == 0) printf("ERROR: Plugin abi version does not match: %d vs %d\n",
plugin->abiversion, LAMMPSPLUGIN_ABI_VERSION);
MPI_Abort(MPI_COMM_WORLD,1);
}
}
if (lammps == 1) {
if (plugin->open == NULL) {