- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I'm trying to dinamically increase the size of a coarray declared as num_team(:)[:] so that it reflects the number of teams, known during execution.
The code is basically,
if(.not. allocated(num_teams)) then
allocate(num_teams(1)[*],stat=erro)
else
i=size(num_teams)
allocate(num_teamsv(i+1)[*])
num_teamsv(1:i) = num_teams
deallocate(num_teams)
allocate(num_teams(i+1)[*])
num_teams = num_teamsv
deallocate(num_teamsv)
endif
It is expected that the first allocate would be a barrier so that all images get num_team allocated. If so any other image would be direted to the ELSE option and the coarray num_team would be reallocated. This is not what is going on. The following code has the same purpose and shows that if we force the reallocation breaking the if,else,endif into two if,endif, the first position of num_team(1)[*] is corrupted.
I´m using ifx 2025.1, with FOR_COARRAY_NUM_IMAGES=9, and compiling with
mpiifx -coarray=distributed testeifx.f90 -o testeifx
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I guess I did mistakes in this bug report. In fact, I have to rethink and learn more about how to program what I need using coarrays.
Sorry.
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page