-
Notifications
You must be signed in to change notification settings - Fork 2
simplify MPI datatype evaluation #56
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
I'll merge this PR once the tests pass. |
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.
Apart from it The PR looks fine
*ierror = -1; | ||
return; | ||
} | ||
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.
- 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.
Im getting error
aditya-trivedi pot3d main ≡ FC='gfortran -O3' ./build_and_run_gfortran.sh
+++ uname
++ [[ Linux == \L\i\n\u\x ]]
++ CC=gcc
++ cd src
++ gcc -I/home/aditya-trivedi/conda_root/envs/mpi/include -c ../../../src/mpi_wrapper.c
../../../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);
| ^~~~~~~~~~~~~~~~~~~~~~~
aditya-trivedi pot3d main ≡
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.
Just curious how CI passed here with this small glitch
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.
Are you getting this error with OpenMPI
or MPICH
or both?
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.
Ah, I see. That's a warning not an error:
../../../src/mpi_wrapper.c:203:18: warning: incompatible pointer types initializing 'MPI_Datatype' (aka 'struct ompi_datatype_t *') with an expression of type 'MPI_Comm' (aka 'struct ompi_communicator_t *') [-Wincompatible-pointer-types]
203 | MPI_Datatype datatype = get_c_comm_from_fortran(*datatype_f);
|
I got it with OpenMPI, I checked it now.
We should've more tests then definitely.
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.
addressed in #60
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.
Nice catch @adit4443ya , thanks, I'll fix it in the next PR.
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 get error on your local machine?
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 get error on your local machine?
No, only a warning.
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.
It's surprising that we only get a warning and no error at all.
No description provided.