dependency step: target pattern contains no `%' or *** multiple target patterns.

Dear LAMMPS users,

I'm trying to compile LAMMPS for a Blue Gene /P using the IBM XL compilers. I've already succeeded in building with the GNU compilers. When doing make with the IBM XLC compilers, it fails while creating the dependencies when it gets to the angle_charmm.cpp file.

Using these DEPFLAGS,


I get this error:

/bgsys/drivers/ppcfloor/comm/fast/bin/mpicxx -v -DLAMMPS_GZIP -DLAMMPS_XDR -DMPICH_SKIP_MPICXX -DFFT_FFTW -I/scratch/bgapps/fftw-2.1.5/xl/include -c -M angle_charmm.cpp > angle_charmm.d
make[1]: Leaving directory `/scratch/prentice/build/lammps-23Oct12/src/Obj_excalibur-xlc'
make[1]: Entering directory `/scratch/prentice/build/lammps-23Oct12/src/Obj_excalibur-xlc'
angle_charmm.d:30: *** target pattern contains no `%'. Stop.
make[1]: Leaving directory `/scratch/prentice/build/lammps-23Oct12/src/Obj_excalibur-xlc'
make: *** [excalibur-xlc] Error 2

When I change the DEPGLAGS to this:

DEPFLAGS = -c -M -qmakedep=gcc

I get this error:

/bgsys/drivers/ppcfloor/comm/fast/bin/mpicxx -v -DLAMMPS_GZIP -DLAMMPS_XDR -DMPICH_SKIP_MPICXX -DFFT_FFTW -I/scratch/bgapps/fftw-2.1.5/xl/include -c -M -qmakedep=gcc angle_charmm.cpp > angle_charmm.d
make[1]: Leaving directory `/scratch/prentice/build/lammps-23Oct12/src/Obj_excalibur-xlc'
make[1]: Entering directory `/scratch/prentice/build/lammps-23Oct12/src/Obj_excalibur-xlc'
angle_charmm.d:1: *** multiple target patterns. Stop.

I didn't find anything in the mailing list archives related to this, and google wasn't to helpful, either. I did find this page for gcc, which indicates that these errors are the result of syntax errors in the pattern expression in the Makefile or an error in the filename. Not sure if those gcc error messages can be extrapolated for the the XL compilers, but it's all I have to go on at the moment.

I recognize this is a problem with my compiler and not LAMMPS directly, but I thought this would still be the best place to ask, since there might be some Blue Gene /P users who have seen this error when compiling LAMMPS themselves, My full makefile, with comments omitted, is below.

SHELL = /bin/sh
.SUFFIXES: .cpp .u

CC = /bgsys/drivers/ppcfloor/comm/fast/bin/mpicxx

SHFLAGS = -qpic
DEPFLAGS = -c -M -qmakedep=gcc

LINK = /bgsys/drivers/ppcfloor/comm/fast/bin/mpicxx

LIB = -lm
SIZE = size

SHLIBFLAGS = -shared


MPI_PATH = -L/bgsys/drivers/ppcfloor/comm/fast/lib
MPI_LIB = -lcxxmpich.cnk -lmpich.cnk -lopa

FFT_INC = -DFFT_FFTW -I/scratch/bgapps/fftw-2.1.5/xl/include
FFT_PATH = -L/scratch/bgapps/fftw-2.1.5/xl/lib
FFT_LIB = -lfftw


include Makefile.package.settings
include Makefile.package


\(EXE\): (OBJ)
     \(LINK\) (LINKFLAGS) \(EXTRA\_PATH\) (OBJ) \(EXTRA\_LIB\) (LIB) -o \(EXE\)      (SIZE) $(EXE)

lib: \(OBJ\)      (ARCHIVE) \(ARFLAGS\) (EXE) $(OBJ)

shlib: \(OBJ\)      (CC) \(CCFLAGS\) (SHFLAGS) \(SHLIBFLAGS\) (EXTRA_PATH) -o \(EXE\) \\          (OBJ) \(EXTRA\_LIB\) (LIB)

     \(CC\) (CCFLAGS) \(SHFLAGS\) (EXTRA_INC) -c $<

     \(CC\) (CCFLAGS) \(EXTRA\_INC\) (DEPFLAGS) &lt; &gt; @

DEPENDS = \(OBJ:\.o=\.d\) sinclude (DEPENDS)

Any ideas or suggestions? Any help will be greatly appreciated.

I managed to fix this on my own. I reconfigured the make file to skip building dependencies, like in Makefile.storm. In short, I changed this

# Individual dependencies

DEPENDS = \(OBJ:\.o=\.d\) sinclude (DEPENDS)

to this:

# Individual dependencies

\(OBJ\): (INC)

Using '.d' in the suffixes at the top of your original Makefile might do the trick.

.SUFFIXES: .cpp .d



Thanks for the suggestion. Unfortunately, it didn't work. I still get the same error.


I'd be surprised if a BG/P doesn't support dependency
checking and you have to revert to what Makefile.storm
does. See src/MAKE/Makefile.bgl for a Makefile
that worked long ago on BG systems.



I started with Makefile.bgl and then modified it to suit my local environment/needs. I'm looking into this further with someone from ANL. We're working off-list since this is little off-topic,and some of the problems may be specific to my BGP's environment. If I uncover anything useful to the community, I will post my findings back to the list for future archive searchers.