Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |   all Development mailing list

Subject: Re: [OMPI devel] LOCK_SHARED?
From: Terry Dontje (Terry.Dontje_at_[hidden])
Date: 2009-01-05 15:00:15


Jim Langston wrote:
> Hi Rolf,
>
> Thanks for the pointers, they are very clear and concise. I followed
> the general
> flow of what was done to fix the issue in 1.3 and did something
> similar for 1.2.9.
>
> In mpicxx.cc, I did this change:
>
> #include <sys/synch.h>
> #ifdef LOCK_SHARED
> static const int ompi_synch_lock_shared = LOCK_SHARED ;
> #undef LOCK_SHARED
> #endif
> const int LOCK_SHARED = MPI_LOCK_SHARED;
>
> Even though the variable getting set is basically dead code and not
> necessary,
> my goal is that if someone is looking at the 1.3 notes, they will see
> what I did. This
> makes OpenMPI happy and the compile continues and chugs along.
>
> If someone thinks I screwed up OpenMPI , please let me know.
For a one off change for usage with Solaris and Sun Studio I think the
above is fine. However, for a general fix that would not break builds
for other platforms you'd really want to pull over the other handful of
lines. It probably wouldn't be that bad to just CMR the changes to
the 1.2 branch. When the original changes to the trunk and 1.3 happened
I really didn't think there were going to be more changes to the 1.2
branch at the time which is why we opted not to CMR it at the time.

--td
>
> Thanks,
>
> Jim
>
> ///////////////////////////////////
>
>
> Rolf Vandevaart wrote:
>>
>> Hi Jim:
>> Yes, we ran into this also and your diagnosis is correct. The
>> details are in this ticket.
>> https://svn.open-mpi.org/trac/ompi/ticket/1477
>>
>> We fixed it in the trunk and in the 1.3 series but we never
>> backported it to the 1.2 series
>> as 1.3 was going to be released "really soon". Here is the ticket
>> for moving the fix
>> into the 1.3 series.
>> https://svn.open-mpi.org/trac/ompi/ticket/1494
>>
>> Send me an email offline and we can figure out how to fix this for
>> your case.
>>
>> Rolf
>>
>>
>> Jim Langston wrote:
>>> Hi all,
>>>
>>> Quick question, I'm compiling 1.2.9rc1 and get an error during
>>> compilation:
>>>
>>> //////////////////
>>>
>>>
>>> source='mpicxx.cc' object='mpicxx.lo' libtool=yes \
>>> DEPDIR=.deps depmode=none /bin/sh ../../../config/depcomp \
>>> /bin/sh ../../../libtool --tag=CXX --mode=compile
>>> /export/home/langston/COMPILER/SUNWspro/bin/CC -DHAVE_CONFIG_H -I.
>>> -I../../../opal/include -I../../../orte/include
>>> -I../../../ompi/include -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1
>>> -DOMPI_SKIP_MPICXX=1 -I../../.. -O -DNDEBUG -mt -c -o mpicxx.lo
>>> mpicxx.cc
>>> libtool: compile: /export/home/langston/COMPILER/SUNWspro/bin/CC
>>> -DHAVE_CONFIG_H -I. -I../../../opal/include -I../../../orte/include
>>> -I../../../ompi/include -DOMPI_BUILDING_CXX_BINDINGS_LIBRARY=1
>>> -DOMPI_SKIP_MPICXX=1 -I../../.. -O -DNDEBUG -mt -c mpicxx.cc -KPIC
>>> -DPIC -o .libs/mpicxx.o
>>> "mpicxx.cc", line 293: Error: A declaration does not specify a tag
>>> or an identifier.
>>> "mpicxx.cc", line 293: Error: Use ";" to terminate declarations.
>>> "mpicxx.cc", line 293: Error: A declaration was expected instead of
>>> "0x01".
>>> 3 Error(s) detected.
>>> gmake: *** [mpicxx.lo] Error 1
>>>
>>> ////////////////////////////
>>>
>>> I'm working with OpenSolaris 2008.11 and have found the conflict to
>>> be with:
>>>
>>> /usr/include/sys/synch.h , which also contains LOCK_SHARED
>>> ....
>>>
>>> /* Keep the following values in sync with pthread.h */
>>> #define LOCK_NORMAL 0x00 /* same as
>>> USYNC_THREAD */
>>> #define LOCK_SHARED 0x01 /* same as
>>> USYNC_PROCESS */
>>> #define LOCK_ERRORCHECK 0x02 /* error check lock */
>>> #define LOCK_RECURSIVE 0x04 /* recursive lock */
>>> #define LOCK_PRIO_INHERIT 0x10 /* priority
>>> inheritance lock */
>>> #define LOCK_PRIO_PROTECT 0x20 /* priority ceiling
>>> lock */
>>> #define LOCK_ROBUST 0x40 /* robust lock */
>>>
>>> ......
>>>
>>> If I comment out the line in the system include file, everything
>>> will finish
>>> compiling, or if I comment out the line in mpicxx.cc, everything
>>> will finish
>>> compiling.
>>>
>>> Has anyone else found this issue and/or a workaround?
>>>
>>> Thanks,
>>>
>>> Jim
>>> _______________________________________________
>>> devel mailing list
>>> devel_at_[hidden]
>>> http://www.open-mpi.org/mailman/listinfo.cgi/devel
>>
>>
>
>