Re: [OMPI users] link problem on 64bit platform

2010-11-02 Thread Jeff Squyres
On Nov 2, 2010, at 4:57 AM, jody wrote:

> So i guess the basic question is:
>  is it permitted to rename openMPI installations, and if yes how is
> this porperly done (since a simple mv doesn't work)

Yes: http://www.open-mpi.org/faq/?category=building#installdirs

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/



Re: [OMPI users] link problem on 64bit platform

2010-11-02 Thread jody
HI
@trent
  no, i didn't use the other calls, because i think they are all the
same (on my installation they are all soft links to opal_wrapper)

@tim
  gentoo on 64 bit does have lib and lib64 directories for the
respective architectures (at / and at /usr)
  but in my 64-bit installation of openMPI there  is no lib64
directory, only a lib.
  I thought the naming of the internal directory structure of openMPI
would be determined by the installation
  (i.e. the `make install`) and not by the operating system.

@jeff
  i don't remember the particular CFLAGS or CXXFLAGS i had used, but i
have now rebuilt openMPI with
   ./configure CFLAGS=-m64 CXXFLAGS=-m64
--prefix=/opt/openmpi-1.4.2-64 --with-threads --disable-mpi-f77
--disable-mpi-f90
  and now the problem has been solved.

After something similar has then happened when trying to do 32bit
compilations, i think i found out what the original problem was:
I had first done a 64 bit installation of OpenMPI installed under
/opt/openmpi-1.4.2.
I later renamed this directory to /opt/openmpi-1.4.2-64, and installed
a 32bit version of OpenMPI in /opt/openmpi-1.4.2

Apparently, when i the tried to do a 64bit compilation, the linker
looked into the lib-directory with the *original* name
/opt/openmpi-1.4.2
instead of /opt/openmpi-1.4.2-64, so of course it only found the 32bit
libs of the newer installation.

To test this assumption i now renamed the 64-bit installation set my
/opt/openmpi link to the new directory and tried to compile:
jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
Cannot open configuration file
/opt/openmpi-1.4.2-64/share/openmpi/mpiCC-wrapper-data.txt
Error parsing data file mpiCC: Not found

So again, it looked into the original installation directory of the
64-bit installation for some files

So i guess the basic question is:
  is it permitted to rename openMPI installations, and if yes how is
this porperly done (since a simple mv doesn't work)

Sorry about the imprecise question. Indeed, if i had looked exactly at
the original output, i should have noticed that
the linker was looking in the wrong directory.

Thank You
  Jody



Thanks anyway
  Jody


On Mon, Nov 1, 2010 at 1:52 PM, Tim Prince  wrote:
> On 11/1/2010 5:24 AM, Jeff Squyres wrote:
>>
>> On Nov 1, 2010, at 5:20 AM, jody wrote:
>>
>>> jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
>>>
>>> /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
>>> skipping incompatible /opt/openmpi-1.4.2/lib/libmpi_cxx.so when
>>> searching for -lmpi_cxx
>>
>> This is the key message -- it found libmpi_cxx.so, but the linker deemed
>> it incompatible, so it skipped it.
>
> Typically, it means that the cited library is a 32-bit one, to which the
> 64-bit ld will react in this way.  You could have verified this by
> file /opt/openmpi-1.4.2/lib/*
> By normal linux conventions a directory named /lib/ as opposed to /lib64/
> would contain only 32-bit libraries.  If gentoo doesn't conform with those
> conventions, maybe you should do your learning on a distro which does.
>
> --
> Tim Prince
>
> ___
> users mailing list
> us...@open-mpi.org
> http://www.open-mpi.org/mailman/listinfo.cgi/users
>



Re: [OMPI users] link problem on 64bit platform

2010-11-01 Thread Tim Prince

On 11/1/2010 5:24 AM, Jeff Squyres wrote:

On Nov 1, 2010, at 5:20 AM, jody wrote:


jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /opt/openmpi-1.4.2/lib/libmpi_cxx.so when
searching for -lmpi_cxx

This is the key message -- it found libmpi_cxx.so, but the linker deemed it 
incompatible, so it skipped it.
Typically, it means that the cited library is a 32-bit one, to which the 
64-bit ld will react in this way.  You could have verified this by

file /opt/openmpi-1.4.2/lib/*
By normal linux conventions a directory named /lib/ as opposed to 
/lib64/ would contain only 32-bit libraries.  If gentoo doesn't conform 
with those conventions, maybe you should do your learning on a distro 
which does.


--
Tim Prince



Re: [OMPI users] link problem on 64bit platform

2010-11-01 Thread Jeff Squyres
On Nov 1, 2010, at 5:20 AM, jody wrote:

> jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
> /usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
> skipping incompatible /opt/openmpi-1.4.2/lib/libmpi_cxx.so when
> searching for -lmpi_cxx

This is the key message -- it found libmpi_cxx.so, but the linker deemed it 
incompatible, so it skipped it.

How did you configure / build Open MPI?  Did the C++ bindings library somehow 
get built with incompatible flags as compared to the other OMPI libraries?   
E.g., did you supply CFLAGS but not CXXFLAGS to the configure script?

-- 
Jeff Squyres
jsquy...@cisco.com
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/




Re: [OMPI users] link problem on 64bit platform

2010-11-01 Thread Trent Creekmore
Have you tried using mpicxx, or mpic++ ?



-Original Message-
From: users-boun...@open-mpi.org [mailto:users-boun...@open-mpi.org] On
Behalf Of jody
Sent: Monday, November 01, 2010 4:20 AM
To: Open MPI Users
Subject: [OMPI users] link problem on 64bit platform

Hi
On a newly installed 64bit linux (2.6.32-gentoo-r7) with gcc version 4.4.4
i can't compile even simple Open-MPI applications (OpenMPI 1.4.2).

The message is:
jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/l
d:
skipping incompatible /opt/openmpi-1.4.2/lib/libmpi_cxx.so when
searching for -lmpi_cxx
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/l
d:
cannot find -lmpi_cxx
collect2: ld returned 1 exit status

I am using the 64bit mpiCC:
jody@aim-squid_0 ~/progs $ which mpiCC
/opt/openmpi/bin/mpiCC
jody@aim-squid_0 ~/progs $ ls -l /opt/openmpi
lrwxrwxrwx 1 root root 22 Nov  1 09:56 /opt/openmpi ->
/opt/openmpi-1.4.2-64/

The mpi_cxx should be found in the lib subdirectory:
jody@aim-squid_0 ~/progs $ ls -l /opt/openmpi/lib/libmpi_cxx*
-rwxr-xr-x 1 root root   1073 Jun 24 15:50 /opt/openmpi/lib/libmpi_cxx.la
lrwxrwxrwx 1 root root 19 Jun 24 15:50
/opt/openmpi/lib/libmpi_cxx.so -> libmpi_cxx.so.0.0.1
lrwxrwxrwx 1 root root 19 Jun 24 15:50
/opt/openmpi/lib/libmpi_cxx.so.0 -> libmpi_cxx.so.0.0.1
-rwxr-xr-x 1 root root 137442 Jun 24 15:50
/opt/openmpi/lib/libmpi_cxx.so.0.0.1

PATH and LD_LIBRARY_PATH contain the correct paths:
jody@aim-squid_0 ~/progs $ echo $PATH
/opt/openmpi/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x
86_64-pc-linux-gnu/gcc-bin/4.4.4
jody@aim-squid_0 ~/progs $ echo $LD_LIBRARY_PATH
/opt/openmpi/lib:

AM i missing something?

Thank You
  jody
___
users mailing list
us...@open-mpi.org
http://www.open-mpi.org/mailman/listinfo.cgi/users



[OMPI users] link problem on 64bit platform

2010-11-01 Thread jody
Hi
On a newly installed 64bit linux (2.6.32-gentoo-r7) with gcc version 4.4.4
i can't compile even simple Open-MPI applications (OpenMPI 1.4.2).

The message is:
jody@aim-squid_0 ~/progs $ mpiCC -g -o HelloMPI HelloMPI.cpp
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
skipping incompatible /opt/openmpi-1.4.2/lib/libmpi_cxx.so when
searching for -lmpi_cxx
/usr/lib/gcc/x86_64-pc-linux-gnu/4.4.4/../../../../x86_64-pc-linux-gnu/bin/ld:
cannot find -lmpi_cxx
collect2: ld returned 1 exit status

I am using the 64bit mpiCC:
jody@aim-squid_0 ~/progs $ which mpiCC
/opt/openmpi/bin/mpiCC
jody@aim-squid_0 ~/progs $ ls -l /opt/openmpi
lrwxrwxrwx 1 root root 22 Nov  1 09:56 /opt/openmpi -> /opt/openmpi-1.4.2-64/

The mpi_cxx should be found in the lib subdirectory:
jody@aim-squid_0 ~/progs $ ls -l /opt/openmpi/lib/libmpi_cxx*
-rwxr-xr-x 1 root root   1073 Jun 24 15:50 /opt/openmpi/lib/libmpi_cxx.la
lrwxrwxrwx 1 root root 19 Jun 24 15:50
/opt/openmpi/lib/libmpi_cxx.so -> libmpi_cxx.so.0.0.1
lrwxrwxrwx 1 root root 19 Jun 24 15:50
/opt/openmpi/lib/libmpi_cxx.so.0 -> libmpi_cxx.so.0.0.1
-rwxr-xr-x 1 root root 137442 Jun 24 15:50 /opt/openmpi/lib/libmpi_cxx.so.0.0.1

PATH and LD_LIBRARY_PATH contain the correct paths:
jody@aim-squid_0 ~/progs $ echo $PATH
/opt/openmpi/bin:/usr/local/bin:/usr/local/bin:/usr/bin:/bin:/opt/bin:/usr/x86_64-pc-linux-gnu/gcc-bin/4.4.4
jody@aim-squid_0 ~/progs $ echo $LD_LIBRARY_PATH
/opt/openmpi/lib:

AM i missing something?

Thank You
  jody