Skip to content

Commit

Permalink
src: Add nic_idx paramater to where needed in Fortran files
Browse files Browse the repository at this point in the history
  • Loading branch information
philipmarshall21 committed May 8, 2024
1 parent 706bc18 commit 864fbb2
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 35 deletions.
60 changes: 30 additions & 30 deletions src/atomic_f.c
Original file line number Diff line number Diff line change
Expand Up @@ -41,8 +41,8 @@ FC_SHMEM_SWAP(fortran_integer_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, SIZEOF_FORTRAN_INTEGER);

shmem_internal_swap(SHMEM_CTX_DEFAULT, target, value, &newval, SIZEOF_FORTRAN_INTEGER,
*pe, SHM_INTERNAL_FORTRAN_INTEGER);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_FORTRAN_INTEGER, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -64,8 +64,8 @@ FC_SHMEM_INT4_SWAP(int32_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 4);

shmem_internal_swap(SHMEM_CTX_DEFAULT, target, value, &newval, 4,
*pe, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -87,8 +87,8 @@ FC_SHMEM_INT8_SWAP(int64_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 8);

shmem_internal_swap(SHMEM_CTX_DEFAULT, target, value, &newval, 8,
*pe, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -112,8 +112,8 @@ FC_SHMEM_REAL4_SWAP(float *target,
shmem_internal_assert(sizeof(float) == 4);

shmem_internal_swap(SHMEM_CTX_DEFAULT, target, value, &newval, 4,
*pe, SHM_INTERNAL_FLOAT);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_FLOAT, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -137,8 +137,8 @@ FC_SHMEM_REAL8_SWAP(double *target,
shmem_internal_assert(sizeof(double) == 8);

shmem_internal_swap(SHMEM_CTX_DEFAULT, target, value, &newval, 8,
*pe, SHM_INTERNAL_DOUBLE);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_DOUBLE, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -163,8 +163,8 @@ FC_SHMEM_INT4_CSWAP(int32_t *target,

shmem_internal_cswap(SHMEM_CTX_DEFAULT, target, value, &newval, cond,
4,
*pe, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -189,8 +189,8 @@ FC_SHMEM_INT8_CSWAP(int64_t *target,

shmem_internal_cswap(SHMEM_CTX_DEFAULT, target, value, &newval, cond,
8,
*pe, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return newval;
}

Expand All @@ -212,8 +212,8 @@ FC_SHMEM_INT4_FADD(int32_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 4);

shmem_internal_fetch_atomic(SHMEM_CTX_DEFAULT, target, value, &oldval, 4,
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return oldval;
}

Expand All @@ -235,8 +235,8 @@ FC_SHMEM_INT8_FADD(int64_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 8);

shmem_internal_fetch_atomic(SHMEM_CTX_DEFAULT, target, value, &oldval, 8,
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return oldval;
}

Expand All @@ -256,8 +256,8 @@ FC_SHMEM_INT4_FINC(int32_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 4);

shmem_internal_fetch_atomic(SHMEM_CTX_DEFAULT, target, &tmp, &oldval, 4,
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return oldval;
}

Expand All @@ -277,8 +277,8 @@ FC_SHMEM_INT8_FINC(int64_t *target,
SHMEM_ERR_CHECK_SYMMETRIC(target, 8);

shmem_internal_fetch_atomic(SHMEM_CTX_DEFAULT, target, &tmp, &oldval, 8,
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
*pe, SHM_INTERNAL_SUM, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);
return oldval;
}

Expand Down Expand Up @@ -373,8 +373,8 @@ FC_SHMEM_INT4_FETCH(int32_t *source,
SHMEM_ERR_CHECK_PE(*pe);
SHMEM_ERR_CHECK_SYMMETRIC(source, 4);

shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 4, *pe, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 4, *pe, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);

return val;
}
Expand All @@ -394,8 +394,8 @@ FC_SHMEM_INT8_FETCH(int64_t *source,
SHMEM_ERR_CHECK_PE(*pe);
SHMEM_ERR_CHECK_SYMMETRIC(source, 8);

shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 8, *pe, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 8, *pe, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);

return val;
}
Expand All @@ -417,8 +417,8 @@ FC_SHMEM_REAL4_FETCH(float *source,

shmem_internal_assert(sizeof(float) == 4);

shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 4, *pe, SHM_INTERNAL_INT32);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 4, *pe, SHM_INTERNAL_INT32, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);

return val;
}
Expand All @@ -440,8 +440,8 @@ FC_SHMEM_REAL8_FETCH(double *source,

shmem_internal_assert(sizeof(double) == 8);

shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 8, *pe, SHM_INTERNAL_INT64);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT);
shmem_internal_atomic_fetch(SHMEM_CTX_DEFAULT, &val, (void *) source, 8, *pe, SHM_INTERNAL_INT64, 0);
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0);

return val;
}
Expand Down
10 changes: 5 additions & 5 deletions src/data_f.c4
Original file line number Diff line number Diff line change
Expand Up @@ -136,8 +136,8 @@ SHMEM_BIND_F_SIZES(`SHMEM_WRAP_FC_IPUT_SIZE')
SHMEM_ERR_CHECK_NULL(target, *len); \
\
shmem_internal_get(SHMEM_CTX_DEFAULT, target, source, \
SIZE * *len, *pe); \
shmem_internal_get_wait(SHMEM_CTX_DEFAULT); \
SIZE * *len, *pe, 0); \
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0); \
}

define(`SHMEM_WRAP_FC_GET',
Expand All @@ -161,7 +161,7 @@ SHMEM_BIND_F_SIZES(`SHMEM_WRAP_FC_GET_SIZE')
SHMEM_ERR_CHECK_NULL(target, *nelems); \
\
shmem_internal_get(SHMEM_CTX_DEFAULT, target, source, \
SIZE * *nelems, *pe); \
SIZE * *nelems, *pe, 0); \
}

define(`SHMEM_WRAP_FC_GET_NBI',
Expand Down Expand Up @@ -195,11 +195,11 @@ SHMEM_BIND_F_SIZES(`SHMEM_WRAP_FC_GET_NBI_SIZE')
\
for ( ; len > 0 ; --len ) { \
shmem_internal_get(SHMEM_CTX_DEFAULT, target, source, SIZE, \
*pe); \
*pe, 0); \
target += (*tst * SIZE); \
source += (*sst * SIZE); \
} \
shmem_internal_get_wait(SHMEM_CTX_DEFAULT); \
shmem_internal_get_wait(SHMEM_CTX_DEFAULT, 0); \
}

define(`SHMEM_WRAP_FC_IGET',
Expand Down

0 comments on commit 864fbb2

Please sign in to comment.