[lammps-users] Compile error on Mac

Dear Users,

I have compiled Feb 2007 version of Lammps on Mac OS X (Intel) and works
fine but the latest build is giving following errors; my make.serial
files are identical (as is). Using gcc.

while making STUBS i get the following warning

g++ -O -c mpi.cpp
mpi.cpp:35: warning: non-local variable ‘<anonymous struct> double_int’
uses anonymous type
ar rs libmpi.a mpi.o
ar: creating archive libmpi.a

And while making 'make.serial" (no MPI, no FFTs) get this error

      LAMMPS_NS::PPPM::brick2fft() in pppm.o
      LAMMPS_NS::PPPM::brick2fft() in pppm.o
      LAMMPS_NS::PPPM::brick2fft() in pppm.o
      LAMMPS_NS::PPPM::brick2fft() in pppm.o
      remap_3d(double*, double*, double*, remap_plan_3d*)in remap.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::Special::build() in special.o
      LAMMPS_NS::WriteRestart::write(char*) in write_restart.o
ld: symbol(s) not found
collect2: ld returned 1 exit status
make[1]: *** [../lmp_serial] Error 1
make: *** [serial] Error 2

Any idea?

Thanks,

[email protected]...

Dear Users,

dear bhavin,

I have compiled Feb 2007 version of Lammps on Mac OS X (Intel) and works
fine but the latest build is giving following errors; my make.serial
files are identical (as is). Using gcc.

while making STUBS i get the following warning

g++ -O -c mpi.cpp
mpi.cpp:35: warning: non-local variable ��<anonymous struct> double_int��
uses anonymous type
ar rs libmpi.a mpi.o
ar: creating archive libmpi.a

no problem here.

And while making 'make.serial" (no MPI, no FFTs) get this error

      LAMMPS_NS::PPPM::brick2fft() in pppm.o

you cannot compile the kspace package without an FFT.
unconfigure kspace and recompile. see the installation
instructions for details.

cheers,
   axel.

Even if you don't want FFTs, your Makefile,foo needs
a switch of -DFFT_NONE - are you using that?

Steve

Thanks for the reply Axel/Steve.

I think i have the same problem like one presented by another user: Openmpi already installed on my OS X. I am trying my way around, meanwhile if anyone has solved it, let me know.

Bhavin

Dear Users,

Has anybody compiled lammps on Mac OS 10.5x which as built in Open MPI?

I have tried compiling makefile.serial and have also tried to compile with an edited Makefile.xxx using openmpi provided in Mac OS 10.5x. Basically, instead of the mpi.h and libmpi.a in the STUBS folder, I gave the path for mpi.h and libmpi.dylib of openmpi.

As suggested by Axel, I have tried removing kspace package before compiling since makefile.serial is without FFTs.

Also, what is the role of USRLIB = -lmpi statement in the makefile.serial?

Your help is appreciated!

Thanks,

Bhavin N. Vadgama
Dept. of Mech. Engg.
Auburn University

Dear Users,

dear bhavin,

Has anybody compiled lammps on Mac OS 10.5x which as built in Open MPI?

I have tried compiling makefile.serial and have also tried to compile with
an edited Makefile.xxx using openmpi provided in Mac OS 10.5x. Basically,

have you tried the Makefile.openmpi from the distribution?

instead of the mpi.h and libmpi.a in the STUBS folder, I gave the path for
mpi.h and libmpi.dylib of openmpi.

for a regular MPI compile you should use the mpi provided compiler
wrappers and then never have to worry about where the MPI include
file or libraries are. OpenMPI for example comes with quite a few
of them (although i don't know how much the folks at apple have
messed it up to fit into their system of compiling stuff).

As suggested by Axel, I have tried removing kspace package before compiling
since makefile.serial is without FFTs.

Also, what is the role of USRLIB = -lmpi statement in the makefile.serial?

using MPI is an integral part of LAMMPS and you cannot turn it off,
so the "stubs" library emulates MPI calls for a single processor case
(mostly by doing nothing).

Your help is appreciated!

if you would provide more details about what kinds of errors you
see now, we might give you more help...

cheers,
   axel.

As suggested by Axel, I have tried removing kspace package before compiling since makefile.serial is without > FFTs.

You can just use -DFFT_NONE w/out removing the package.

Also, what is the role of USRLIB = -lmpi statement in the makefile.serial?

Just specifying the MPI lib when you link to it directly (e.g. in the STUBS dir)
rather than let the compiler do it (e.g. mpiCC)

Steve