sourceryinstitute / OpenCoarrays

A parallel application binary interface for Fortran 2018 compilers.
http://www.opencoarrays.org
BSD 3-Clause "New" or "Revised" License
247 stars 56 forks source link

Defect: OpenCoarrays 2.10.0 on 10.6.8 Rosetta: 53% tests passed, 39 tests failed out of 83 #768

Closed barracuda156 closed 2 years ago

barracuda156 commented 2 years ago

System information including:

To help us debug your issue please explain:

What you were trying to do (and why)

Update OpenCoarrays for Macports and fix build for PPC. The only thing I had to change is use isnan instead of ieee_is_nan and make includes of ieee_arithmetic conditional, otherwise build fails: https://github.com/iains/darwin-toolchains-start-here/discussions/40 Here is the patch I made: https://github.com/barracuda156/macports-ports/blob/opencoarrays/science/OpenCoarrays/files/patch-isnan.diff

What happened (include command output, screenshots, logs, etc.)

Build succeeds, however test results are poor:

--->  Testing OpenCoarrays
Executing:  cd "/opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build" && /usr/bin/make test 
Running tests...
/opt/local/bin/ctest --force-new-ctest-process 
Test project /opt/local/var/macports/build/_opt_PPCRosettaPorts_science_OpenCoarrays/OpenCoarrays/work/build
      Start  1: initialize_mpi
 1/83 Test  #1: initialize_mpi ...................................   Passed    0.99 sec
      Start  2: register
 2/83 Test  #2: register .........................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.38 sec
      Start  3: register_vector
 3/83 Test  #3: register_vector ..................................   Passed    0.38 sec
      Start  4: register_alloc_vector
 4/83 Test  #4: register_alloc_vector ............................   Passed    0.39 sec
      Start  5: allocate_as_barrier
 5/83 Test  #5: allocate_as_barrier ..............................***Failed  Required regular expression not found. Regex=[Test passed.
]  1.38 sec
      Start  6: allocate_as_barrier_proc
 6/83 Test  #6: allocate_as_barrier_proc .........................***Failed  Required regular expression not found. Regex=[Test passed.
]  1.69 sec
      Start  7: register_alloc_comp_1
 7/83 Test  #7: register_alloc_comp_1 ............................   Passed    0.34 sec
      Start  8: register_alloc_comp_2
 8/83 Test  #8: register_alloc_comp_2 ............................   Passed    0.33 sec
      Start  9: register_alloc_comp_3
 9/83 Test  #9: register_alloc_comp_3 ............................   Passed    0.33 sec
      Start 10: async_comp_alloc
10/83 Test #10: async_comp_alloc .................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.54 sec
      Start 11: async_comp_alloc_2
11/83 Test #11: async_comp_alloc_2 ...............................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 12: comp_allocated_1
12/83 Test #12: comp_allocated_1 .................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.44 sec
      Start 13: comp_allocated_2
13/83 Test #13: comp_allocated_2 .................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 14: alloc_comp_get_convert_nums
14/83 Test #14: alloc_comp_get_convert_nums ......................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.37 sec
      Start 15: team_number
15/83 Test #15: team_number ......................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.69 sec
      Start 16: teams_subset
16/83 Test #16: teams_subset .....................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.44 sec
      Start 17: get_communicator
17/83 Test #17: get_communicator .................................   Passed    0.45 sec
      Start 18: teams_coarray_get
18/83 Test #18: teams_coarray_get ................................   Passed    0.55 sec
      Start 19: teams_coarray_get_by_ref
19/83 Test #19: teams_coarray_get_by_ref .........................   Passed    0.57 sec
      Start 20: teams_coarray_send
20/83 Test #20: teams_coarray_send ...............................   Passed    0.63 sec
      Start 21: teams_coarray_send_by_ref
21/83 Test #21: teams_coarray_send_by_ref ........................   Passed    0.63 sec
      Start 22: teams_coarray_sendget
22/83 Test #22: teams_coarray_sendget ............................   Passed    0.75 sec
      Start 23: sync_team
23/83 Test #23: sync_team ........................................***Failed  Required regular expression not found. Regex=[Test passed.
]  1.01 sec
      Start 24: alloc_comp_multidim_shape
24/83 Test #24: alloc_comp_multidim_shape ........................   Passed   17.79 sec
      Start 25: send_convert_nums
25/83 Test #25: send_convert_nums ................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.36 sec
      Start 26: sendget_convert_nums
26/83 Test #26: sendget_convert_nums .............................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.39 sec
      Start 27: sendget_convert_char_array
27/83 Test #27: sendget_convert_char_array .......................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 28: send_convert_char_array
28/83 Test #28: send_convert_char_array ..........................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.38 sec
      Start 29: alloc_comp_send_convert_nums
29/83 Test #29: alloc_comp_send_convert_nums .....................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.38 sec
      Start 30: random_init
30/83 Test #30: random_init ......................................   Passed    0.44 sec
      Start 31: get_array
31/83 Test #31: get_array ........................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.49 sec
      Start 32: get_self
32/83 Test #32: get_self .........................................   Passed    0.42 sec
      Start 33: get_convert_nums
33/83 Test #33: get_convert_nums .................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.39 sec
      Start 34: get_convert_char_array
34/83 Test #34: get_convert_char_array ...........................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 35: get_with_offset_1d
35/83 Test #35: get_with_offset_1d ...............................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.39 sec
      Start 36: whole_get_array
36/83 Test #36: whole_get_array ..................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 37: strided_get
37/83 Test #37: strided_get ......................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.40 sec
      Start 38: get_static_array
38/83 Test #38: get_static_array .................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.42 sec
      Start 39: send_array
39/83 Test #39: send_array .......................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.39 sec
      Start 40: convert-before-put
40/83 Test #40: convert-before-put ...............................   Passed    0.42 sec
      Start 41: send_with_vector_index
41/83 Test #41: send_with_vector_index ...........................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.47 sec
      Start 42: strided_sendget
42/83 Test #42: strided_sendget ..................................   Passed    0.42 sec
      Start 43: get_with_vector_index
43/83 Test #43: get_with_vector_index ............................   Passed    0.46 sec
      Start 44: co_sum
44/83 Test #44: co_sum ...........................................   Passed    0.49 sec
      Start 45: co_broadcast
45/83 Test #45: co_broadcast .....................................   Passed    0.52 sec
      Start 46: co_broadcast_derived_type
46/83 Test #46: co_broadcast_derived_type ........................   Passed    0.50 sec
      Start 47: co_broadcast_allocatable_components
47/83 Test #47: co_broadcast_allocatable_components ..............   Passed    0.54 sec
      Start 48: co_broadcast_alloc_mixed
48/83 Test #48: co_broadcast_alloc_mixed .........................   Passed    0.47 sec
      Start 49: co_min
49/83 Test #49: co_min ...........................................   Passed    0.53 sec
      Start 50: co_max
50/83 Test #50: co_max ...........................................   Passed    0.51 sec
      Start 51: co_reduce
51/83 Test #51: co_reduce ........................................   Passed    0.56 sec
      Start 52: co_reduce_res_im
52/83 Test #52: co_reduce_res_im .................................   Passed    0.55 sec
      Start 53: co_reduce_string
53/83 Test #53: co_reduce_string .................................   Passed    0.55 sec
      Start 54: syncimages_status
54/83 Test #54: syncimages_status ................................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.98 sec
      Start 55: sync_ring_abort_np3
55/83 Test #55: sync_ring_abort_np3 ..............................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.52 sec
      Start 56: sync_ring_abort_np7
56/83 Test #56: sync_ring_abort_np7 ..............................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.84 sec
      Start 57: simpleatomics
57/83 Test #57: simpleatomics ....................................***Failed  Required regular expression not found. Regex=[Test passed.
]  3.71 sec
      Start 58: syncall
58/83 Test #58: syncall ..........................................   Passed    1.06 sec
      Start 59: syncimages
59/83 Test #59: syncimages .......................................   Passed    0.92 sec
      Start 60: syncimages2
60/83 Test #60: syncimages2 ......................................   Passed    0.94 sec
      Start 61: duplicate_syncimages
61/83 Test #61: duplicate_syncimages .............................   Passed    0.99 sec
      Start 62: hello_multiverse
62/83 Test #62: hello_multiverse .................................   Passed    0.53 sec
      Start 63: coarray_burgers_pde
63/83 Test #63: coarray_burgers_pde ..............................   Passed    0.93 sec
      Start 64: co_heat
64/83 Test #64: co_heat ..........................................   Passed    0.67 sec
      Start 65: asynchronous_hello_world
65/83 Test #65: asynchronous_hello_world .........................   Passed    0.55 sec
      Start 66: source-alloc-no-sync
66/83 Test #66: source-alloc-no-sync .............................   Passed    0.95 sec
      Start 67: put-allocatable-coarray-comp
67/83 Test #67: put-allocatable-coarray-comp .....................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.48 sec
      Start 68: get-put-allocatable-comp
68/83 Test #68: get-put-allocatable-comp .........................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.51 sec
      Start 69: allocatable_p2p_event_post
69/83 Test #69: allocatable_p2p_event_post .......................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.57 sec
      Start 70: static_event_post_issue_293
70/83 Test #70: static_event_post_issue_293 ......................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.49 sec
      Start 71: co_reduce-factorial
71/83 Test #71: co_reduce-factorial ..............................   Passed    0.52 sec
      Start 72: co_reduce-factorial-int8
72/83 Test #72: co_reduce-factorial-int8 .........................   Passed    0.54 sec
      Start 73: co_reduce-factorial-int64
73/83 Test #73: co_reduce-factorial-int64 ........................   Passed    0.56 sec
      Start 74: issue-493-coindex-slice
74/83 Test #74: issue-493-coindex-slice ..........................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.84 sec
      Start 75: issue-488-multi-dim-cobounds-true
75/83 Test #75: issue-488-multi-dim-cobounds-true ................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.85 sec
      Start 76: issue-488-multi-dim-cobounds-false
76/83 Test #76: issue-488-multi-dim-cobounds-false ...............***Failed  Required regular expression not found. Regex=[Test passed.
]  0.90 sec
      Start 77: issue-503-multidim-array-broadcast
77/83 Test #77: issue-503-multidim-array-broadcast ...............   Passed    0.62 sec
      Start 78: issue-503-non-contig-red-ndarray
78/83 Test #78: issue-503-non-contig-red-ndarray .................   Passed    0.50 sec
      Start 79: issue-552-send_by_ref-singleton
79/83 Test #79: issue-552-send_by_ref-singleton ..................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.51 sec
      Start 80: issue-511-incorrect-shape
80/83 Test #80: issue-511-incorrect-shape ........................   Passed    0.50 sec
      Start 81: issue-515-mimic-mpi-gatherv
81/83 Test #81: issue-515-mimic-mpi-gatherv ......................***Failed  Required regular expression not found. Regex=[Test passed.
]  0.48 sec
      Start 82: issue-700-allow-multiple-scalar-dim-array-gets
82/83 Test #82: issue-700-allow-multiple-scalar-dim-array-gets ...***Failed  Required regular expression not found. Regex=[Test passed.
]  0.47 sec
      Start 83: test-installation-scripts.sh
83/83 Test #83: test-installation-scripts.sh .....................   Passed    0.71 sec

53% tests passed, 39 tests failed out of 83

Total Test time (real) =  69.01 sec

The following tests FAILED:
      2 - register (Failed)
      5 - allocate_as_barrier (Failed)
      6 - allocate_as_barrier_proc (Failed)
     10 - async_comp_alloc (Failed)
     11 - async_comp_alloc_2 (Failed)
     12 - comp_allocated_1 (Failed)
     13 - comp_allocated_2 (Failed)
     14 - alloc_comp_get_convert_nums (Failed)
     15 - team_number (Failed)
     16 - teams_subset (Failed)
     23 - sync_team (Failed)
     25 - send_convert_nums (Failed)
     26 - sendget_convert_nums (Failed)
     27 - sendget_convert_char_array (Failed)
     28 - send_convert_char_array (Failed)
     29 - alloc_comp_send_convert_nums (Failed)
     31 - get_array (Failed)
     33 - get_convert_nums (Failed)
     34 - get_convert_char_array (Failed)
     35 - get_with_offset_1d (Failed)
     36 - whole_get_array (Failed)
     37 - strided_get (Failed)
     38 - get_static_array (Failed)
     39 - send_array (Failed)
     41 - send_with_vector_index (Failed)
     54 - syncimages_status (Failed)
     55 - sync_ring_abort_np3 (Failed)
     56 - sync_ring_abort_np7 (Failed)
     57 - simpleatomics (Failed)
     67 - put-allocatable-coarray-comp (Failed)
     68 - get-put-allocatable-comp (Failed)
     69 - allocatable_p2p_event_post (Failed)
     70 - static_event_post_issue_293 (Failed)
     74 - issue-493-coindex-slice (Failed)
     75 - issue-488-multi-dim-cobounds-true (Failed)
     76 - issue-488-multi-dim-cobounds-false (Failed)
     79 - issue-552-send_by_ref-singleton (Failed)
     81 - issue-515-mimic-mpi-gatherv (Failed)
     82 - issue-700-allow-multiple-scalar-dim-array-gets (Failed)
Errors while running CTest

opencoarrays_tests_10.6.8_ppc.txt P. S. malloc errors in the output are unrelated to OpenCoarrays but result from two libstdc++, more here: https://github.com/iains/darwin-toolchains-start-here/discussions/20

What you expected to happen

Test should pass :)

Step-by-step reproduction instructions to reproduce the error/bug

This can be reproduced from this commit: https://github.com/macports/macports-ports/commit/7ff020419b91ab210bda20e1b0998a0c977fff98 However PPC hardware is needed, or otherwise 10.6.8 with Rosetta installed.

barracuda156 commented 2 years ago

P. S. Interestingly, on MacOS 11 x86_64 OpenCoarrays 2.10.0 does not even build, failing on:

/opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:32:26:

     32 |   use opencoarrays, only : get_communicator
        |                          1
  Error: Symbol 'get_communicator' referenced at (1) not found in module 'opencoarrays'
  /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:46:28:

     46 |     use opencoarrays, only : get_communicator, team_number !! TODO: remove team_number once gfortran supports it
        |                            1
  Error: Symbol 'get_communicator' referenced at (1) not found in module 'opencoarrays'
  /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:41:23:

     41 |   call mpi_matches_caf(get_communicator())
        |                       1
  Error: Function 'get_communicator' at (1) has no IMPLICIT type
  /opt/local/var/macports/build/_Users_runner_work_macports-ports_macports-ports_ports_science_OpenCoarrays/OpenCoarrays/work/OpenCoarrays-2.10.0/src/tests/unit/teams/get-communicator.F90:60:29:

     60 |         call mpi_matches_caf(get_communicator())
        |                             1
  Error: Function 'get_communicator' at (1) has no IMPLICIT type

https://github.com/macports/macports-ports/runs/8287219168

rouson commented 2 years ago

@barracuda156 OpenCoarrays hasn't supported MacPorts for several years. I recommend using Homebrew to install OpenCoarrays via the command brew install opencoarrays. I use this regularly without any problems. Alternatively, you could build OpenCoarrays from source using cmake or you could try running ./install.sh, which ultimately just invokes cmake but attempts to check for prerequisites and install them if they're missing. I'm also working on a refactoring the install.sh installer to use fpm instead of cmake because it's much simpler to maintain, but I haven't had time to work on that recently. If you're a fpm user and want to try it out, let me know and I'll provide instructions.

I wasn't aware that the MacPorts OpenCoarrays port even still existed. If you know of a way for us to remove or deprecate it, please let me know. For now, I'm going to close this issue, but feel free to submit a new issue if you try one of the other approaches mentioned above and encounter difficulties.

barracuda156 commented 2 years ago

@rouson Well, there is no problem with the building with Macports, it works – I have built it locally. My issue is concerned with tests failures.

P. S. I would appreciate if this ticket is opened, since someone may give a helpful advice on the matter. I just need to know what may cause test failures. Fixing I can work on myself.

barracuda156 commented 2 years ago

@rouson Worth noting that Homebrew is simply broken for older MacOS. Looks like before you were interested in wider user base: https://github.com/sourceryinstitute/opencoarrays/issues/22#issuecomment-159009469

barracuda156 commented 2 years ago

@rouson Update done, build is fixed: https://github.com/macports/macports-ports/pull/16075

rouson commented 2 years ago

@barracuda156 thanks for working on this!

barracuda156 commented 2 years ago

@barracuda156 thanks for working on this!

@rouson I added a fix for case-sensitive MacOS in this PR: https://github.com/macports/macports-ports/pull/16175 So now OpenCoarrays should build across the board; as for archs, aarch64, x86_64 and ppc builds confirmed. I will test ppc64 somewhat later when get back to native PPC hardware. Current portfile: https://github.com/macports/macports-ports/blob/master/science/OpenCoarrays/Portfile

GitHub
macports-ports/Portfile at master · macports/macports-ports
The MacPorts ports tree. Contribute to macports/macports-ports development by creating an account on GitHub.