Type casts for building dynamical Fortran libraries.
And export correct function names. This commit was SVN r23020.
Этот коммит содержится в:
родитель
668c1c7f17
Коммит
077f6e6398
@ -102,9 +102,9 @@ MACRO(OMPI_F77_FIND_EXT_SYMBOL_CONVENTION)
|
||||
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt
|
||||
"CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)\n"
|
||||
"PROJECT(conftest_c C)\n"
|
||||
"IF(NOT \"\${F77_LIB_PATH}\" STREQUAL \"\")\n"
|
||||
"IF(NOT \"${F77_LIB_PATH}\" STREQUAL \"\")\n"
|
||||
" LINK_DIRECTORIES(\"${F77_LIB_PATH}\")\n"
|
||||
"ENDIF(NOT \"\${F77_LIB_PATH}\" STREQUAL \"\")\n"
|
||||
"ENDIF(NOT \"${F77_LIB_PATH}\" STREQUAL \"\")\n"
|
||||
"ADD_EXECUTABLE(conftest_c conftest_c.c)\n"
|
||||
"TARGET_LINK_LIBRARIES(conftest_c ${OUTPUT_OBJ_FILE})\n")
|
||||
|
||||
|
@ -69,9 +69,9 @@ void mpi_allgather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allgather(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
|
@ -76,9 +76,9 @@ void mpi_allgatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allgatherv(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
|
@ -70,9 +70,9 @@ void mpi_allreduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Allreduce(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
|
@ -69,9 +69,9 @@ void mpi_alltoall_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Alltoall(sendbuf,
|
||||
OMPI_FINT_2_INT(*sendcount),
|
||||
|
@ -81,9 +81,9 @@ void mpi_alltoallv_f(char *sendbuf, MPI_Fint *sendcounts, MPI_Fint *sdispls,
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(rdispls, size);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Alltoallv(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
|
@ -75,8 +75,8 @@ void mpi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
|
||||
c_sendtypes = malloc(size * sizeof(MPI_Datatype));
|
||||
c_recvtypes = malloc(size * sizeof(MPI_Datatype));
|
||||
c_sendtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
c_recvtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
|
||||
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(sdispls, size);
|
||||
@ -90,8 +90,8 @@ void mpi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
}
|
||||
|
||||
/* Alltoallw does not support MPI_IN_PLACE */
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Alltoallw(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
|
@ -106,7 +106,7 @@ void mpi_comm_spawn_multiple_f(MPI_Fint *count, char *array_commands,
|
||||
|
||||
ompi_fortran_argv_f2c(array_commands, cmd_len, &c_array_commands);
|
||||
|
||||
c_info = malloc (array_size * sizeof(MPI_Info));
|
||||
c_info = (MPI_Info *) malloc (array_size * sizeof(MPI_Info));
|
||||
for (i = 0; i < array_size; ++i) {
|
||||
c_info[i] = MPI_Info_f2c(array_info[i]);
|
||||
}
|
||||
|
@ -71,8 +71,8 @@ void mpi_exscan_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
/* MPI_IN_PLACE is not supported */
|
||||
sendbuf = OMPI_F2C_BOTTOM (sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM (recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Exscan(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
|
@ -69,9 +69,9 @@ void mpi_gather_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
|
@ -77,9 +77,9 @@ void mpi_gatherv_f(char *sendbuf, MPI_Fint *sendcount, MPI_Fint *sendtype,
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Gatherv(sendbuf, OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
|
@ -49,6 +49,8 @@
|
||||
#include "ompi/request/grequest.h"
|
||||
#include "ompi/mpi/f77/datarep.h"
|
||||
|
||||
BEGIN_C_DECLS
|
||||
|
||||
/* These are the prototypes for the "real" back-end fortran functions. */
|
||||
#define PN(ret, lower_name, upper_name, args) \
|
||||
OMPI_DECLSPEC ret lower_name##_f args; \
|
||||
@ -363,4 +365,6 @@ PN(void, mpi_comm_null_delete_fn, MPI_COMM_NULL_DELETE_FN, (MPI_Fint* comm, MPI_
|
||||
PN(void, mpi_comm_null_copy_fn, MPI_COMM_NULL_COPY_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr));
|
||||
PN(void, mpi_comm_dup_fn, MPI_COMM_DUP_FN, (MPI_Fint* comm, MPI_Fint* comm_keyval, MPI_Aint* extra_state, MPI_Aint* attribute_val_in, MPI_Aint* attribute_val_out, ompi_fortran_logical_t * flag, MPI_Fint* ierr));
|
||||
|
||||
END_C_DECLS
|
||||
|
||||
#endif
|
||||
|
@ -70,9 +70,9 @@ void mpi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
|
@ -68,8 +68,8 @@ void mpi_reduce_local_f(char *inbuf, char *inoutbuf, MPI_Fint *count,
|
||||
c_type = MPI_Type_f2c(*datatype);
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
|
||||
inbuf = OMPI_F2C_BOTTOM(inbuf);
|
||||
inoutbuf = OMPI_F2C_BOTTOM(inoutbuf);
|
||||
inbuf = (char *) OMPI_F2C_BOTTOM(inbuf);
|
||||
inoutbuf = (char *) OMPI_F2C_BOTTOM(inoutbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce_local(inbuf, inoutbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
|
@ -75,9 +75,9 @@ void mpi_reduce_scatter_f(char *sendbuf, char *recvbuf,
|
||||
MPI_Comm_size(c_comm, &size);
|
||||
OMPI_ARRAY_FINT_2_INT(recvcounts, size);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Reduce_scatter(sendbuf, recvbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(recvcounts),
|
||||
|
@ -205,7 +205,7 @@ static int read_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c,
|
||||
intercept_extra_state_t *intercept_data =
|
||||
(intercept_extra_state_t*) extra_state;
|
||||
|
||||
intercept_data->read_fn_f77(userbuf, &type_f77, &count_f77, filebuf,
|
||||
intercept_data->read_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf,
|
||||
&position, intercept_data->extra_state_f77,
|
||||
&ierr);
|
||||
return OMPI_FINT_2_INT(ierr);
|
||||
@ -223,7 +223,7 @@ static int write_intercept_fn(void *userbuf, MPI_Datatype type_c, int count_c,
|
||||
intercept_extra_state_t *intercept_data =
|
||||
(intercept_extra_state_t*) extra_state;
|
||||
|
||||
intercept_data->write_fn_f77(userbuf, &type_f77, &count_f77, filebuf,
|
||||
intercept_data->write_fn_f77((char *) userbuf, &type_f77, &count_f77, (char *) filebuf,
|
||||
&position, intercept_data->extra_state_f77,
|
||||
&ierr);
|
||||
return OMPI_FINT_2_INT(ierr);
|
||||
|
@ -70,9 +70,9 @@ void mpi_scan_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
|
||||
c_op = MPI_Op_f2c(*op);
|
||||
c_comm = MPI_Comm_f2c(*comm);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scan(sendbuf, recvbuf,
|
||||
OMPI_FINT_2_INT(*count),
|
||||
|
@ -69,9 +69,9 @@ void mpi_scatter_f(char *sendbuf, MPI_Fint *sendcount,
|
||||
c_sendtype = MPI_Type_f2c(*sendtype);
|
||||
c_recvtype = MPI_Type_f2c(*recvtype);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount),
|
||||
c_sendtype, recvbuf,
|
||||
|
@ -78,9 +78,9 @@ void mpi_scatterv_f(char *sendbuf, MPI_Fint *sendcounts,
|
||||
OMPI_ARRAY_FINT_2_INT(sendcounts, size);
|
||||
OMPI_ARRAY_FINT_2_INT(displs, size);
|
||||
|
||||
sendbuf = OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = OMPI_F2C_BOTTOM(recvbuf);
|
||||
sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
|
||||
sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
|
||||
recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
|
||||
|
||||
*ierr = OMPI_INT_2_FINT(MPI_Scatterv(sendbuf,
|
||||
OMPI_ARRAY_NAME_CONVERT(sendcounts),
|
||||
|
@ -68,7 +68,7 @@ void mpi_startall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
|
||||
MPI_Request *c_req;
|
||||
int i;
|
||||
|
||||
c_req = malloc(*count * sizeof(MPI_Request));
|
||||
c_req = (MPI_Request *) malloc(*count * sizeof(MPI_Request));
|
||||
if (NULL == c_req) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
FUNC_NAME);
|
||||
|
@ -69,7 +69,7 @@ void mpi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_lo
|
||||
int i;
|
||||
OMPI_LOGICAL_NAME_DECL(flag);
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*count) *
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) *
|
||||
(sizeof(MPI_Request) + sizeof(MPI_Status)));
|
||||
if (NULL == c_req){
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
|
@ -71,7 +71,7 @@ void mpi_testany_f(MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *index
|
||||
OMPI_LOGICAL_NAME_DECL(flag);
|
||||
OMPI_SINGLE_NAME_DECL(index);
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request));
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request));
|
||||
if (c_req == NULL) {
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
MPI_ERR_NO_MEM,
|
||||
|
@ -74,7 +74,7 @@ void mpi_testsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
|
||||
OMPI_SINGLE_NAME_DECL(outcount);
|
||||
OMPI_ARRAY_NAME_DECL(array_of_indices);
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*incount) *
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*incount) *
|
||||
(sizeof(MPI_Request) + sizeof(MPI_Status)));
|
||||
if (NULL == c_req) {
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
|
@ -73,7 +73,7 @@ void mpi_type_create_struct_f(MPI_Fint *count,
|
||||
int i;
|
||||
OMPI_ARRAY_NAME_DECL(array_of_block_lengths);
|
||||
|
||||
c_type_old_array = malloc(*count * sizeof(MPI_Datatype));
|
||||
c_type_old_array = (MPI_Datatype *) malloc(*count * sizeof(MPI_Datatype));
|
||||
if (NULL == c_type_old_array) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
FUNC_NAME);
|
||||
|
@ -75,7 +75,7 @@ void mpi_type_get_contents_f(MPI_Fint *mtype, MPI_Fint *max_integers,
|
||||
OMPI_ARRAY_NAME_DECL(array_of_integers);
|
||||
|
||||
if (*max_datatypes) {
|
||||
c_datatype_array = malloc(*max_datatypes * sizeof(MPI_Datatype));
|
||||
c_datatype_array = (MPI_Datatype *) malloc(*max_datatypes * sizeof(MPI_Datatype));
|
||||
if (NULL == c_datatype_array) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
FUNC_NAME);
|
||||
@ -84,7 +84,7 @@ void mpi_type_get_contents_f(MPI_Fint *mtype, MPI_Fint *max_integers,
|
||||
}
|
||||
|
||||
if (*max_addresses) {
|
||||
c_address_array = malloc(*max_addresses * sizeof(MPI_Aint));
|
||||
c_address_array = (MPI_Aint *) malloc(*max_addresses * sizeof(MPI_Aint));
|
||||
if (NULL == c_address_array) {
|
||||
if (NULL != c_datatype_array) {
|
||||
free(c_datatype_array);
|
||||
|
@ -72,7 +72,7 @@ void mpi_type_hindexed_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
|
||||
int i;
|
||||
OMPI_ARRAY_NAME_DECL(array_of_blocklengths);
|
||||
|
||||
c_disp_array = malloc(*count * sizeof(MPI_Aint));
|
||||
c_disp_array = (MPI_Aint *) malloc(*count * sizeof(MPI_Aint));
|
||||
if (NULL == c_disp_array) {
|
||||
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
FUNC_NAME);
|
||||
|
@ -73,7 +73,7 @@ void mpi_type_struct_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
|
||||
int i, c_err;
|
||||
OMPI_ARRAY_NAME_DECL(array_of_blocklengths);
|
||||
|
||||
c_type_old_array = malloc(*count * (sizeof(MPI_Datatype) +
|
||||
c_type_old_array = (MPI_Datatype *) malloc(*count * (sizeof(MPI_Datatype) +
|
||||
sizeof(MPI_Aint)));
|
||||
if (NULL == c_type_old_array) {
|
||||
c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
|
@ -70,7 +70,7 @@ void mpi_waitall_f(MPI_Fint *count, MPI_Fint *array_of_requests,
|
||||
MPI_Status *c_status;
|
||||
int i;
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*count) *
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) *
|
||||
(sizeof(MPI_Request) + sizeof(MPI_Status)));
|
||||
if (NULL == c_req) {
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
|
@ -71,7 +71,7 @@ void mpi_waitany_f(MPI_Fint *count, MPI_Fint *array_of_requests,
|
||||
int i, c_err;
|
||||
OMPI_SINGLE_NAME_DECL(index);
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request));
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*count) * sizeof(MPI_Request));
|
||||
if (NULL == c_req) {
|
||||
c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
|
||||
FUNC_NAME);
|
||||
|
@ -74,7 +74,7 @@ void mpi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
|
||||
OMPI_SINGLE_NAME_DECL(outcount);
|
||||
OMPI_ARRAY_NAME_DECL(array_of_indices);
|
||||
|
||||
c_req = malloc(OMPI_FINT_2_INT(*incount) *
|
||||
c_req = (MPI_Request *) malloc(OMPI_FINT_2_INT(*incount) *
|
||||
(sizeof(MPI_Request) + sizeof(MPI_Status)));
|
||||
if (NULL == c_req) {
|
||||
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
|
||||
|
Загрузка…
x
Ссылка в новой задаче
Block a user