Open MPI logo

Open MPI Development Mailing List Archives

  |   Home   |   Support   |   FAQ   |  

This web mail archive is frozen.

This page is part of a frozen web archive of this mailing list.

You can still navigate around this archive, but know that no new mails have been added to it since July of 2016.

Click here to be taken to the new web archives of this list; it includes all the mails that are in this frozen archive plus all new mails that have been sent to the list since it was migrated to the new archives.

Subject: Re: [OMPI devel] SHMEM symmetric objects in shared libraries
From: Pritchard Jr., Howard (howardp_at_[hidden])
Date: 2014-07-29 13:30:42

Hi Josh,

No, I think what Bert is talking about is having something like

#include “shmem.h”

long my_dso_val = 0;

int foobar(void)
   printf(“Hello from a shared library\n”);


cc –fPIC –c foobar.c
cc –shared –o foobar.o
cc –o berts_code berts_code.c –lfoobar

then in your main example below do a shmem_long_fadd on my_dso_val.
It won’t work unless you’ve put smarts in the shmem library to go through
the segments of loaded shared libraries and register them with the same
mechanism used for the data segment of the executable.


From: devel [mailto:devel-bounces_at_[hidden]] On Behalf Of Joshua Ladd
Sent: Tuesday, July 29, 2014 10:57 AM
To: Open MPI Developers
Subject: Re: [OMPI devel] SHMEM symmetric objects in shared libraries

Are you claiming that in the following test, the static variable "val" will not be seen as a symmetric object?
#include "shmem.h"

int main( int argc, char **argv){
    long my_pe, npes, master;

    my_pe = shmem_my_pe();
    npes = shmem_n_pes();

    master = npes - 1;

   /* only used on master */
   static long val = 0;

   if(my_pe != master ){

  return 0;

On Tue, Jul 29, 2014 at 11:27 AM, Bert Wesarg <bert.wesarg_at_[hidden]<mailto:bert.wesarg_at_[hidden]>> wrote:

On 05/10/2014 02:46 PM, Bert Wesarg wrote:

Btw, I'm pretty confident, that this Open SHMEM implementation does not
recognize global or static variables in shared libraries as symmetric
objects. It is probably wise to note this somewhere to the users.

I've never got an reply to this query. Any comments on it?


Kind regards,
Bert Wesarg

Dipl.-Inf. Bert Wesarg
wiss. Mitarbeiter

Technische Universität Dresden
Zentrum für Informationsdienste und Hochleistungsrechnen (ZIH)
01062 Dresden
Tel.: +49 (351) 463-42451<tel:%2B49%20%28351%29%20463-42451>
Fax: +49 (351) 463-37773<tel:%2B49%20%28351%29%20463-37773>
E-Mail: bert.wesarg_at_[hidden]<mailto:bert.wesarg_at_[hidden]>

devel mailing list
Link to this post: