[lammps-users] Installing LAMMPS using make crockett

Steve,

I agree that it is a LAM-7.0.6 problem when using Make.crockett.

The first few lines of the compiler error message I was getting before
contained:

> bond_quartic.cpp: In member function `virtual void
> LAMMPS_NS::BondQuartic::compute(int, int)':
> bond_quartic.cpp:69: `struct mpi2cppMap<int, mpi2cppMap<int

(*)(const

> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,

> int,
> void*, void*)>::Pair*>::Pair' has no member named `vflag_either'

Line 69 in bond_quartic.cpp contains a reference to a LAMMPS Force
object contained in the LAMMPS_NS namespace. This LAMMPS Force object
contains a pointer to a LAMMPS Pair object with a member named
vflag_either. When the force.h file is included into the
bond_quartic.cpp file, only the LAM Pair structure has been defined
(through the bond_quartic.h include, which includes bond.h, which
includes pointers.h, which includes mpi.h and lammps.h). This compiler
problem may be corrected if I exchange the position (order) of the
include statements "#include force.h" and "#include pair.h" in the
bond_quartic.cpp file. However, to correct this same problem throughout
all LAMMPS compiles, similar exchanges of include statements would be
necessary in many different .cpp files. Instead, to correct this
problem with fewer changes, I chose to change only the force.h, fix.h,
and comm.h files by injecting a "#include pair.h" statement. This
corrected all the bad Pair object references.

There may be a better way of correcting the problem. Please let me know
if you have one.

Thanks,

Paul

             "Steve Plimpton"
             <[email protected]
             > To
                                      Paul Harten/CI/USEPA/[email protected]
             04/08/2008 09:27 cc
             AM
                                                                Subject
                                      Re: [lammps-users] Installing
                                      LAMMPS using make crockett
                                                                        
Are you saying that if you include mpi.h, you can't use a data
struct or variable named Pair?

If so, this seems like a LAM problem. All the LAMMPS stuff
is in its own namespace.

I don't generally include files in other *.h files. Except
when required, like pointers.h, when deriving a class from
another.

Steve

From: "[email protected]" <[email protected]>
CC: Steve Plimpton <[email protected]>
Sender: "[email protected]"
           <[email protected]>
Date: Mon, 7 Apr 2008 11:39:48 -0600
Thread-Topic: [lammps-users] Installing LAMMPS using make crockett
Thread-Index: AciY1oG016vXZTegRx2Xjnc/GTmFNA==
Accept-Language: en-US
Content-Language: en-US
X-MS-Exchange-Organization-AuthAs: Anonymous
X-MS-Exchange-Organization-AuthSource: Cas1.srn.sandia.gov
X-MS-Has-Attach:
X-Auto-Response-Suppress: All
X-MS-TNEF-Correlator:
x-pmx-version: 5.4.1.325704, Antispam-Engine: 2.6.0.325393,

Antispam-Data:

2008.4.7.102736
x-tmwd-spam-summary: TS=20080407174037; SEV=2.2.2; DFV=B2008040714;
IFV=2.0.4,4.0-9; AIF=B2008040714; RPD=5.02.0125; ENG=IBF;

RPDID=7374723D303030312E30413031303230362E34374641354339352E303033373A53434653544154313133393535302C73733D312C6667733D30;

CAT=NONE; CON=NONE
x-wss-id: 6BE4831F2DG3705649-01-01
x-mms-spam-filter-id: B2008040714_5.02.0125_4.0-9
x-tmwd-ip-reputation: SIP=66.35.250.225;
IPRID=303030312E30413039303330312E34374641354143382E30303037;

CTCLS=T2;

CAT=Unknown
x-perlmx-spam: Gauge=IIIIIII, Probability=7%,

Report='BODY_SIZE_7000_7999 0,

NO_REAL_NAME 0, __CP_URI_IN_BODY 0, __CT 0, __CTE 0, __CT_TEXT_PLAIN

0,

__HAS_LIST_HEADER 0, __HAS_LIST_HELP 0, __HAS_LIST_SUBSCRIBE 0,
__HAS_LIST_UNSUBSCRIBE 0, __HAS_MSGID 0, __HAS_X_MAILER 0,

__MIME_TEXT_ONLY

0, __MIME_VERSION 0, __OEM_PRICE 0, __SANE_MSGID 0, __STOCK_PHRASE_7

0'

x-server-uuid: 6CEB1540-FE13-491B-9872-FD67060ED864
x-mimetrack: Serialize by Router on EPAHUB12/USEPA/US(Release
7.0.3|September 26, 2007) at 04/07/2008 01:39:50 PM
x-spam-score: 0.2 (/)
x-spam-report: Spam Filtering performed by sourceforge.net. See
http://spamassassin.org/tag/ for more details. Report problems to
http://sf.net/tracker/?func=add&group_id=1&atid=200001 0.2

NO_REAL_NAME

From: does not include a real name
X-MIME-Autoconverted: from quoted-printable to 8bit by

singsing.sandia.gov id m37Hfeox023981

There was a problem with the parallel compile using Makefile.crockett
because the Pair object created in LAMMPS has the exact same name as a
Pair structure used by LAM 7.0.6 in /opt/lam-7.0.6
/include/mpi2cxx/mpi2cpp_map.h. I was able to get around this by

adding

the line '#include "pair.h"' directly after '#include "pointers.h"' in
the LAMMPS include files comm.h, force.h, and fix.h to reference Pair
objects created by LAMMPS first. Everything compiled and linked

without

errors, and the lmp_crockett executable was created.

Paul

             "Steve Plimpton"
             <[email protected]
             >

To

                                      Paul Harten/CI/USEPA/[email protected]
             03/28/2008 10:45

cc

             AM

[email protected]

                                      t

Subject

                                      Re: [lammps-users] Installing
                                      LAMMPS using make crockett

This is a mystery. You might try using the latest upgraded LAMMPS
tarball (28Mar08), but I doubt that will help. I don't understand why
everything is wrapped with mpi2cpp. I would try compiling with
straight g++, instead of mpiCC. If g++ doesn't complain (and it
doesn't on my box), then mpiCC shouldn't either. mpiCC is just
a wrapper around a low-level compiler, so maybe something is
wrong with it on your box.

Steve

>
> I am trying to install LAMMPS on a beowulf cluster of Intel
workstations
> running RedHat 9.0. This cluster was set up using OSCAR from ORNL.
I
> am using Makefile.crockett for the compile. Some of the compiles
> succeed, but I get an error when compiling bond_quartic.cpp. A log
from
> the make crockett is given below.
>
> >From what I can tell, the Pair class does have a member named
> 'vflag_either'.
> Does anyone have suggestions where the problem is?
>
> Thanks,
>
> Paul
>
>
> make[1]: Entering directory
> `/home/pharten/lammps-22Jan08/src/Obj_crockett'
> make[1]: *** Warning: File `Makefile' has modification time in the
> future (2008-03-26 16:48:56 > 2008-03-26 16:08:54.820869)
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c angle_cosine_squared.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c angle_harmonic.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c atom_vec_angle.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c atom_vec.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c atom_vec_hybrid.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c bond_fene_expand.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c bond_hybrid.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c bond_morse.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c bond_nonlinear.cpp
> mpiCC -g -O -DFFT_NONE -DLAMMPS_GZIP -c bond_quartic.cpp
> bond_quartic.cpp: In member function `virtual void
> LAMMPS_NS::BondQuartic::compute(int, int)':
> bond_quartic.cpp:69: `struct mpi2cppMap<int, mpi2cppMap<int

(*)(const

> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,

> int,
> void*, void*)>::Pair*>::Pair' has no member named `vflag_either'
> bond_quartic.cpp:69: `struct mpi2cppMap<int, mpi2cppMap<int

(*)(const

> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,

> int,
> void*, void*)>::Pair*>::Pair' has no member named `vflag_global'
> bond_quartic.cpp:71: `struct mpi2cppMap<int, mpi2cppMap<int

(*)(const

> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,

> int,
> void*, void*)>::Pair*>::Pair' has no member named `cutsq'
> bond_quartic.cpp:160: no matching function for call to
`mpi2cppMap<int,
> mpi2cppMap<int (*)(const PMPI::Comm&, int, void*, void*, void*,
> bool&), int
> (*)(PMPI::Comm&, int, void*, void*)>::Pair*>::Pair::single(int&,
> int&, int&,
> int&, double&, double, double, double&)'
> bond_quartic.cpp:175: no matching function for call to
`mpi2cppMap<int,
> mpi2cppMap<int (*)(const PMPI::Comm&, int, void*, void*, void*,
> bool&), int
> (*)(PMPI::Comm&, int, void*,

void*)>::Pair*>::Pair::ev_tally(int&,

> int&,
> int&, int&, double&, double, double&, double&, double&, double&)'
> bond_quartic.cpp: In member function `virtual void
> LAMMPS_NS::BondQuartic::init_style()':
> bond_quartic.cpp:235: `struct mpi2cppMap<int, mpi2cppMap<int
(*)(const
> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,

> int,
> void*, void*)>::Pair*>::Pair' has no member named `single_enable'
> bond_quartic.cpp: In member function `virtual double
> LAMMPS_NS::BondQuartic::single(int, double, int, int)':
> bond_quartic.cpp:313: `struct mpi2cppMap<int, mpi2cppMap<int
(*)(const
> PMPI::Comm&, int, void*, void*, void*, bool&), int

(*)(PMPI::Comm&,