check for compatible LAMMPS version when creating LAMMPS instance
This check must be done at runtime, since the LAMMPS shared library may have been loaded dynamically and thus required library functions may not be present or missing features with too only a LAMMPS version.
This commit is contained in:
@ -1170,6 +1170,14 @@ void LammpsGui::start_lammps()
|
||||
lammps.open(narg, args);
|
||||
lammpsstatus->show();
|
||||
|
||||
// must have at least 2 August 2023 version of LAMMPS
|
||||
if (lammps.version() < 20230802) {
|
||||
QMessageBox::critical(this, "Incompatible LAMMPS Version",
|
||||
"LAMMPS-GUI version " LAMMPS_GUI_VERSION " requires\n"
|
||||
"LAMMPS version 2 August 2023 or later");
|
||||
exit(1);
|
||||
}
|
||||
|
||||
// delete additional arguments again (3 were there initially
|
||||
while (lammps_args.size() > initial_narg) {
|
||||
delete lammps_args.back();
|
||||
|
||||
Reference in New Issue
Block a user