Skip to content

Commit

Permalink
Support for Cray OpenSHMEM-X 11
Browse files Browse the repository at this point in the history
  • Loading branch information
jeffhammond authored and dalcinl committed Aug 1, 2023
1 parent ad7adec commit f153f30
Show file tree
Hide file tree
Showing 4 changed files with 637 additions and 40 deletions.
46 changes: 6 additions & 40 deletions src/libshmem/compat/cray.h
Original file line number Diff line number Diff line change
@@ -1,46 +1,12 @@
#ifndef PySHMEM_COMPAT_CRAY_H
#define PySHMEM_COMPAT_CRAY_H

static
void shmem_complexf_sum_to_all(float _Complex *dest, const float _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
float _Complex *pWrk, long *pSync)
{
shmem_float_sum_to_all((float*)dest, (float*)source, 2*nreduce,
PE_start, logPE_stride, PE_size,
(float*)pWrk, pSync);
}

static
void shmem_complexd_sum_to_all(double _Complex *dest, const double _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
double _Complex *pWrk, long *pSync)
{
shmem_double_sum_to_all((double*)dest, (double*)source, 2*nreduce,
PE_start, logPE_stride, PE_size,
(double*)pWrk, pSync);
}

static
void shmem_complexf_prod_to_all(float _Complex *dest, const float _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
float _Complex *pWrk, long *pSync)
{
(void)dest; (void)source; (void)nreduce;
(void)PE_start; (void)logPE_stride;
(void)PE_size; (void)pWrk; (void)pSync;
PySHMEM_UNAVAILABLE;
}
#if CRAY_SHMEM_MAJOR_VERSION == 9
#include "cray09.h"
#endif

static
void shmem_complexd_prod_to_all(double _Complex *dest, const double _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
double _Complex *pWrk, long *pSync)
{
(void)dest; (void)source; (void)nreduce;
(void)PE_start; (void)logPE_stride; (void)PE_size;
(void)pWrk; (void)pSync;
PySHMEM_UNAVAILABLE;
}
#if CRAY_SHMEM_MAJOR_VERSION == 11
#include "cray11.h"
#endif

#endif
41 changes: 41 additions & 0 deletions src/libshmem/compat/cray09.h
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
static
void shmem_complexf_sum_to_all(float _Complex *dest, const float _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
float _Complex *pWrk, long *pSync)
{
shmem_float_sum_to_all((float*)dest, (float*)source, 2*nreduce,
PE_start, logPE_stride, PE_size,
(float*)pWrk, pSync);
}

static
void shmem_complexd_sum_to_all(double _Complex *dest, const double _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
double _Complex *pWrk, long *pSync)
{
shmem_double_sum_to_all((double*)dest, (double*)source, 2*nreduce,
PE_start, logPE_stride, PE_size,
(double*)pWrk, pSync);
}

static
void shmem_complexf_prod_to_all(float _Complex *dest, const float _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
float _Complex *pWrk, long *pSync)
{
(void)dest; (void)source; (void)nreduce;
(void)PE_start; (void)logPE_stride;
(void)PE_size; (void)pWrk; (void)pSync;
PySHMEM_UNAVAILABLE;
}

static
void shmem_complexd_prod_to_all(double _Complex *dest, const double _Complex *source, int nreduce,
int PE_start, int logPE_stride, int PE_size,
double _Complex *pWrk, long *pSync)
{
(void)dest; (void)source; (void)nreduce;
(void)PE_start; (void)logPE_stride; (void)PE_size;
(void)pWrk; (void)pSync;
PySHMEM_UNAVAILABLE;
}
Loading

0 comments on commit f153f30

Please sign in to comment.