Intel® Moderncode for Parallel Architectures
Support for developing parallel programming applications on Intel® Architecture.

Cluster OpenMP memory model

doronc
Beginner
1,292 Views

Hi,

As far as I understand Cluster-OpenMP memory model, any variable needs to be accessed by more than one process should be declared as sharable, which means that the variable will be cloned and allocated on all nodes.

Is there a way in Cluster-OpenMP to access data which was declared on node-A from node-B without occupying memory space on both node-A and node-B?

I am working on a very large chunks of data on each node and I cannot afford cloning them.

Please advice,

Thank you,

Doron Cargili

0 Kudos
3 Replies
TimP
Honored Contributor III
1,292 Views
Quoting - doronc

As far as I understand Cluster-OpenMP memory model, any variable needs to be accessed by more than one process should be declared as sharable, which means that the variable will be cloned and allocated on all nodes.

Is there a way in Cluster-OpenMP to access data which was declared on node-A from node-B without occupying memory space on both node-A and node-B?

I am working on a very large chunks of data on each node and I cannot afford cloning them.

If you have some kind of shared memory support, use OpenMP.
0 Kudos
doronc
Beginner
1,292 Views
Quoting - tim18
Quoting - doronc

As far as I understand Cluster-OpenMP memory model, any variable needs to be accessed by more than one process should be declared as sharable, which means that the variable will be cloned and allocated on all nodes.

Is there a way in Cluster-OpenMP to access data which was declared on node-A from node-B without occupying memory space on both node-A and node-B?

I am working on a very large chunks of data on each node and I cannot afford cloning them.

If you have some kind of shared memory support, use OpenMP.

Thanks,
But I would like to use more cores than one node offers. therefore I can't use OpenMP but some kind of cross node application.
since the code was written using OpenMP, I was thinking of using Cluster-OpenMP if it will be possible not to clone the entire shared data on each node.
0 Kudos
Tom_Spyrou
Beginner
1,292 Views
This feature using mprotect uses the same low level unix mechanism as the copy on write forks do.
In that implementation (for single machine forks) the data that is shared between the parent and child is not cloned, only the page tables are cloned. It could be possible for this mechanism to be used across machines where pointers are kept to memory on another machine and where it is dynamically loaded.

I don't know if its done this way but I can see how it could be done.

In my experience socket programming is easy enough that if you know up front what data belongs where that it is better to just send the data over a socket. You might even be able to write a wrapper script to your app to divide it up and launch workers on other machines to collect the data. Believe it or not TCL is a pretty good language for this type of work and the socket implementation is robust and easy to use.

http://www.tcl.tk/about/netserver.htmlis a good example.

If all the worker machines have a common nfs mount point using the old tried and true mmap and madvise to share the memory might work better than something new.

Tom
0 Kudos
Reply