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,

DEPFLAGS = -c -M

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.

http://www.gnu.org/software/make/manual/html_node/Error-Messages.html

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
CCFLAGS =

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

LINK = /bgsys/drivers/ppcfloor/comm/fast/bin/mpicxx
LINKFLAGS = -O

LIB = -lm
SIZE = size

ARCHIVE = ar
ARFLAGS = -rc
SHLIBFLAGS = -shared

LMP_INC = -DLAMMPS_GZIP -DLAMMPS_XDR

MPI_INC = -DMPICH_SKIP_MPICXX
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

JPG_INC =
JPG_PATH =
JPG_LIB =

include Makefile.package.settings
include Makefile.package

EXTRA_INC = \(LMP\_INC\) (PKG_INC) \(MPI\_INC\) (FFT_INC) \(JPG\_INC\) (PKG_SYSINC)
EXTRA_PATH = \(PKG\_PATH\) (MPI_PATH) \(FFT\_PATH\) (JPG_PATH) \(PKG\_SYSPATH\) EXTRA\_LIB = (PKG_LIB) \(MPI\_LIB\) (FFT_LIB) \(JPG\_LIB\) (PKG_SYSLIB)

\(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)

\.o:.cpp
     \(CC\) (CCFLAGS) \(SHFLAGS\) (EXTRA_INC) -c $<

\.d:.cpp
     \(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

chris

Chris,

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

Prentice

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.

Steve

Steve,

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.

Prentice