Open MPI logo

Open MPI User's Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Open MPI User's mailing list

Subject: Re: [OMPI users] compilation error with pgcc Unknown switch
From: Abhinav Sarje (asarje_at_[hidden])
Date: 2012-02-16 14:52:23


Hi Nathan,

I had earlier tried to compile OpenMPI with just PGI compilers
(without cray wrapper), but with that my code was not able to run on
the compute nodes of the cray cluster (it just ran on the MOM node).
Therefore I have been trying to compiler OpenMPI with the cray
wrappers.

I will checkout the cray-xe6 version, and try to follow the instructions.

Thanks!
Abhinav.

On Thu, Feb 16, 2012 at 8:31 AM, Nathan Hjelm <hjelmn_at_[hidden]> wrote:
> Abhinav, you shouldn't be using the cray wrappers to build Open MPI or
> anything linked against Open MPI. The Cray wrappers will automatically
> include lots of stuff you don't want. Use pgcc, pgcc, or icc directly. You
> shouldn't have any trouble running in parallel with either aprun or mpirun
> (orterun).
>
> If you haven't already please check out contrib/platform/lanl/cray-xe6 to
> see how to build Open MPI with support for the xe6.
>
> -Nathan
>
>
> On Wed, 15 Feb 2012, Abhinav Sarje wrote:
>
>> Hi Gus,
>>
>> I am building using the cray wrappers over the PGI compilers, which
>> gives the errors. I tried building without the cray wrappers, but then
>> it does not run in parallel on the XE6 system I am using. I am going
>> to try the latest nightly build.
>>
>> Abhinav.
>>
>> On Wed, Feb 15, 2012 at 12:22 PM, Gustavo Correa <gus_at_[hidden]>
>> wrote:
>>>
>>>
>>> On Feb 15, 2012, at 1:58 PM, Abhinav Sarje wrote:
>>>
>>>> Hi Gus,
>>>> I have not added any flags that include static, but when I do a
>>>> verbose compilation output for the point where error occurs, I see
>>>> that there are some -Bstatic flags. I tried to manually remove the
>>>> -Bstatic included just before the libopen-pal.so library, and that
>>>> particular line then compiled without error. But then while doing
>>>> overall build, the same error occurs at multiple points.
>>>>
>>>> I will try to use the latest nightly tarball and see if it works.
>>>>
>>>> Thanks a lot.
>>>>
>>>
>>> Hi Abhinav
>>>
>>> For what it is worth, I built here OpenMPI 1.4.4 on Linux x86-64 CentOS
>>> 5.2 [a bit old]
>>> with the PGI 11.7 compilers.
>>> I didn't even use the -noswitcherror switch [which I had to use in some
>>> of the
>>> previous versions of OpenMPI and PGI].
>>>
>>> How about forcing the use of shared libraries with -Bdynamic along with
>>> that -noswitcherror,
>>> in the CC, FC, etc declarations?
>>>
>>> Still, this looks strange, and my guess is that this may be some twist in
>>> your compiler
>>> installation/configuration.
>>>
>>> But it may come also from the OpenMPI configure script.
>>> Could the OpenMPI configure pick and use the PGI -Bstatic flag, perhaps?
>>> This type of thing only the developers can tell.
>>> Better hear from them.
>>>
>>>
>>> I hope this helps,
>>> Gus Correa
>>>
>>>
>>>
>>>> Abhinav
>>>>
>>>> On Wed, Feb 15, 2012 at 7:42 AM, Gustavo Correa <gus_at_[hidden]>
>>>> wrote:
>>>>>
>>>>> Hi Abhinav
>>>>>
>>>>> Did you add to your compiler flags -Bstatic [or perhaps -static],
>>>>> or any optimization flags that may include -Bstatic/-static?
>>>>> Check also the compiler configuration, and any possible user
>>>>> customization
>>>>> [~/.mypggcc and friends] to see if -Bstatic is there, maybe
>>>>> inadvertently, and is set by default.
>>>>> That is all I can think of.
>>>>> Maybe it will require  Jeff and the Open MPI developers to sort
>>>>> the problem out.
>>>>>
>>>>> Gus Correa
>>>>>
>>>>> On Feb 15, 2012, at 12:19 AM, Abhinav Sarje wrote:
>>>>>
>>>>>> Hi Gus, I had tried with the -noswitcherror flags, which removed the
>>>>>> 'unknown-switch' error, but then I am still getting the "attempted
>>>>>> static link of dynamic object" error as I reported earlier.
>>>>>>
>>>>>> Thanks.
>>>>>>
>>>>>> On Fri, Feb 10, 2012 at 5:57 AM, Gustavo Correa
>>>>>> <gus_at_[hidden]> wrote:
>>>>>>>
>>>>>>> Hi Abhinav
>>>>>>>
>>>>>>> Setting CC='pgcc --noswitcherror', FC='pgfortran --noswitcherror',
>>>>>>> etc, may prevent the
>>>>>>> error message [but not sure it will prevent any actual and unreported
>>>>>>> error].
>>>>>>> Check details with 'man pgfortran'.
>>>>>>>
>>>>>>> I hope this helps,
>>>>>>> Gus Corea
>>>>>>>
>>>>>>> .
>>>>>>>
>>>>>>> On Feb 10, 2012, at 2:03 AM, Abhinav Sarje wrote:
>>>>>>>
>>>>>>>> I tried with 1.5.4 and same compilers, and got the exact same error.
>>>>>>>> I also tried PGI version 11.10.0, and got the same thing.
>>>>>>>>
>>>>>>>>
>>>>>>>> On Wed, Feb 8, 2012 at 3:04 AM, Jeff Squyres (jsquyres)
>>>>>>>> <jsquyres_at_[hidden]> wrote:
>>>>>>>>>
>>>>>>>>> Can you try building 1.5.4 with the same compilers?
>>>>>>>>>
>>>>>>>>> Sent from my phone. No type good.
>>>>>>>>>
>>>>>>>>> On Feb 7, 2012, at 3:14 PM, "Abhinav Sarje" <asarje_at_[hidden]> wrote:
>>>>>>>>>
>>>>>>>>>> I am trying to build open-mpi 1.4.4 (latest stable from
>>>>>>>>>> open-mpi.org)
>>>>>>>>>> using PGI compilers on a cray platform. PGI compilers' version is
>>>>>>>>>> 11.9.0. I get the following error while building:
>>>>>>>>>> -------------------------------------
>>>>>>>>>> Making all in tools/wrappers
>>>>>>>>>> make[2]: Entering directory
>>>>>>>>>> `{my_installation_directory}/opal/tools/wrappers'
>>>>>>>>>> source='opal_wrapper.c' object='opal_wrapper.o' libtool=no \
>>>>>>>>>>    DEPDIR=.deps depmode=none /bin/sh ../../../config/depcomp \
>>>>>>>>>>    cc "-DEXEEXT=\"\"" -I. -I../../../opal/include
>>>>>>>>>> -I../../../orte/include -I../../../ompi/include
>>>>>>>>>> -I../../../opal/mca/paffinity/linux/plpa/src/libplpa   -I../../..
>>>>>>>>>> -D_REENTRANT  -O -DNDEBUG -fPIC  -c -o opal_wrapper.o
>>>>>>>>>> opal_wrapper.c
>>>>>>>>>> /bin/sh ../../../libtool --tag=CC   --mode=link cc  -O -DNDEBUG
>>>>>>>>>> -fPIC
>>>>>>>>>> -export-dynamic   -o opal_wrapper opal_wrapper.o
>>>>>>>>>> ../../../opal/libopen-pal.la -lnsl -lutil
>>>>>>>>>> libtool: link: cc -O -DNDEBUG -fPIC -o .libs/opal_wrapper
>>>>>>>>>> opal_wrapper.o --export-dynamic
>>>>>>>>>>  ../../../opal/.libs/libopen-pal.so
>>>>>>>>>> -ldl -lnsl -lutil -rpath {my_installation_directory}/lib
>>>>>>>>>> pgcc-Error-Unknown switch: --export-dynamic
>>>>>>>>>> make[2]: *** [opal_wrapper] Error 1
>>>>>>>>>> make[2]: Leaving directory
>>>>>>>>>> `{my_installation_directory}/opal/tools/wrappers'
>>>>>>>>>> make[1]: *** [all-recursive] Error 1
>>>>>>>>>> make[1]: Leaving directory `{my_installation_directory}/opal'
>>>>>>>>>> make: *** [all-recursive] Error 1
>>>>>>>>>> -------------------------------------
>>>>>>>>>>
>>>>>>>>>> I see that the libtool packaged with open-mpi is 2.2.6b
>>>>>>>>>> When I try to compile this particular part with libtool versions
>>>>>>>>>> 2.2.6
>>>>>>>>>> or 2.4, I get the following error:
>>>>>>>>>> -------------------------------------
>>>>>>>>>> $ libtool --tag=CC   --mode=link cc  -O -DNDEBUG -fPIC
>>>>>>>>>> -export-dynamic   -o opal_wrapper opal_wrapper.o
>>>>>>>>>> ../../../opal/libopen-pal.la -lnsl -lutil
>>>>>>>>>> libtool: link: cc -O -DNDEBUG -fPIC -o .libs/opal_wrapper
>>>>>>>>>> opal_wrapper.o -Wl,--export-dynamic
>>>>>>>>>> ../../../opal/.libs/libopen-pal.so -ldl -lnsl -lutil -Wl,-rpath
>>>>>>>>>> -Wl,{my_installation_directory}/lib
>>>>>>>>>> /usr/bin/ld: attempted static link of dynamic object
>>>>>>>>>> `../../../opal/.libs/libopen-pal.so'
>>>>>>>>>> -------------------------------------
>>>>>>>>>>
>>>>>>>>>> Looking at earlier posts, apparently there was a bug with libtool
>>>>>>>>>> a
>>>>>>>>>> couple of years ago because of which the above error occurred.
>>>>>>>>>> This
>>>>>>>>>> was fixed in newer releases, but I am getting similar errors.
>>>>>>>>>>
>>>>>>>>>> Does anyone have any information on how to fix this, or if I am
>>>>>>>>>> doing
>>>>>>>>>> something wrong here?
>>>>>>>>>>
>>>>>>>>>> Thanks!
>>>>>>>>>> _______________________________________________
>>>>>>>>>> users mailing list
>>>>>>>>>> users_at_[hidden]
>>>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>>>>>>
>>>>>>>>>
>>>>>>>>> _______________________________________________
>>>>>>>>> users mailing list
>>>>>>>>> users_at_[hidden]
>>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>>>>>
>>>>>>>>
>>>>>>>> _______________________________________________
>>>>>>>> users mailing list
>>>>>>>> users_at_[hidden]
>>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>>>>
>>>>>>>
>>>>>>>
>>>>>>> _______________________________________________
>>>>>>> users mailing list
>>>>>>> users_at_[hidden]
>>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>>>
>>>>>>
>>>>>> _______________________________________________
>>>>>> users mailing list
>>>>>> users_at_[hidden]
>>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>>
>>>>>
>>>>>
>>>>> _______________________________________________
>>>>> users mailing list
>>>>> users_at_[hidden]
>>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>>
>>>>
>>>> _______________________________________________
>>>> users mailing list
>>>> users_at_[hidden]
>>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>>
>>>
>>>
>>> _______________________________________________
>>> users mailing list
>>> users_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>>
>>
>> _______________________________________________
>> users mailing list
>> users_at_[hidden]
>> http://www.open-mpi.org/mailman/listinfo.cgi/users
>
>
> _______________________________________________
> users mailing list
> users_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/users