From 5e2ecf7ec3ce3582cfc3548f16075209b785e9a9 Mon Sep 17 00:00:00 2001 From: Axel Kohlmeyer Date: Fri, 10 Jul 2015 17:37:21 -0400 Subject: [PATCH] handle lammps python module instances with names correctly. --- python/lammps.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/python/lammps.py b/python/lammps.py index a3a979cd3f..c3de412698 100644 --- a/python/lammps.py +++ b/python/lammps.py @@ -29,11 +29,11 @@ class lammps: try: if not name: self.lib = CDLL(join(modpath,"liblammps.so"),RTLD_GLOBAL) - else: self.lib = CDLL(join(modpath,"/liblammps_%s.so" % name),RTLD_GLOBAL) + else: self.lib = CDLL(join(modpath,"liblammps_%s.so" % name),RTLD_GLOBAL) except: type,value,tb = sys.exc_info() traceback.print_exception(type,value,tb) - raise OSError,"Could not load LAMMPS dynamic library" + raise OSError,"Could not load LAMMPS dynamic library from %s" % modpath # if no ptr provided, create an instance of LAMMPS # don't know how to pass an MPI communicator from PyPar