We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
using openmpi 1.8.4 and gfortran,gcc on the Mac cgp_mpi_comm segfaults.
ier = cgp_mpi_comm(int mpicomm); should be ier = cgp_mpi_comm(MPI_Comm mpicomm);
In the calls made by cgp_mpi_comm, we should not be converting MPI_comm variables to size_t and then back again to MPI_Comm.
We also need to check the warnings passing MPI_Comm from fortran (which is an integer) to C.
/Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:3643:17: warning: cast to 'MPI_Comm' (aka 'struct ompi_communicator_t *') from smaller integer type 'int' [-Wint-to-pointer-cast] mpi_comm_c = MPI_Comm_f2c((int)*mpi_comm_f); ^ /Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:35:28: note: expanded from macro 'MPI_Comm_f2c' #define MPI_Comm_f2c(comm) (MPI_Comm)(comm) ^ /Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:3655:20: warning: cast to 'MPI_Info' (aka 'struct ompi_info_t *') from smaller integer type 'int' [-Wint-to-pointer-cast] pcg_mpi_info_c = MPI_Info_f2c((int)*pcg_mpi_info_f); ^ /Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:36:28: note: expanded from macro 'MPI_Info_f2c' #define MPI_Info_f2c(info) (MPI_Info)(info)
Reported by: brtnfld
The text was updated successfully, but these errors were encountered:
brtnfld
No branches or pull requests
using openmpi 1.8.4 and gfortran,gcc on the Mac cgp_mpi_comm segfaults.
ier = cgp_mpi_comm(int mpicomm);
should be
ier = cgp_mpi_comm(MPI_Comm mpicomm);
In the calls made by cgp_mpi_comm, we should not be converting MPI_comm variables to size_t and then back again to MPI_Comm.
We also need to check the warnings passing MPI_Comm from fortran (which is an integer) to C.
/Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:3643:17: warning: cast to 'MPI_Comm' (aka 'struct ompi_communicator_t *') from smaller integer type
'int' [-Wint-to-pointer-cast]
mpi_comm_c = MPI_Comm_f2c((int)*mpi_comm_f);
^
/Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:35:28: note: expanded from macro 'MPI_Comm_f2c'
#define MPI_Comm_f2c(comm) (MPI_Comm)(comm)
^
/Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:3655:20: warning: cast to 'MPI_Info' (aka 'struct ompi_info_t *') from smaller integer type 'int'
[-Wint-to-pointer-cast]
pcg_mpi_info_c = MPI_Info_f2c((int)*pcg_mpi_info_f);
^
/Users/brtnfld/packages/cgns/trunk/src/cg_ftoc.c:36:28: note: expanded from macro 'MPI_Info_f2c'
#define MPI_Info_f2c(info) (MPI_Info)(info)
Reported by: brtnfld
The text was updated successfully, but these errors were encountered: