|
SHMEM (from Symmetric Hierarchical Memory access) - family of parallel programming libraries, initially providing remote memory access for big shared memory supercomputers using one-sided communications.〔 Later it was expanded to distributed memory parallel computer clusters, and is used as parallel programming interface or as low-level interface to build PGAS systems and languages. The first SHMEM library, libsma, was created by Cray in 1993. Later the SHMEM was also implemented by SGI, Quadrics, HP, GSHMEM, IBM, QLogic, Mellanox, Universities of Houston and Florida; there is also opensource OpenSHMEM. Historically, SHMEM, the earliest one-sided library,〔(Tools for Benchmarking, Tracing, and Simulating SHMEM Applications ) // CUG 2012, paper by San Diego Supercomputer center and ORNL〕 made the one-sided parallel programming paradigm popular.〔(Recent Advances in Parallel Virtual Machine and Message Passing ..., Volume 11 ) page 59: "One-sided communication as a programming paradigm was made popular initially by the SHMEM library on the Cray T3D and T3E..."〕 Programs written using SHMEM can be started on several computers, connected together with some high-performance network, supported by used SHMEM library. Every computer run a copy of program (SPMD), each copy is called PE (processing element). PEs can ask library to do remote memory access operations, like reading ("shmem_get" operation) or writing ("shmem_put" operation) data. Peer-to-peer operations are one-sided, it means that no active cooperation from remote thread is needed to complete the action (but it can poll its local memory for changes using "shmem_wait"). Operations can be done on short types like bytes, words, or on longer datatypes like arrays, sometimes even evenly strided or indexed (only some elements of array are send). For short datatypes SHMEM can do atomic operations (CAS, Fetch and add, atomic increment, etc.) even in remote memory. Also there are two different synchronization methods:〔 task control sync (barriers and locks) and functions to enforce memory fencing and ordering. SHMEM has several collective operations, which should be started by all PEs, like reductions, broadcast, collect. Every PEs has some of it memory declared as "Symmetric" segment (or shared memory area) and other memory is private. Only "shared" memory can be accessed in one-sided operation from remote PEs. It is possible to create symmetric objects which has same address on every PE. == Typical SHMEM functions == * start_pes(N) - start N processing elements (PE) * _my_pe() - ask SHMEM to return the PE identifier of current thread * shmem_barrier_all() - wait until all PEs run up to barrier; then enable them to go further * shmem_put(target, source, length, pe) - write data of length "length" to the remote address "target" on PE with id "pe" from local address "source" * shmem_get(target, source, length, pe) - read data of length "length" from the remote address "source" on PE with id "pe" and save to read values into local address "target"〔(man shmem_get ) (SGI TPL)〕 抄文引用元・出典: フリー百科事典『 ウィキペディア(Wikipedia)』 ■ウィキペディアで「SHMEM」の詳細全文を読む スポンサード リンク
|