-
Notifications
You must be signed in to change notification settings - Fork 2
Fix: use correct helper function #60
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
@@ -200,7 +200,7 @@ void mpi_waitall_wrapper(int *count, int *array_of_requests_f, | |||
|
|||
void mpi_ssend_wrapper(double *buf, int *count, int *datatype_f, int *dest, | |||
int *tag, int *comm_f, int *ierror) { | |||
MPI_Datatype datatype = get_c_comm_from_fortran(*datatype_f); | |||
MPI_Datatype datatype = get_c_datatype_from_fortran(*datatype_f); |
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.
Do you think if you can also figure out a test case that fails if we don't use this?
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.
We definitely are lacking on tests it seems.
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.
This fails in the compilation step itself!!
aditya-trivedi tests main ≡ ?10 FC='gfortran' ./run_tests.sh
../src/mpi_wrapper.c: In function 'mpi_ssend_wrapper':
../src/mpi_wrapper.c:203:29: error: initialization of 'MPI_Datatype' {aka 'struct ompi_datatype_t *'} from incompatible pointer type 'MPI_Comm' {aka 'struct ompi_communicator_t *'} [-Wincompatible-pointer-types]
203 | MPI_Datatype datatype = get_c_comm_from_fortran(*datatype_f);
| ^~~~~~~~~~~~~~~~~~~~~~~
```
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.
We definitely are lacking on tests it seems.
I'm adding it's test
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.
This fails in the compilation step itself!!
Are you sure that for you locally it's a failure and not a warning?
Can you please confirm this with value of echo $?
that you get after running FC='gfortran' ./run_tests.sh
?
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.
and if you think about the correctness then too the return type of the get_c_comm_from_fortran is of MPI_comm and we are assigning it to the MPI_datatype
That makes sense, what I'm trying to understand is so that what to fix in the CI so that we catch this error at the CI and don't have to rely on local machine for this error reproducibility.
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.
Yes i will do that
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.
Here #65
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.
Sometimes in my laptop this happens
even if i run compilation commands or runtests scripts then it uses the previously compiled version of files and i dont catch error , restarting machine helps a lot in this case
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.
Sometimes in my laptop this happens
even if i run compilation commands or runtests scripts then it uses the previously compiled version of files and i dont catch error , restarting machine helps a lot in this case
Do you use git clean -dfx
?
00fcb4f
to
3d1d7bb
Compare
I'll be off for sometime now (~2 hours), once I'm back, I'll take a look at this. |
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.
This is perfect, thanks for fixing it @adit4443ya .
Address #56 (review)