Skip to content
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

Corrupt pointers with Cray Fortran/11.0.2 #200

Open
njansson opened this issue Sep 22, 2021 · 0 comments
Open

Corrupt pointers with Cray Fortran/11.0.2 #200

njansson opened this issue Sep 22, 2021 · 0 comments
Labels
compilers Issues with compilers Cray Cray

Comments

@njansson
Copy link
Collaborator

The Cray compiler might corrupt the pointer returned by the %array() procedure and only return parts of the array.

A workaround is to work directly with the unlimited polymorphic type data e.g. translate constructs like:

zp => new_zone_dist(pe_rank)%array()
do i = 1, new_zone_dist(pe_rank)%size()
   if (zp(i)%type .eq. 5) then
      call pe_lst%push(zp(i)%p_e)
   end if
end do

to

select type(zp => new_zone_dist(pe_rank)%data)
type is (nmsh_zone_t)
   do i = 1, new_zone_dist(pe_rank)%size()
      if (zp(i)%type .eq. 5) then
         call pe_lst%push(zp(i)%p_e)
      end if
   end do
end select

This relates to #196 #198

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
compilers Issues with compilers Cray Cray
Projects
None yet
Development

No branches or pull requests

1 participant