Bug: Serial python interface won't load > lammps-4Jan12

Bug 1:
The changes to the MPI stubs on Jan 5th seem to have broken the python serial interface.

Compiled serial lammps-4Jan12 module. A small fix is required for lammps.py (uncomment `except` on line 44-45).
Using the python shell:

from lammps import *
lmp = lammps()
LAMMPS (4 Jan 2012)

Repeat for lammps-5Jan12 and you get: "OSError: Could not load LAMMPS dynamic library"

If I remove the try/except I see the error:
OSError: dlopen(_lammps_serial.so, 6): Symbol not found: _MPI_Abort

An error appears to persist to the most current version: lammps-17Feb12.

However if I replace the lammps-17Feb12/src/STUBS directory with the copy from lammps-4Jan12 and recompile, the python interface works correctly.

Possible Insignificant Bug 2:
I have also noticed that after lammps-1Dec11 a serially compiled version of lammps will print out:
1 by 1 by 1 MPI processor grid
Rather than:
1 by 1 by 1 processor grid

Louis Vernon.

Axel, can you check if there is something missing in the changes
you made to STUBS/mpi.h and c ?

The latter issue is not a bug, the MPI was added
to distinguish between the full grid of MPI processors
and the "grid" of cores within a node. One proc
is still an MPI proc.

Steve

Axel, can you check if there is something missing in the changes
you made to STUBS/mpi.h and c ?

this is the obvious change that would be needed.
not sure whether this is all that is needed.

axel

diff --git a/python/setup_serial.py b/python/setup_serial.py
index f069376..77a0484 100755
--- a/python/setup_serial.py
+++ b/python/setup_serial.py
@@ -12,7 +12,7 @@ path = os.path.dirname(os.getcwd())
# list of src files for LAMMPS and MPI STUBS

libfiles = glob.glob("s/src/\*\.cpp" path) + \
- glob.glob("s/src/STUBS/\*\.cpp" path)
+ glob.glob("s/src/STUBS/\*\.c" path)

lammps_library = Extension("_lammps_serial",
                            sources = libfiles,

I can confirm this resolves the problem. I ought to have spotted this myself.

Thanks.
Louis

Will patch it next week - good catch Axel

Steve