-
Notifications
You must be signed in to change notification settings - Fork 2
Handle Integer type arrays for MPI_Allreduce #24
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
Conversation
The GFortran checks are passing locally |
I tried this: > FC="gfortran" ./run_tests.sh
+ MPIEXEC=/Users/gxyd/miniforge3/envs/pot3d_build/bin/mpiexec
++ uname
+ [[ Darwin == \L\i\n\u\x ]]
+ CC=clang
+ clang -I/Users/gxyd/miniforge3/envs/pot3d_build/include -c ../src/mpi_wrapper.c
+ gfortran -c ../src/mpi_c_bindings.f90
../src/mpi_c_bindings.f90:89:132:
89 | subroutine c_mpi_allreduce_scalar(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
../src/mpi_c_bindings.f90:89:110:
89 | subroutine c_mpi_allreduce_scalar(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Unterminated character constant beginning at (1)
../src/mpi_c_bindings.f90:90:52:
90 | use iso_c_binding, only: c_int, c_double
| 1
Error: Unexpected USE statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:91:49:
91 | real(c_double), intent(in) :: sendbuf
| 1
Error: Unexpected data declaration statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:92:17:
92 | real(c_double), intent(out) :: recvbuf
| 1
Error: Parameter ‘c_double’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:93:20:
93 | integer(c_int), intent(in) :: count, datatype, op, comm
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:94:20:
94 | integer(c_int), intent(out), optional :: ierror
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:95:11:
95 | end subroutine
| 1
Error: Expecting END INTERFACE statement at (1)
../src/mpi_c_bindings.f90:97:132:
97 | subroutine c_mpi_allreduce_1d(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
../src/mpi_c_bindings.f90:97:132:
97 | subroutine c_mpi_allreduce_1d(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Missing closing paren for binding label at (1)
../src/mpi_c_bindings.f90:98:52:
98 | use iso_c_binding, only: c_int, c_double
| 1
Error: Unexpected USE statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:99:49:
99 | real(c_double), intent(in) :: sendbuf
| 1
Error: Unexpected data declaration statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:100:17:
100 | real(c_double), dimension(*), intent(out) :: recvbuf
| 1
Error: Parameter ‘c_double’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:101:20:
101 | integer(c_int), intent(in) :: count, datatype, op, comm
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:102:20:
102 | integer(c_int), intent(out), optional :: ierror
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:103:11:
103 | end subroutine
| 1
Error: Expecting END INTERFACE statement at (1)
../src/mpi_c_bindings.f90:105:132:
105 | subroutine c_mpi_allreduce_array_real(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
../src/mpi_c_bindings.f90:105:114:
105 | subroutine c_mpi_allreduce_array_real(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_real")
| 1
Error: Unterminated character constant beginning at (1)
../src/mpi_c_bindings.f90:106:52:
106 | use iso_c_binding, only: c_int, c_double
| 1
Error: Unexpected USE statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:107:64:
107 | real(c_double), dimension(*), intent(in) :: sendbuf
| 1
Error: Unexpected data declaration statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:108:17:
108 | real(c_double), dimension(*), intent(out) :: recvbuf
| 1
Error: Parameter ‘c_double’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:109:20:
109 | integer(c_int), intent(in) :: count, datatype, op, comm
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:110:20:
110 | integer(c_int), intent(out), optional :: ierror
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:111:11:
111 | end subroutine c_mpi_allreduce_array_real
| 1
Error: Expecting END INTERFACE statement at (1)
../src/mpi_c_bindings.f90:113:132:
113 | subroutine c_mpi_allreduce_array_int(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_int")
| 1
Error: Line truncated at (1) [-Werror=line-truncation]
../src/mpi_c_bindings.f90:113:113:
113 | subroutine c_mpi_allreduce_array_int(sendbuf, recvbuf, count, datatype, op, comm, ierror) bind(C, name="mpi_allreduce_wrapper_int")
| 1
Error: Unterminated character constant beginning at (1)
../src/mpi_c_bindings.f90:114:52:
114 | use iso_c_binding, only: c_int, c_double
| 1
Error: Unexpected USE statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:115:64:
115 | integer(c_int), dimension(*), intent(in) :: sendbuf
| 1
Error: Unexpected data declaration statement in INTERFACE block at (1)
../src/mpi_c_bindings.f90:116:20:
116 | integer(c_int), dimension(*), intent(out) :: recvbuf
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:117:20:
117 | integer(c_int), intent(in) :: count, datatype, op, comm
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:118:20:
118 | integer(c_int), intent(out), optional :: ierror
| 1
Error: Parameter ‘c_int’ at (1) has not been declared or is a variable, which does not reduce to a constant expression
../src/mpi_c_bindings.f90:119:11:
119 | end subroutine c_mpi_allreduce_array_int
| 1
Error: Expecting END INTERFACE statement at (1)
f951: some warnings being treated as errors
> echo $?
1 |
10f57ca
to
2de4072
Compare
Ohh it was just line truncation error |
@gxyd |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good to me, apologies, I missed this PR earlier.
It requires resolving conflicts now, can you please with that, once that's done, we can squash and merge the commit. |
This changes mandates to change the MPI_INTEGER value for which I have to edit datatype checks in mpi_wrapper.c
2de4072
to
ef93abf
Compare
Thanks for the review!! |
This changes mandates to change the MPI_INTEGER value for which I have to edit some datatype checks in mpi_wrapper.c
Things would break i guess
But this needs strong review before merging
Cc:-@gxyd