Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] A different 1.5rc5 build failure w/ PGI compilers
From: Jeff Squyres (jsquyres_at_[hidden])
Date: 2010-08-24 20:54:29


Thanks Paul -- reported in #2544.

On Aug 24, 2010, at 6:07 PM, Paul H. Hargrove wrote:

> I went to try to reproduce the problem Larry Baker reported w/ the PGI 10.3 compilers and undefined references in libopen-pal.so when linking opal_wrapper. Instead I encountered a different error that does not (as best I can tell) correspond to any of the issues Larry has reported recently. Once I disable the error-inducing VT code, I am unable to reproduce Larry's problem with the 10.3, 10.5 or 10.8 PGI compilers.
>
> My system and the errors:
>
> $ cat /etc/redhat-release
> Scientific Linux SL release 5.4 (Boron)
>
> $ uname -a
> Linux cvrsvc01 2.6.18-164.9.1.el5c-perf #1 SMP Wed Jun 9 14:40:25 PDT 2010 x86_64 x86_64 x86_64 GNU/Linux
>
> $ /lib64/libc.so.6 GNU C Library stable release version 2.5, by Roland McGrath et al.
> Copyright (C) 2006 Free Software Foundation, Inc.
> This is free software; see the source for copying conditions.
> There is NO warranty; not even for MERCHANTABILITY or FITNESS FOR A
> PARTICULAR PURPOSE.
> Compiled by GNU CC version 4.1.2 20080704 (Red Hat 4.1.2-44).
> Compiled on a Linux 2.6.9 system on 2009-09-02.
> Available extensions:
> The C stubs add-on version 2.1.2.
> crypt add-on version 2.1 by Michael Glad and others
> GNU Libidn by Simon Josefsson
> GNU libio by Per Bothner
> NIS(YP)/NIS+ NSS modules 0.19 by Thorsten Kukuk
> Native POSIX Threads Library by Ulrich Drepper et al
> BIND-8.2.3-T5B
> RT using linux kernel aio
> Thread-local storage support included.
> For bug reporting instructions, please see:
> <http://www.gnu.org/software/libc/bugs.html>.
>
> $ pgcc -V pgcc 10.5-0 64-bit target on x86-64 Linux -tp nehalem-64
> Copyright 1989-2000, The Portland Group, Inc. All Rights Reserved.
> Copyright 2000-2010, STMicroelectronics, Inc. All Rights Reserved.
>
> $ [path_to]/openmpi-1.5rc5/configure CC=pgcc CXX=pgCC F77=pgf77 FC=pgf90
> [...]
>
> $ make
> [...]
> make[9]: Entering directory `/global/scratch/sd/hargrove/ompi-1.5rc5-pgi-10.5/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile'
> CXX otfprofile-otfprofile.o
> "/global/common/carver/usg/pgi/10.5/linux86-64/10.5/include/omp.h", line 41: error:
> expected an identifier
> extern int omp_get_thread_num(void);
> ^
> "/global/common/carver/usg/pgi/10.5/linux86-64/10.5/include/omp.h", line 43: error:
> expected an identifier
> extern int omp_get_num_threads(void);
> ^
> "../../../../../../../../../openmpi-1.5rc5/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp", line 572: error:
> this kind of pragma may not be used here
> # pragma omp barrier
> ^
> "../../../../../../../../../openmpi-1.5rc5/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp", line 607: error:
> this kind of pragma may not be used here
> # pragma omp barrier
> ^
>
> "../../../../../../../../../openmpi-1.5rc5/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp", line 648: error:
> this kind of pragma may not be used here
> # pragma omp barrier
> ^
>
> 5 errors detected in the compilation of "../../../../../../../../../openmpi-1.5rc5/ompi/contrib/vt/vt/extlib/otf/tools/otfprofile/otfprofile.cpp".
> [...]
>
> It appears that the source file in question ALREADY contains a work-around for this issue:
>> /* Disable OpenMP if the PGI compiler is used to work around the following errors:
>>
>> compiler version compiler error
>> < 9.0-3 PGCC-S-0000-Internal compiler error. calc_dw_tag:no tag
>> (see Technical Problem Report 4337 at http://www.pgroup.com/support/release_tprs_90.htm)
>>
>> 10.1 - 10.6 this kind of pragma may not be used here
>> #pargma omp barrier
>> */
>> #if defined(_OPENMP) && defined(__PGI)
>> # undef _OPENMP
>> #endif
>>
>>
>> #ifdef _OPENMP
>> # include <omp.h>
>> #else
>> # define omp_get_thread_num() 0
>> # define omp_get_num_threads() 1
>> #endif
>
> However, it appears that the C++ STL headers (included via Summary.h) are indirectly including omp.h, leading to this failure: the "expected an identifier" due to the two #defines in the work-around, and the "this kind of pragma..." errors due to the original issue resurfacing.
>
> I have reproduced this problem with PGI versions 10.3, 10.5 and 10.8.
>
> If I configure with --disable-vt then I (obviously) don't encounter this error. In that case I am able to complete the build of 1.5rc5 with no errors. This means an INABILITY to reproduce Larry's undefined references problem.
>
> -Paul
>
> --
> Paul H. Hargrove PHHargrove_at_[hidden]
> Future Technologies Group
> HPC Research Department Tel: +1-510-495-2352
> Lawrence Berkeley National Laboratory Fax: +1-510-486-6900
>
> _______________________________________________
> devel mailing list
> devel_at_[hidden]
> http://www.open-mpi.org/mailman/listinfo.cgi/devel

-- 
Jeff Squyres
jsquyres_at_[hidden]
For corporate legal information go to:
http://www.cisco.com/web/about/doing_business/legal/cri/