Commit b8e2f23
fortran module: assumed size arg must match actual array arg of any rank
Here's an example code that fails to compile prior to this checkin:
use mpi
integer, contiguous, pointer :: requests(:, :)
integer :: ierr
allocate(requests(2,2))
requests(1,1) = 1
requests(2,1) = 2
requests(1,2) = 3
requests(2,2) = 4
call MPI_Waitall(size(requests),requests,MPI_STATUSES_IGNORE,ierr)
end
But according to the standard under "A.4 Fortran Bindings with mpif.h or the mpi
Module", waitall is supposed to take
INTEGER COUNT, ARRAY_OF_REQUESTS(*)
and under fortran that assumed size arg should match the above actual arg.
The fortran module previously had
integer, dimension(count), intent(inout) :: array_of_requests
and this checkin changes it to
integer, dimension(*), intent(inout) :: array_of_requests
According to Rafik Zurob the rules for assumed-size arrays are such that we know
the incoming array_of_requests is contiguous so nothing changes in the fundamental
operation of the waitall call.
Signed-off-by: Austen Lauria <awlauria@us.ibm.com>
Co-authored-by: Jeff Squyres <jsquyres@cisco.com>1 parent 9989374 commit b8e2f23
File tree
5 files changed
+27
-27
lines changed- ompi/mpi/fortran/use-mpi-tkr
5 files changed
+27
-27
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
1336 | 1336 | | |
1337 | 1337 | | |
1338 | 1338 | | |
1339 | | - | |
| 1339 | + | |
1340 | 1340 | | |
1341 | | - | |
| 1341 | + | |
1342 | 1342 | | |
1343 | 1343 | | |
1344 | 1344 | | |
| |||
1351 | 1351 | | |
1352 | 1352 | | |
1353 | 1353 | | |
1354 | | - | |
| 1354 | + | |
1355 | 1355 | | |
1356 | 1356 | | |
1357 | 1357 | | |
| |||
1367 | 1367 | | |
1368 | 1368 | | |
1369 | 1369 | | |
1370 | | - | |
| 1370 | + | |
1371 | 1371 | | |
1372 | 1372 | | |
1373 | 1373 | | |
| |||
1830 | 1830 | | |
1831 | 1831 | | |
1832 | 1832 | | |
1833 | | - | |
| 1833 | + | |
1834 | 1834 | | |
1835 | 1835 | | |
1836 | 1836 | | |
| |||
1843 | 1843 | | |
1844 | 1844 | | |
1845 | 1845 | | |
1846 | | - | |
| 1846 | + | |
1847 | 1847 | | |
1848 | 1848 | | |
1849 | 1849 | | |
| |||
1858 | 1858 | | |
1859 | 1859 | | |
1860 | 1860 | | |
1861 | | - | |
| 1861 | + | |
1862 | 1862 | | |
1863 | 1863 | | |
1864 | 1864 | | |
| |||
2341 | 2341 | | |
2342 | 2342 | | |
2343 | 2343 | | |
2344 | | - | |
2345 | | - | |
2346 | | - | |
2347 | | - | |
| 2344 | + | |
| 2345 | + | |
| 2346 | + | |
| 2347 | + | |
2348 | 2348 | | |
2349 | 2349 | | |
2350 | 2350 | | |
| |||
2361 | 2361 | | |
2362 | 2362 | | |
2363 | 2363 | | |
2364 | | - | |
2365 | | - | |
| 2364 | + | |
| 2365 | + | |
2366 | 2366 | | |
2367 | | - | |
2368 | | - | |
| 2367 | + | |
| 2368 | + | |
2369 | 2369 | | |
2370 | 2370 | | |
2371 | 2371 | | |
| |||
2394 | 2394 | | |
2395 | 2395 | | |
2396 | 2396 | | |
2397 | | - | |
2398 | | - | |
| 2397 | + | |
| 2398 | + | |
2399 | 2399 | | |
2400 | | - | |
2401 | | - | |
| 2400 | + | |
| 2401 | + | |
2402 | 2402 | | |
2403 | 2403 | | |
2404 | 2404 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
33 | 33 | | |
34 | 34 | | |
35 | 35 | | |
36 | | - | |
| 36 | + | |
37 | 37 | | |
38 | 38 | | |
39 | 39 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
21 | 21 | | |
22 | 22 | | |
23 | 23 | | |
24 | | - | |
| 24 | + | |
25 | 25 | | |
26 | 26 | | |
27 | 27 | | |
| |||
31 | 31 | | |
32 | 32 | | |
33 | 33 | | |
34 | | - | |
| 34 | + | |
35 | 35 | | |
36 | 36 | | |
37 | 37 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
22 | 22 | | |
23 | 23 | | |
24 | 24 | | |
25 | | - | |
| 25 | + | |
26 | 26 | | |
27 | 27 | | |
28 | 28 | | |
| |||
36 | 36 | | |
37 | 37 | | |
38 | 38 | | |
39 | | - | |
| 39 | + | |
40 | 40 | | |
41 | 41 | | |
42 | 42 | | |
| |||
0 commit comments