This source file includes following definitions.
- shmem_sync
- shmem_sync_all
   1 
   2 
   3 
   4 
   5 
   6 
   7 
   8 
   9 
  10 #include "oshmem_config.h"
  11 
  12 #include "oshmem/constants.h"
  13 #include "oshmem/include/shmem.h"
  14 
  15 #include "oshmem/runtime/runtime.h"
  16 
  17 #include "oshmem/mca/scoll/scoll.h"
  18 #include "oshmem/mca/scoll/base/base.h"
  19 
  20 #include "oshmem/proc/proc.h"
  21 
  22 
  23 #if OSHMEM_PROFILING
  24 #include "oshmem/include/pshmem.h"
  25 #pragma weak shmem_sync = pshmem_sync
  26 #pragma weak shmem_sync_all = pshmem_sync_all
  27 #include "oshmem/shmem/c/profile/defines.h"
  28 #endif
  29 
  30 void shmem_sync(int PE_start, int logPE_stride, int PE_size, long *pSync)
  31 {
  32     int rc;
  33     oshmem_group_t* group;
  34 
  35     RUNTIME_CHECK_INIT();
  36 
  37 #if OSHMEM_SPEC_COMPAT == 1
  38     
  39     shmem_quiet();
  40 #endif
  41 
  42     
  43     group = oshmem_proc_group_create_nofail(PE_start, 1<<logPE_stride, PE_size);
  44     
  45     rc = group->g_scoll.scoll_barrier(group, pSync, SCOLL_DEFAULT_ALG);
  46 
  47     oshmem_proc_group_destroy(group);
  48     RUNTIME_CHECK_RC(rc);
  49 }
  50 
  51 void shmem_sync_all(void)
  52 {
  53     int rc = OSHMEM_SUCCESS;
  54 
  55 #if OSHMEM_SPEC_COMPAT == 1
  56     
  57     shmem_quiet();
  58 #endif
  59 
  60     if (mca_scoll_sync_array) {
  61         rc = oshmem_group_all->g_scoll.scoll_barrier(oshmem_group_all,
  62                                                      mca_scoll_sync_array,
  63                                                      SCOLL_DEFAULT_ALG);
  64     }
  65     RUNTIME_CHECK_RC(rc);
  66 }