Skip to content

Issue 733 impl random init #740

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 6 commits into from
Oct 20, 2021
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Fix refing static arrays.
- Do not manipulation the memptr but add to data_offset.
  • Loading branch information
vehre committed Oct 8, 2021
commit e90b09129aedef2015f151df1fb7bcfbb91343f9
17 changes: 8 additions & 9 deletions src/mpi/mpi_caf.c
Original file line number Diff line number Diff line change
Expand Up @@ -4673,8 +4673,8 @@ PREFIX(get_by_ref) (caf_token_t token, int image_index,
size = 1;
while (riter)
{
dprint("caf_ref = %p, offset = %zd, remote_mem = %p, global_win(data, desc)) = (%d, %d)\n",
riter, data_offset, remote_memptr, access_data_through_global_win,
dprint("caf_ref = %p, type = %d, offset = %zd, remote_mem = %p, global_win(data, desc)) = (%d, %d)\n",
riter, riter->type, data_offset, remote_memptr, access_data_through_global_win,
access_desc_through_global_win);
switch (riter->type)
{
Expand Down Expand Up @@ -4996,7 +4996,7 @@ case kind: \
delta = riter->u.a.dim[i].v.nvec;
#define KINDCASE(kind, type) \
case kind: \
remote_memptr += \
data_offset += \
((type *)riter->u.a.dim[i].v.vector)[0] * riter->item_size; \
break

Expand Down Expand Up @@ -5026,15 +5026,14 @@ case kind: \
riter->u.a.dim[i].s.stride,
riter->u.a.dim[i].s.start,
riter->u.a.dim[i].s.end);
remote_memptr += riter->u.a.dim[i].s.start
* riter->u.a.dim[i].s.stride
* riter->item_size;
data_offset += riter->u.a.dim[i].s.start
* riter->u.a.dim[i].s.stride
* riter->item_size;
break;
case CAF_ARR_REF_SINGLE:
delta = 1;
remote_memptr += riter->u.a.dim[i].s.start
* riter->u.a.dim[i].s.stride
* riter->item_size;
data_offset += riter->u.a.dim[i].s.start
* riter->item_size;
break;
case CAF_ARR_REF_OPEN_END:
/* This and OPEN_START are mapped to a RANGE and therefore can
Expand Down