compilation problems -- openmpi

Dear all,

my hard drive died today, and before the official funeral ceremony, I need to re-compile everything on my new system, Ubuntu 11. I remembered how to compile serial lammps, however, I am still getting problems with my openmpi parallel lammps…

Dear all,
my hard drive died today, and before the official funeral ceremony, I need
to re-compile everything on my new system, Ubuntu 11. I remembered how to
compile serial lammps, however, I am still getting problems with my openmpi
parallel lammps...
_______________________________________________________________________________________

o random_park.o read_data.o read_restart.o region_block.o region_cone.o
region.o region_cylinder.o region_intersect.o region_plane.o region_prism.o
region_sphere.o region_union.o remap.o remap_wrap.o replicate.o respa.o
run.o set.o special.o thermo.o timer.o universe.o update.o variable.o
velocity.o verlet.o write_restart.o -lfftw -lstdc++ -o ../lmp_openmpi
/usr/bin/ld: cannot find -lfftw
collect2: ld returned 1 exit status
make[1]: *** [../lmp_openmpi] Error 1
I realise that the problem is probably in this section of my makefile:
FFT_INC = -DFFT_FFTW -I/home/s0793217/fftw-2.1.5/fftw/include
FFT_PATH = -L/home/s0793217/fftw-2.1.5/fftw/lib
FFT_LIB = -lfftw
but I am confused and cannot understand what to look for...

the linker is looking for a file called libfftw.a or libfftw.so
and you told it to search the directory /home/s0793217/fftw-2.1.5/fftw/lib
for it in addition to the system directories. you have to check if the directory
and the corresponding files exist.

this is a recurring, but not lammps specific question. i would recommend
to try teach yourself some basic knowledge about the tools you are using.
there are several sites where you can pick up that knowledge. my own and
very minimal take on the subject is here:
http://sites.google.com/site/akohlmey/lectures/introduction-to-hpc-fall-2010
you may also want to have a look at henry neeman's "supercomputing in
plain english" workshop materials posted here.
http://www.oscer.ou.edu/education.php
and there is the CI-Tutor webpage hosted by NCSA with lots of relevant
and well written self-study tutorials.
http://www.citutor.org/

cheers,
    axel.

Dear Dr Axel,

Thank you very much for your help! I understand that this issue has been discussed several times before, and I have indeed looked at several fftw related enquiries and documents (http://www.scribd.com/doc/22174352/Building-LAMMPS-With-FFTW and lammps best practices for intel cluster… etc) and I remember compiling openmpi lammps earlier on the university system with those instructions and it worked. I, again, do the following steps:

in fftw-2.1.5 I type

./configure --prefix=/home/s0793217/localfft/
than
make; make install

and get a localfft with 3 folders: include, info and lib in which libfftw.a exists. I also point to it in my makefile:

FFT_INC = -DFFT_FFTW -I/home/s0793217/localfft/include
FFT_PATH = -L/home/s0793217/s0793217/localfft/lib
FFT_LIB = -lfftw

I cannot see what exactly is going wrong here, because last time this worked…

Dear Dr Axel,
Thank you very much for your help! I understand that this issue has been
discussed several times before, and I have indeed looked at several fftw
related enquiries and documents
(http://www.scribd.com/doc/22174352/Building-LAMMPS-With-FFTW and lammps
best practices for intel cluster... etc) and I remember compiling openmpi
lammps earlier on the university system with those instructions and it
worked. I, again, do the following steps:
in fftw-2.1.5 I type
./configure --prefix=/home/s0793217/localfft/
than
make; make install

and get a localfft with 3 folders: include, info and lib in which libfftw.a
exists. I also point to it in my makefile:

FFT_INC = -DFFT_FFTW -I/home/s0793217/localfft/include
FFT_PATH = -L/home/s0793217/s0793217/localfft/lib

the path here is wrong. it obviously should be:

-L/home/s0793217/localfft/lib

FFT_LIB = -lfftw

I cannot see what exactly is going wrong here, because last time this
worked...

i guess it is too obvious. look closer.

axel.

Dear dr Axel,

Thank you very much again for your constant help and for great information sources!!! I must have been too clumsy not to notice the elephant-obvious mistake!

With best wishes,
Anna