home *** CD-ROM | disk | FTP | other *** search
/ IRIX Base Documentation 2002 November / SGI IRIX Base Documentation 2002 November.iso / usr / share / catman / p_man / cat3 / intro_shmem.z / intro_shmem
Encoding:
Text File  |  2002-10-03  |  57.8 KB  |  644 lines

  1.  
  2. INTRO_SHMEM(3)                                               INTRO_SHMEM(3)
  3.  
  4.  
  5. NNNNAAAAMMMMEEEE
  6.      iiiinnnnttttrrrroooo____sssshhhhmmmmeeeemmmm - Introduction to logically shared memory access routines
  7.  
  8. DDDDEEEESSSSCCCCRRRRIIIIPPPPTTTTIIIIOOOONNNN
  9.      The logically shared, distributed memory access (SHMEM) routines
  10.      provide low-latency, high-bandwidth communication for use in highly
  11.      parallelized scalable programs.
  12.  
  13.      The SHMEM routines are data passing library routines similar to
  14.      message passing library routines.  They can be used as an alternative
  15.      to message passing routines such as Message Passing Interface (MPI) or
  16.      Parallel Virtual Machine (PVM).  Like the message passing routines,
  17.      the SHMEM routines pass data between cooperating parallel processes.
  18.  
  19.      SHMEM routines can be used in programs that perform computations in
  20.      separate address spaces and that explicitly pass data to and from
  21.      different processes in the program.  These processes are also called
  22.      _p_r_o_c_e_s_s_i_n_g _e_l_e_m_e_n_t_s (PEs).
  23.  
  24.      The SHMEM routines minimize the overhead associated with data passing
  25.      requests, maximize bandwidth, and minimize _d_a_t_a _l_a_t_e_n_c_y.  _D_a_t_a _l_a_t_e_n_c_y
  26.      is the period of time that starts when a PE initiates a transfer of
  27.      data and ends when a PE can use the data.
  28.  
  29.      SHMEM routines support remote data transfer through _p_u_t operations,
  30.      which transfer data to a different PE, and _g_e_t operations, which
  31.      transfer data from a different PE.  Other operations supported are
  32.      work-shared broadcast and reduction, barrier synchronization, and
  33.      atomic memory operations.  An _a_t_o_m_i_c _m_e_m_o_r_y operation is an atomic
  34.      read-and-update operation, such as a fetch-and-increment, on a remote
  35.      or local data object.  The value read is guaranteed to be the value of
  36.      the data object just prior to the update.
  37.  
  38.    SSSSHHHHMMMMEEEEMMMM RRRRoooouuuuttttiiiinnnneeeessss
  39.      The following SHMEM-related routines enhance the portabiliy of SHMEM
  40.      programs across platforms.
  41.  
  42.      * PE queries:
  43.  
  44.           C/C++ only:         ____nnnnuuuummmm____ppppeeeessss(3I), ____mmmmyyyy____ppppeeee(3I)
  45.  
  46.           Fortran only:       NNNNUUUUMMMM____PPPPEEEESSSS(3I), MMMMYYYY____PPPPEEEE(3I)
  47.  
  48.      * Block data put routines:
  49.  
  50.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____ppppuuuutttt33332222, sssshhhhmmmmeeeemmmm____ppppuuuutttt66664444, sssshhhhmmmmeeeemmmm____ppppuuuutttt111122228888
  51.  
  52.           C/C++ only:         sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____ppppuuuutttt, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____ppppuuuutttt,
  53.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____ppppuuuutttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ppppuuuutttt,
  54.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____ppppuuuutttt
  55.  
  56.           Fortran only:       sssshhhhmmmmeeeemmmm____ccccoooommmmpppplllleeeexxxx____ppppuuuutttt, sssshhhhmmmmeeeemmmm____iiiinnnntttteeeeggggeeeerrrr____ppppuuuutttt,
  57.                               sssshhhhmmmmeeeemmmm____llllooooggggiiiiccccaaaallll____ppppuuuutttt, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll____ppppuuuutttt
  58.  
  59.      * Block data get routines:
  60.  
  61.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____ggggeeeetttt33332222, sssshhhhmmmmeeeemmmm____ggggeeeetttt66664444, sssshhhhmmmmeeeemmmm____ggggeeeetttt111122228888
  62.  
  63.           C/C++ only:         sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____ggggeeeetttt, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____ggggeeeetttt,
  64.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____ggggeeeetttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ggggeeeetttt,
  65.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____ggggeeeetttt
  66.  
  67.           Fortran only:       sssshhhhmmmmeeeemmmm____ccccoooommmmpppplllleeeexxxx____ggggeeeetttt, sssshhhhmmmmeeeemmmm____iiiinnnntttteeeeggggeeeerrrr____ggggeeeetttt,
  68.                               sssshhhhmmmmeeeemmmm____llllooooggggiiiiccccaaaallll____ggggeeeetttt, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll____ggggeeeetttt
  69.  
  70.      * Strided put routines:
  71.  
  72.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____iiiippppuuuutttt33332222, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt66664444, sssshhhhmmmmeeeemmmm____iiiippppuuuutttt111122228888
  73.  
  74.           C/C++ only:         sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____iiiippppuuuutttt,
  75.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiippppuuuutttt,
  76.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____iiiippppuuuutttt
  77.  
  78.           Fortran only:       sssshhhhmmmmeeeemmmm____ccccoooommmmpppplllleeeexxxx____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____iiiinnnntttteeeeggggeeeerrrr____iiiippppuuuutttt,
  79.                               sssshhhhmmmmeeeemmmm____llllooooggggiiiiccccaaaallll____iiiippppuuuutttt, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll____iiiippppuuuutttt
  80.  
  81.      * Strided get routines:
  82.  
  83.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____iiiiggggeeeetttt33332222, sssshhhhmmmmeeeemmmm____iiiiggggeeeetttt66664444, sssshhhhmmmmeeeemmmm____iiiiggggeeeetttt111122228888
  84.  
  85.           C/C++ only:         sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____iiiiggggeeeetttt, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____iiiiggggeeeetttt,
  86.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____iiiiggggeeeetttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____iiiiggggeeeetttt,
  87.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____iiiiggggeeeetttt
  88.  
  89.           Fortran only:       sssshhhhmmmmeeeemmmm____ccccoooommmmpppplllleeeexxxx____iiiiggggeeeetttt, sssshhhhmmmmeeeemmmm____iiiinnnntttteeeeggggeeeerrrr____iiiiggggeeeetttt,
  90.                               sssshhhhmmmmeeeemmmm____llllooooggggiiiiccccaaaallll____iiiiggggeeeetttt, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll____iiiiggggeeeetttt
  91.  
  92.      * Point-to-point synchronization routines:
  93.  
  94.           C/C++ only:         sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____iiiinnnntttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll,
  95.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll,
  96.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt,
  97.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll, sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt,
  98.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll
  99.  
  100.           Fortran:            sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll,
  101.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____wwwwaaaaiiiitttt____uuuunnnnttttiiiillll
  102.  
  103.      * Barrier synchronization routines:
  104.  
  105.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll, sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr
  106.  
  107.      * Atomic memory fetch-and-operate (fetch-op) routines:
  108.  
  109.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp
  110.  
  111.      * Reduction routines:
  112.  
  113.           C/C++ only:         sssshhhhmmmmeeeemmmm____iiiinnnntttt____aaaannnndddd____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____aaaannnndddd____ttttoooo____aaaallllllll,
  114.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____aaaannnndddd____ttttoooo____aaaallllllll,
  115.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____aaaannnndddd____ttttoooo____aaaallllllll,
  116.                               sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  117.                               sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____mmmmaaaaxxxx____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  118.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  119.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  120.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  121.                               sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  122.                               *sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  123.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____mmmmiiiinnnn____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  124.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  125.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  126.                               sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____ssssuuuummmm____ttttoooo____aaaallllllll,
  127.                               sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____ssssuuuummmm____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt____ssssuuuummmm____ttttoooo____aaaallllllll,
  128.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ssssuuuummmm____ttttoooo____aaaallllllll,
  129.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ssssuuuummmm____ttttoooo____aaaallllllll,
  130.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____ssssuuuummmm____ttttoooo____aaaallllllll,
  131.                               sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____pppprrrroooodddd____ttttoooo____aaaallllllll,
  132.                               sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____pppprrrroooodddd____ttttoooo____aaaallllllll,
  133.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____pppprrrroooodddd____ttttoooo____aaaallllllll,
  134.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____pppprrrroooodddd____ttttoooo____aaaallllllll,
  135.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____pppprrrroooodddd____ttttoooo____aaaallllllll,
  136.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____pppprrrroooodddd____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt____oooorrrr____ttttoooo____aaaallllllll,
  137.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____oooorrrr____ttttoooo____aaaallllllll,
  138.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____oooorrrr____ttttoooo____aaaallllllll,
  139.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____oooorrrr____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt____xxxxoooorrrr____ttttoooo____aaaallllllll
  140.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____xxxxoooorrrr____ttttoooo____aaaallllllll
  141.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____xxxxoooorrrr____ttttoooo____aaaallllllll
  142.                               sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____xxxxoooorrrr____ttttoooo____aaaallllllll,
  143.  
  144.           Fortran only:       sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____aaaannnndddd____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____aaaannnndddd____ttttoooo____aaaallllllll,
  145.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  146.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  147.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____mmmmaaaaxxxx____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  148.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  149.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  150.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____mmmmiiiinnnn____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  151.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____ssssuuuummmm____ttttoooo____aaaallllllll,
  152.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____ssssuuuummmm____ttttoooo____aaaallllllll,
  153.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____ssssuuuummmm____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____ssssuuuummmm____ttttoooo____aaaallllllll,
  154.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____pppprrrroooodddd____ttttoooo____aaaallllllll,
  155.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____pppprrrroooodddd____ttttoooo____aaaallllllll,
  156.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____pppprrrroooodddd____ttttoooo____aaaallllllll,
  157.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____pppprrrroooodddd____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____oooorrrr____ttttoooo____aaaallllllll,
  158.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____oooorrrr____ttttoooo____aaaallllllll, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____xxxxoooorrrr____ttttoooo____aaaallllllll,
  159.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____xxxxoooorrrr____ttttoooo____aaaallllllll
  160.  
  161.      * Broadcast routines:
  162.  
  163.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____bbbbrrrrooooaaaaddddccccaaaasssstttt33332222, sssshhhhmmmmeeeemmmm____bbbbrrrrooooaaaaddddccccaaaasssstttt66664444
  164.  
  165.      * Generalized barrier synchronization routine:
  166.  
  167.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr
  168.  
  169.      * Cache management routines:
  170.  
  171.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh, sssshhhhmmmmeeeemmmm____uuuuddddccccfffflllluuuusssshhhh____lllliiiinnnneeee
  172.  
  173.      * Byte-granularity block put routines:
  174.  
  175.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____ppppuuuuttttmmmmeeeemmmm and sssshhhhmmmmeeeemmmm____ggggeeeettttmmmmeeeemmmm
  176.  
  177.           Fortran only:       sssshhhhmmmmeeeemmmm____cccchhhhaaaarrrraaaacccctttteeeerrrr____ppppuuuutttt and sssshhhhmmmmeeeemmmm____cccchhhhaaaarrrraaaacccctttteeeerrrr____ggggeeeetttt
  178.  
  179.      * Collect routines:
  180.  
  181.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____ccccoooolllllllleeeecccctttt33332222, sssshhhhmmmmeeeemmmm____ccccoooolllllllleeeecccctttt66664444,
  182.                               sssshhhhmmmmeeeemmmm____ffffccccoooolllllllleeeecccctttt33332222, sssshhhhmmmmeeeemmmm____ffffccccoooolllllllleeeecccctttt66664444
  183.  
  184.      * Atomic memory fetch-and-operate (fetch-op) routines:
  185.  
  186.           C/C++ only:         sssshhhhmmmmeeeemmmm____ddddoooouuuubbbblllleeee____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____sssswwwwaaaapppp,
  187.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____ccccsssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt____ffffaaaadddddddd,
  188.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____iiiinnnntttt____sssswwwwaaaapppp,
  189.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ccccsssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ffffaaaadddddddd,
  190.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggg____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____lllloooonnnngggg____sssswwwwaaaapppp,
  191.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ccccsssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ffffaaaadddddddd,
  192.                               sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____lllloooonnnngggglllloooonnnngggg____sssswwwwaaaapppp
  193.  
  194.           FFFFoooorrrrttttrrrraaaannnn oooonnnnllllyyyy::::       sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____ccccsssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____ffffaaaadddddddd,
  195.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____ffffiiiinnnncccc, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____sssswwwwaaaapppp,
  196.                               sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll4444____sssswwwwaaaapppp,
  197.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll8888____sssswwwwaaaapppp, sssshhhhmmmmeeeemmmm____iiiinnnntttt8888____ccccsssswwwwaaaapppp
  198.  
  199.      * Atomic memory operation routines:
  200.  
  201.           Fortran only:       sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____aaaadddddddd, sssshhhhmmmmeeeemmmm____iiiinnnntttt4444____iiiinnnncccc
  202.  
  203.      * Remote memory pointer function:
  204.  
  205.           C/C++ and Fortran:  sssshhhhmmmmeeeemmmm____ppppttttrrrr
  206.  
  207.      * Reduction routines:
  208.  
  209.           C/C++ only:         sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  210.                               sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  211.                               sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____pppprrrroooodddd____ttttoooo____aaaallllllll,
  212.                               sssshhhhmmmmeeeemmmm____lllloooonnnnggggddddoooouuuubbbblllleeee____ssssuuuummmm____ttttoooo____aaaallllllll
  213.  
  214.           Fortran only:       sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll11116666____mmmmaaaaxxxx____ttttoooo____aaaallllllll,
  215.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll11116666____mmmmiiiinnnn____ttttoooo____aaaallllllll,
  216.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll11116666____pppprrrroooodddd____ttttoooo____aaaallllllll,
  217.                               sssshhhhmmmmeeeemmmm____rrrreeeeaaaallll11116666____ssssuuuummmm____ttttoooo____aaaallllllll
  218.  
  219.    RRRReeeemmmmooootttteeeellllyyyy AAAAcccccccceeeessssssssiiiibbbblllleeee DDDDaaaattttaaaa OOOObbbbjjjjeeeeccccttttssss
  220.      Typically, target or source arrays that reside on remote processing
  221.      elements (PEs) are identified by passing the address of the
  222.      corresponding data object on the local PE.  The local existence of a
  223.      corresponding data object implies that a data object is _s_y_m_m_e_t_r_i_c as
  224.      described on this man page.
  225.  
  226.      Symmetric data objects passed to SHMEM routines can be arrays or
  227.      scalars.  A _s_y_m_m_e_t_r_i_c data object is one for which the local and
  228.      remote addresses have a known relationship.  You can use SHMEM
  229.      routines to access remote symmetric data objects by using the address
  230.      of the corresponding data object on the local PE.
  231.  
  232.      The following data objects are symmetric:
  233.  
  234.      * Fortran data objects in common blocks or with the SSSSAAAAVVVVEEEE attribute.
  235.        These data objects must not be defined in a dynamic shared object
  236.        (DSO).
  237.  
  238.      * Non-stack C and C++ variables.  These data objects must not be
  239.        defined in a DSO.
  240.  
  241.      * Fortran arrays allocated with sssshhhhppppaaaalllllllloooocccc(3F)
  242.  
  243.      * C and C++ data allocated by sssshhhhmmmmaaaalllllllloooocccc(3C)
  244.  
  245.      SHMEM collective routines that operate on the same data object on
  246.      multiple PEs require that symmetric data objects be passed.  This
  247.      restriction is for algorithm simplicity and efficiency.  These
  248.      routines define the set of target PEs by the following triplet of
  249.      arguments:  _P_E__s_t_a_r_t, _l_o_g_P_E__s_t_r_i_d_e, and _P_E__s_i_z_e.
  250.  
  251.    CCCCoooolllllllleeeeccccttttiiiivvvveeee RRRRoooouuuuttttiiiinnnneeeessss
  252.      Some SHMEM routines, for example, sssshhhhmmmmeeeemmmm____bbbbrrrrooooaaaaddddccccaaaasssstttt(3) and
  253.      sssshhhhmmmmeeeemmmm____ffffllllooooaaaatttt____ssssuuuummmm____ttttoooo____aaaallllllll(3), are classified as _c_o_l_l_e_c_t_i_v_e routines
  254.      because they distribute work across a set of PEs.  They must be called
  255.      concurrently by all PEs in the active set defined by the _P_E__s_t_a_r_t,
  256.      _l_o_g_P_E__s_t_r_i_d_e, _P_E__s_i_z_e argument triplet.  The following man pages
  257.      describe the SHMEM collective routines:
  258.  
  259.      * sssshhhhmmmmeeeemmmm____aaaannnndddd(3)
  260.  
  261.      * sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(3)
  262.  
  263.      * sssshhhhmmmmeeeemmmm____bbbbrrrrooooaaaaddddccccaaaasssstttt(3)
  264.  
  265.      * sssshhhhmmmmeeeemmmm____ccccoooolllllllleeeecccctttt(3)
  266.  
  267.      * sssshhhhmmmmeeeemmmm____mmmmaaaaxxxx(3)
  268.  
  269.      * sssshhhhmmmmeeeemmmm____mmmmiiiinnnn(3)
  270.  
  271.      * sssshhhhmmmmeeeemmmm____oooorrrr(3)
  272.  
  273.      * sssshhhhmmmmeeeemmmm____pppprrrroooodddd(3)
  274.  
  275.      * sssshhhhmmmmeeeemmmm____ssssuuuummmm(3)
  276.  
  277.      * sssshhhhmmmmeeeemmmm____xxxxoooorrrr(3)
  278.  
  279.    UUUUssssiiiinnnngggg tttthhhheeee SSSSyyyymmmmmmmmeeeettttrrrriiiicccc WWWWoooorrrrkkkk AAAArrrrrrrraaaayyyy,,,, ppppSSSSyyyynnnncccc
  280.      Multiple _p_S_y_n_c arrays are often needed if a particular PE calls a
  281.      SHMEM collective routine twice without intervening barrier
  282.      synchronization.  Problems would occur if some PEs in the active set
  283.      for call 2 arrive at call 2 before processing of call 1 is complete by
  284.      all PEs in the call 1 active set.  You can use sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(((()))) or
  285.      sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll(3) to perform a barrier synchronization between
  286.      consecutive calls to SHMEM collective routines.
  287.  
  288.      There are two special cases:
  289.  
  290.      * The sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(3) routine allows the same _p_S_y_n_c array to be used
  291.        on consecutive calls as long as the active PE set does not change.
  292.  
  293.      * If the same collective routine is called multiple times with the
  294.        same active set, the calls may alternate between two _p_S_y_n_c arrays.
  295.        The SHMEM routines guarantee that a first call is completely
  296.        finished by all PEs by the time processing of a third call begins on
  297.        any PE.
  298.  
  299.      Because the SHMEM routines restore _p_S_y_n_c to its original contents,
  300.      multiple calls that use the same _p_S_y_n_c array do not require that _p_S_y_n_c
  301.      be reinitialized after the first call.
  302.  
  303.    SSSSHHHHMMMMEEEEMMMM FFFFuuuunnnnccccttttiiiioooonnnn IIIInnnnlllliiiinnnniiiinnnngggg
  304.      Some SHMEM functions that can be called from C/C++ are defined in the
  305.      form of macros in the mmmmpppppppp////sssshhhhmmmmeeeemmmm....hhhh header file.  These functions are
  306.      inlined by default on some platforms.  To deactivate the automatic
  307.      inlining of SHMEM functions from C/C++, add the following option to
  308.      your C/C++ command line:  ----DDDD____SSSSHHHHMMMMEEEEMMMM____MMMMAAAACCCCRRRROOOO____OOOOPPPPTTTT====0000.
  309.  
  310.    SSSSHHHHMMMMEEEEMMMM AAAApppppppplllliiiiccccaaaattttiiiioooonnnn PPPPllllaaaacccceeeemmmmeeeennnntttt oooonnnn NNNNUUUUMMMMAAAA SSSSyyyysssstttteeeemmmmssss
  311.      On non-uniform memory access (NUMA) systems, such as Origin series
  312.      systems, SHMEM start-up processing ensures that the process associated
  313.      with a SHMEM PE executes on a processor near the memory associated
  314.      with a SHMEM PE.
  315.  
  316.      The following environment variables allow you to control the placement
  317.      of the SHMEM application on the system:
  318.  
  319.      VVVVaaaarrrriiiiaaaabbbblllleeee            DDDDeeeessssccccrrrriiiippppttttiiiioooonnnn
  320.  
  321.      PPPPAAAAGGGGEEEESSSSIIIIZZZZEEEE____DDDDAAAATTTTAAAA       Specifies the desired page size in kilobytes for
  322.                          program data areas.  Specify an integer value.  On
  323.                          Origin series systems, supported values include
  324.                          16, 64, 256, 1024, and 4096.
  325.  
  326.      SSSSMMMMAAAA____BBBBAAAARRRR____CCCCOOOOUUUUNNNNTTTTEEEERRRR     Specifies the use of a simple counter barrier
  327.                          algorithm.  By default, this variable is not
  328.                          enabled for jobs with PE counts of 64 or more.
  329.  
  330.      SSSSMMMMAAAA____BBBBAAAARRRR____DDDDIIIISSSSSSSSEEEEMMMM      Specifies the use of the alternate barrier
  331.                          algorithm, the dissemination/butterfly, within the
  332.                          sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll(3) function. This alternate
  333.                          algorithm provides better performance on jobs with
  334.                          larger PE counts.  The SSSSMMMMAAAA____BBBBAAAARRRR____DDDDIIIISSSSSSSSEEEEMMMM option is
  335.                          enabled for jobs with PE counts of 64 or higher.
  336.                          By default, this variable is not enabled for jobs
  337.                          with PE counts below 64.
  338.  
  339.      SSSSMMMMAAAA____DDDDBBBBXXXX             Specifies the PE number to be debugged.  If you
  340.                          set SSSSMMMMAAAA____DDDDBBBBXXXX to _n, PE _n prints a message during
  341.                          program startup, describing how to attach to it
  342.                          with the DBX debugger.  PE _n sleeps for seven
  343.                          seconds.  If you set SSSSMMMMAAAA____DDDDBBBBXXXX to _n,_s, PE _n will
  344.                          sleep for _s seconds.
  345.  
  346.      SSSSMMMMAAAA____DDDDPPPPLLLLAAAACCCCEEEE____IIIINNNNTTTTEEEERRRROOOOPPPP____OOOOFFFFFFFF
  347.                          Disables a SHMEM/dplace interoperability feature
  348.                          available beginning with IRIX 6.5.13.  By setting
  349.                          this variable, you can obtain the behavior of
  350.                          SHMEM with dplace on older releases of IRIX.  By
  351.                          default, this variable is not enabled.
  352.  
  353.      SSSSMMMMAAAA____DDDDSSSSMMMM____CCCCPPPPUUUULLLLIIIISSSSTTTT     Specifies a list of CPUs on which to run a SHMEM
  354.                          application. To ensure that processes are linked
  355.                          to CPUs, this variable should be used in
  356.                          conjunction with SSSSMMMMAAAA____DDDDSSSSMMMM____MMMMUUUUSSSSTTTTRRRRUUUUNNNN.
  357.  
  358.                          For an explanation of the syntax for this
  359.                          environment variable, see the section entitled
  360.                          "Using a CPU List."
  361.  
  362.      SSSSMMMMAAAA____DDDDSSSSMMMM____MMMMUUUUSSSSTTTTRRRRUUUUNNNN     Enforces memory locality for SHMEM processes.  Use
  363.                          of this feature ensures that each SHMEM process
  364.                          will get a CPU and physical memory on the node to
  365.                          which it was originally assigned.  This variable
  366.                          has been observed to improve program performance
  367.                          on IRIX systems running release 6.5.7 and earlier,
  368.                          when running a program on a quiet system.  With
  369.                          later IRIX releases, under certain circumstances,
  370.                          setting this variable is not necessary.
  371.                          Internally, this feature directs the library to
  372.                          use the pppprrrroooocccceeeessssssss____ccccppppuuuulllliiiinnnnkkkk(3) function instead of
  373.                          pppprrrroooocccceeeessssssss____mmmmllllddddlllliiiinnnnkkkk(3) to control memory placement.
  374.  
  375.                          SSSSMMMMAAAA____DDDDSSSSMMMM____MMMMUUUUSSSSTTTTRRRRUUUUNNNN should not be used when the job is
  376.                          submitted to miser (see mmmmiiiisssseeeerrrr____ssssuuuubbbbmmmmiiiitttt(1)) because
  377.                          program hangs may result. By default, this
  378.                          variable is not enabled.
  379.  
  380.                          The pppprrrroooocccceeeessssssss____ccccppppuuuulllliiiinnnnkkkk(3) function is inherited
  381.                          across process ffffoooorrrrkkkk(2) or sssspppprrrroooocccc(2). For this
  382.                          reason, when using mixed SHMEM/OpenMP
  383.                          applications, it is recommended either that this
  384.                          variable not be set, or that ____DDDDSSSSMMMM____MMMMUUUUSSSSTTTTRRRRUUUUNNNN also be
  385.                          set (see pppp____eeeennnnvvvviiiirrrroooonnnn(5)).
  386.  
  387.      SSSSMMMMAAAA____DDDDSSSSMMMM____OOOOFFFFFFFF         When set to any value, deactivates
  388.                          processor-memory affinity control.  When set,
  389.                          SHMEM processes run on any available processor,
  390.                          whether or not it is near the memory associated
  391.                          with that process.
  392.  
  393.      SSSSMMMMAAAA____DDDDSSSSMMMM____PPPPPPPPMMMM         When set to an integer value, specifies the number
  394.                          of processors to be mapped to every memory.  The
  395.                          default is 2 on Origin 2000 systems. The default
  396.                          is 4 on Origin 3000 systems.
  397.  
  398.      SSSSMMMMAAAA____DDDDSSSSMMMM____TTTTOOOOPPPPOOOOLLLLOOOOGGGGYYYY    Specifies the shape of the set of hardware nodes
  399.                          on which the PE memories are allocated.  Set this
  400.                          variable to one of the following values:
  401.  
  402.                          VVVVaaaalllluuuueeee          AAAAccccttttiiiioooonnnn
  403.  
  404.                          ccccuuuubbbbeeee           A group of memory nodes that form a
  405.                                         perfect hypercube. NNNNPPPPEEEESSSS////SSSSMMMMAAAA____DDDDSSSSMMMM____PPPPPPPPMMMM
  406.                                         must be a power of 2.  If a perfect
  407.                                         hypercube is unavailable, a less
  408.                                         restrictive placement will be used.
  409.  
  410.                          ccccuuuubbbbeeee____ffffiiiixxxxeeeedddd     A group of memory nodes that form a
  411.                                         perfect hypercube.
  412.                                         NNNNPPPPEEEESSSS////SSSSMMMMAAAA____DDDDSSSSMMMM____PPPPPPPPMMMM must be a power of
  413.                                         2.  If a perfect hypercube is
  414.                                         unavailable, the placement will
  415.                                         fail, disabling NUMA placement.
  416.  
  417.                          ccccppppuuuucccclllluuuusssstttteeeerrrr     Any group of memory nodes.  The
  418.                                         operating system attempts to place
  419.                                         the group numbers close to one
  420.                                         another, taking into account nodes
  421.                                         with disabled processors.  (Default
  422.                                         for IRIX 6.5.11 and higher).
  423.  
  424.                          ffffrrrreeeeeeee           Any group of memory nodes.  The
  425.                                         operating system attempts to place
  426.                                         the group numbers close to one
  427.                                         another.  (Default for IRIX 6.5.10
  428.                                         and earlier releases).
  429.  
  430.      SSSSMMMMAAAA____DDDDSSSSMMMM____VVVVEEEERRRRBBBBOOOOSSSSEEEE     When set to any value, writes information about
  431.                          process and memory placement to stderr.
  432.  
  433.      SSSSMMMMAAAA____IIIINNNNFFFFOOOO            Prints information about environment variables
  434.                          that can control lllliiiibbbbssssmmmmaaaa execution.
  435.  
  436.      SSSSMMMMAAAA____SSSSYYYYMMMMMMMMEEEETTTTRRRRIIIICCCC____SSSSIIIIZZZZEEEE  Specifies the size, in bytes, of symmetric memory.
  437.                          This is the size of static space plus per-PE
  438.                          symmetric heap size.
  439.  
  440.      SSSSMMMMAAAA____VVVVEEEERRRRSSSSIIIIOOOONNNN         Prints the lllliiiibbbbssssmmmmaaaa library release version.
  441.  
  442.    UUUUssssiiiinnnngggg aaaa CCCCPPPPUUUU LLLLiiiisssstttt
  443.      You can manually select CPUs to use for a SHMEM application by setting
  444.      the SSSSMMMMAAAA____DDDDSSSSMMMM____CCCCPPPPUUUULLLLIIIISSSSTTTT shell variable.  This is treated as a comma and/or
  445.      hyphen delineated ordered list, specifying a mapping of SHMEM
  446.      processes to CPUs.  The shepherd process is not included in this list.
  447.  
  448.      Examples:
  449.  
  450.                VVVVaaaalllluuuueeee          CCCCPPPPUUUU AAAAssssssssiiiiggggnnnnmmmmeeeennnntttt
  451.  
  452.                8888,,,,11116666,,,,33332222        Place three SHMEM processes on CPUs 8, 16,
  453.                               and 32.
  454.  
  455.                33332222,,,,11116666,,,,8888        Place the SHMEM process rank zero on CPU 32,
  456.                               one on 16, and two on CPU 8.
  457.  
  458.                8888----11115555,,,,33332222----33339999     Place the SHMEM processes 0 through 7 on CPUs
  459.                               8 to 15.  Place the SHMEM processes 8 through
  460.                               15 on CPUs 32 to 39.
  461.  
  462.                33339999----33332222,,,,8888----11115555     Place the SHMEM processes 0 through 7 on CPUs
  463.                               39 to 32.  Place the SHMEM processes 8
  464.                               through 15 on CPUs 8 to 15.
  465.  
  466.      Note that the process rank is the value returned by ____mmmmyyyy____ppppeeee(3I).  CPUs
  467.      are associated with the ccccppppuuuunnnnuuuummmm values given in the hardware
  468.      graph(hhhhwwwwggggrrrraaaapppphhhh(4)).
  469.  
  470.      The number of processors specified must equal the number of SHMEM
  471.      processes (excluding the shepherd process) that will be used.  If an
  472.      error occurs in processing the CPU list, the default placement policy
  473.      is used.
  474.  
  475.    UUUUssssiiiinnnngggg ddddppppllllaaaacccceeee((((1111))))
  476.      The environment variables described previously allow you to map SHMEM
  477.      processes and memories with hardware processors and nodes.  The
  478.      ddddppppllllaaaacccceeee(1) command, which is available on Origin series systems, can
  479.      give you additional control over application placement.
  480.  
  481.      Perform the following steps to use the ddddppppllllaaaacccceeee(1) command with SHMEM
  482.      programs:
  483.  
  484.      * Create file ppppllllaaaacccceeeeffffiiiilllleeee with these contents:
  485.  
  486.           threads $NPES + 1
  487.           memories ($NPES +1)/2 in topology cube
  488.           distribute threads 1:$NPES across memories
  489.  
  490.      * Execute your program with NNNNPPPPEEEESSSS set to the number of PEs.  For
  491.        example, to run with 4 PEs, invoke your program this way:
  492.  
  493.           env NPES=4 dplace -place placefile a.out
  494.  
  495.    IIIInnnntttteeeerrrrooooppppeeeerrrraaaabbbbiiiilllliiiittttyyyy
  496.      SHMEM routines can be used in conjunction with MPI message passing
  497.      routines in the same application.  Programs that use both MPI and
  498.      SHMEM should call MMMMPPPPIIII____IIIInnnniiiitttt and MMMMPPPPIIII____FFFFiiiinnnnaaaalllliiiizzzzeeee but omit the call to the
  499.      ssssttttaaaarrrrtttt____ppppeeeessss routine.  SHMEM PE numbers are equal to the MPI rank within
  500.      the MMMMPPPPIIII____CCCCOOOOMMMMMMMM____WWWWOOOORRRRLLLLDDDD environment variable.
  501.  
  502.      On IRIX clustered systems, you can use SHMEM to comunicate only with
  503.      processes running on the same host.  Use the sssshhhhmmmmeeeemmmm____ppppeeee____aaaacccccccceeeessssssssiiiibbbblllleeee
  504.      function to determine if a remote PE is accessible via SHMEM
  505.      communication from the local PE.
  506.  
  507.    CCCCoooommmmppppiiiilllliiiinnnngggg SSSSHHHHMMMMEEEEMMMM PPPPrrrrooooggggrrrraaaammmmssss
  508.      The SHMEM routines reside in lllliiiibbbbssssmmmmaaaa....ssssoooo.
  509.  
  510.      The following sample command lines compile programs that include SHMEM
  511.      routines:
  512.  
  513.      * IRIX systems:
  514.           cccccccc ----66664444 cccc____pppprrrrooooggggrrrraaaammmm....cccc ----llllssssmmmmaaaa
  515.           CCCCCCCC ----66664444 ccccpppplllluuuusssspppplllluuuussss____pppprrrrooooggggrrrraaaammmm....cccc ----llllssssmmmmaaaa
  516.           ffff99990000 ----66664444 ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn ffffoooorrrrttttrrrraaaannnn____pppprrrrooooggggrrrraaaammmm....ffff ----llllssssmmmmaaaa
  517.           ffff77777777 ----66664444 ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn ffffoooorrrrttttrrrraaaannnn____pppprrrrooooggggrrrraaaammmm....ffff ----llllssssmmmmaaaa
  518.  
  519.      * IRIX systems with Fortran 90 version 7.2.1 available:
  520.           ffff99990000 ----66664444 ----LLLLAAAANNNNGGGG::::rrrreeeeccccuuuurrrrssssiiiivvvveeee====oooonnnn ----aaaauuuuttttoooo____uuuusssseeee sssshhhhmmmmeeeemmmm____iiiinnnntttteeeerrrrffffaaaacccceeee
  521.           ffffoooorrrrttttrrrraaaannnn____pppprrrrooooggggrrrraaaammmm....ffff ----llllssssmmmmaaaa
  522.  
  523.      The sssshhhhmmmmeeeemmmm____iiiinnnntttteeeerrrrffffaaaacccceeee module is intended for use only with the ----aaaauuuuttttoooo____uuuusssseeee
  524.      option.  This module provides compile-time checking of interfaces.
  525.      The kkkkeeeeyyyywwwwoooorrrrdddd====aaaarrrrgggg actual argument format is not supported for SHMEM
  526.      subroutines defined in the sssshhhhmmmmeeeemmmm____iiiinnnntttteeeerrrrffffaaaacccceeee procedure interface module.
  527.  
  528.      The IRIX N32 ABI, selected by the ----nnnn33332222 compiler option, is also
  529.      supported by SHMEM, but is recommended only for small process counts
  530.      and program memory sizes, due to the limitation in the size of virtual
  531.      addresses imposed by the N32 ABI.  The use of the N64 ABI, selected by
  532.      the ----66664444 compiler option, is recommended for most SHMEM programs.
  533.  
  534.    PPPPrrrrooooggggrrrraaaammmm SSSSttttaaaarrrrtttt----uuuupppp
  535.      The SHMEM implementation uses mapped files to render static memory
  536.      remotely accessible on IRIX systems.  The result is that enough file
  537.      space must be available in ////vvvvaaaarrrr////ttttmmmmpppp to accommodate a file of size
  538.      _n_p_e_s **** _s_t_a_t_i_c_s_z, where _n_p_e_s is the number of PEs and _s_t_a_t_i_c_s_z is the
  539.      size of the program's static data area.  Static data includes Fortran
  540.      common blocks and C/C++ static data.
  541.  
  542.      If a SHMEM program's memory requirements exceed available file space
  543.      in ////vvvvaaaarrrr////ttttmmmmpppp, a SHMEM run-time error message is generated.  You can use
  544.      the TTTTMMMMPPPPDDDDIIIIRRRR environment variable to select a directory in a file system
  545.      with sufficient file space.
  546.  
  547.      To minimize SHMEM program start-up time, use symmetric memory
  548.      allocated by the SSSSHHHHPPPPAAAALLLLLLLLOOOOCCCC(3F) or sssshhhhmmmmaaaalllllllloooocccc(3C) routines instead of
  549.      static memory.  Memory allocated by these routines does not require a
  550.      corresponding file space allocation in ////vvvvaaaarrrr////ttttmmmmpppp.  This avoids problems
  551.      when file space is low and executes more quickly when start-up
  552.      processing needs to handle large static memory areas.
  553.  
  554. NNNNOOOOTTTTEEEESSSS
  555.      The SHMEM software is packaged with the Message Passing Toolkit.
  556.  
  557. EEEENNNNVVVVIIIIRRRROOOONNNNMMMMEEEENNNNTTTT VVVVAAAARRRRIIIIAAAABBBBLLLLEEEESSSS
  558.      For information on environment variables that affect SHMEM routines,
  559.      see the "SHMEM Application Placement on NUMA Systems" section of this
  560.      man page.
  561.  
  562. EEEEXXXXAAAAMMMMPPPPLLLLEEEESSSS
  563.      Example 1.  The following Fortran SHMEM program runs on IRIX systems:
  564.  
  565.           PROGRAM REDUCTION
  566.           REAL VALUES, SUM
  567.           COMMON /C/ VALUES
  568.           REAL WORK
  569.           CALL START_PES(0)
  570.           VALUES = MY_PE()
  571.           CALL SHMEM_BARRIER_ALL       ! Synchronize all PEs
  572.           SUM = 0.0
  573.           DO I = 0,NUM_PES()-1
  574.              CALL SHMEM_REAL_GET(WORK, VALUES, 1, I)   ! Get next value
  575.              SUM = SUM + WORK                          ! Sum it
  576.           ENDDO
  577.           PRINT*,'PE ',MY_PE(),' COMPUTED       SUM=',SUM
  578.           CALL SHMEM_BARRIER_ALL
  579.           END
  580.  
  581.      Since ssssttttaaaarrrrtttt____ppppeeeessss(3) is called with a value of 0, the number of PEs used
  582.      to run the program is specified by the NNNNPPPPEEEESSSS environment variable.
  583.  
  584.      This Fortran program directs all PEs to sum simultaneously the numbers
  585.      in the VVVVAAAALLLLUUUUEEEESSSS variable across all PEs.  By executing the program using
  586.      the following command line, you can you can run the program with 4
  587.      PEs:
  588.  
  589.           env NPES=4 a.out
  590.  
  591.      Example 2.  The following C SHMEM program runs on IRIX systems:
  592.  
  593.           #include <mpp/shmem.h>
  594.           main()
  595.           {
  596.              long source[10] = { 1, 2, 3, 4, 5,
  597.                                  6, 7, 8, 9, 10 };
  598.           static long target[10];
  599.           start_pes(0);
  600.           if (_my_pe() == 0) {
  601.              /* put 10 words into target on PE 1 */
  602.              shmem_long_put(target, source, 10, 1);
  603.           }
  604.           shmem_barrier_all();  /* sync sender and receiver */
  605.           if (_my_pe() == 1)
  606.              shmem_udcflush();         /* needed on T90  */
  607.              printf("target[0] on PE %d is %d\n", _my_pe(), target[0]);
  608.           }
  609.  
  610.      In this C program, PE 0 sends 10 integers to the target array on PE 1.
  611.      By executing the program using the following command line, you can you
  612.      can run the program with 2 PEs:
  613.  
  614.           env NPES=2 a.out
  615.  
  616. SSSSEEEEEEEE AAAALLLLSSSSOOOO
  617.      ddddppppllllaaaacccceeee(1)
  618.  
  619.      The following man pages also contain information on SHMEM routines.
  620.      See the specific man pages for implementation information.
  621.  
  622.      CCCCCCCC(1), cccclllldddd(1), ffff99990000(1), ffff99990000(1M), mmmmpppppppprrrruuuunnnn(1)
  623.  
  624.      sssshhhhmmmmeeeemmmm____aaaadddddddd(3), sssshhhhmmmmeeeemmmm____aaaannnndddd(3), sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr(3), sssshhhhmmmmeeeemmmm____bbbbaaaarrrrrrrriiiieeeerrrr____aaaallllllll(3),
  625.      sssshhhhmmmmeeeemmmm____bbbbrrrrooooaaaaddddccccaaaasssstttt(3), sssshhhhmmmmeeeemmmm____ccccaaaacccchhhheeee(3), sssshhhhmmmmeeeemmmm____ccccoooolllllllleeeecccctttt(3), sssshhhhmmmmeeeemmmm____ccccsssswwwwaaaapppp(3),
  626.      sssshhhhmmmmeeeemmmm____eeeevvvveeeennnntttt(3), sssshhhhmmmmeeeemmmm____ffffaaaadddddddd(3), sssshhhhmmmmeeeemmmm____ffffeeeennnncccceeee(3), sssshhhhmmmmeeeemmmm____ffffiiiinnnncccc(3),
  627.      sssshhhhmmmmeeeemmmm____ggggeeeetttt(3), sssshhhhmmmmeeeemmmm____iiiiggggeeeetttt(3), sssshhhhmmmmeeeemmmm____iiiinnnncccc(3), sssshhhhmmmmeeeemmmm____iiiippppuuuutttt(3),
  628.      sssshhhhmmmmeeeemmmm____iiiixxxxppppuuuutttt(3), sssshhhhmmmmeeeemmmm____lllloooocccckkkk(3), sssshhhhmmmmeeeemmmm____mmmmaaaaxxxx(3), sssshhhhmmmmeeeemmmm____mmmmiiiinnnn(3),
  629.      sssshhhhmmmmeeeemmmm____mmmmsssswwwwaaaapppp(3), sssshhhhmmmmeeeemmmm____mmmmyyyy____ppppeeee(3), sssshhhhmmmmeeeemmmm____oooorrrr(3), sssshhhhmmmmeeeemmmm____pppprrrroooodddd(3),
  630.      sssshhhhmmmmeeeemmmm____ppppuuuutttt(3), sssshhhhmmmmeeeemmmm____qqqquuuuiiiieeeetttt(3), sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____gggg(3) sssshhhhmmmmeeeemmmm____sssshhhhoooorrrrtttt____pppp(3),
  631.      sssshhhhmmmmeeeemmmm____ssssttttaaaacccckkkk(3), sssshhhhmmmmeeeemmmm____ssssuuuummmm(3), sssshhhhmmmmeeeemmmm____sssswwwwaaaapppp(3), sssshhhhmmmmeeeemmmm____wwwwaaaaiiiitttt(3),
  632.      sssshhhhmmmmeeeemmmm____xxxxoooorrrr(3), ssssttttaaaarrrrtttt____ppppeeeessss(3)
  633.  
  634.      sssshhhhmmmmaaaalllllllloooocccc(3C)
  635.  
  636.      sssshhhhppppaaaalllllllloooocccc(3F)
  637.  
  638.      MMMMYYYY____PPPPEEEE(3I), NNNNUUUUMMMM____PPPPEEEESSSS(3I)
  639.  
  640.      For information on using SHMEM routines with message passing routines,
  641.      see the _M_e_s_s_a_g_e _P_a_s_s_i_n_g _T_o_o_l_k_i_t: _P_V_M _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l, or the
  642.      _M_e_s_s_a_g_e _P_a_s_s_i_n_g _T_o_o_l_k_i_t: _M_P_I _P_r_o_g_r_a_m_m_e_r'_s _M_a_n_u_a_l.
  643.  
  644.