1
1

Type casts for building dynamical Fortran libraries.

And export correct function names.

This commit was SVN r23020.
Этот коммит содержится в:
Shiqing Fan 2010-04-22 15:48:27 +00:00
родитель 668c1c7f17
Коммит 077f6e6398
30 изменённых файлов: 65 добавлений и 61 удалений

Просмотреть файл

@ -102,9 +102,9 @@ MACRO(OMPI_F77_FIND_EXT_SYMBOL_CONVENTION)
FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt FILE(WRITE ${CMAKE_BINARY_DIR}${CMAKE_FILES_DIRECTORY}/CMakeTmp/CMakeLists.txt
"CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)\n" "CMAKE_MINIMUM_REQUIRED(VERSION 2.4.6 FATAL_ERROR)\n"
"PROJECT(conftest_c C)\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" " 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" "ADD_EXECUTABLE(conftest_c conftest_c.c)\n"
"TARGET_LINK_LIBRARIES(conftest_c ${OUTPUT_OBJ_FILE})\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_sendtype = MPI_Type_f2c(*sendtype);
c_recvtype = MPI_Type_f2c(*recvtype); c_recvtype = MPI_Type_f2c(*recvtype);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Allgather(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Allgather(sendbuf,
OMPI_FINT_2_INT(*sendcount), 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(recvcounts, size);
OMPI_ARRAY_FINT_2_INT(displs, size); OMPI_ARRAY_FINT_2_INT(displs, size);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Allgatherv(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Allgatherv(sendbuf,
OMPI_FINT_2_INT(*sendcount), 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_type = MPI_Type_f2c(*datatype);
c_op = MPI_Op_f2c(*op); c_op = MPI_Op_f2c(*op);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Allreduce(sendbuf, recvbuf, *ierr = OMPI_INT_2_FINT(MPI_Allreduce(sendbuf, recvbuf,
OMPI_FINT_2_INT(*count), 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_sendtype = MPI_Type_f2c(*sendtype);
c_recvtype = MPI_Type_f2c(*recvtype); c_recvtype = MPI_Type_f2c(*recvtype);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Alltoall(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Alltoall(sendbuf,
OMPI_FINT_2_INT(*sendcount), 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(recvcounts, size);
OMPI_ARRAY_FINT_2_INT(rdispls, size); OMPI_ARRAY_FINT_2_INT(rdispls, size);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Alltoallv(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Alltoallv(sendbuf,
OMPI_ARRAY_NAME_CONVERT(sendcounts), OMPI_ARRAY_NAME_CONVERT(sendcounts),

Просмотреть файл

@ -75,8 +75,8 @@ void mpi_alltoallw_f(char *sendbuf, MPI_Fint *sendcounts,
c_comm = MPI_Comm_f2c(*comm); c_comm = MPI_Comm_f2c(*comm);
MPI_Comm_size(c_comm, &size); MPI_Comm_size(c_comm, &size);
c_sendtypes = malloc(size * sizeof(MPI_Datatype)); c_sendtypes = (MPI_Datatype *) malloc(size * sizeof(MPI_Datatype));
c_recvtypes = 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(sendcounts, size);
OMPI_ARRAY_FINT_2_INT(sdispls, 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 */ /* Alltoallw does not support MPI_IN_PLACE */
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Alltoallw(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Alltoallw(sendbuf,
OMPI_ARRAY_NAME_CONVERT(sendcounts), 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); 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) { for (i = 0; i < array_size; ++i) {
c_info[i] = MPI_Info_f2c(array_info[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); c_op = MPI_Op_f2c(*op);
/* MPI_IN_PLACE is not supported */ /* MPI_IN_PLACE is not supported */
sendbuf = OMPI_F2C_BOTTOM (sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM (sendbuf);
recvbuf = OMPI_F2C_BOTTOM (recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM (recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Exscan(sendbuf, recvbuf, *ierr = OMPI_INT_2_FINT(MPI_Exscan(sendbuf, recvbuf,
OMPI_FINT_2_INT(*count), 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_sendtype = MPI_Type_f2c(*sendtype);
c_recvtype = MPI_Type_f2c(*recvtype); c_recvtype = MPI_Type_f2c(*recvtype);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount), *ierr = OMPI_INT_2_FINT(MPI_Gather(sendbuf, OMPI_FINT_2_INT(*sendcount),
c_sendtype, recvbuf, 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(recvcounts, size);
OMPI_ARRAY_FINT_2_INT(displs, size); OMPI_ARRAY_FINT_2_INT(displs, size);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Gatherv(sendbuf, OMPI_FINT_2_INT(*sendcount), *ierr = OMPI_INT_2_FINT(MPI_Gatherv(sendbuf, OMPI_FINT_2_INT(*sendcount),
c_sendtype, recvbuf, c_sendtype, recvbuf,

Просмотреть файл

@ -49,6 +49,8 @@
#include "ompi/request/grequest.h" #include "ompi/request/grequest.h"
#include "ompi/mpi/f77/datarep.h" #include "ompi/mpi/f77/datarep.h"
BEGIN_C_DECLS
/* These are the prototypes for the "real" back-end fortran functions. */ /* These are the prototypes for the "real" back-end fortran functions. */
#define PN(ret, lower_name, upper_name, args) \ #define PN(ret, lower_name, upper_name, args) \
OMPI_DECLSPEC ret lower_name##_f 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_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)); 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 #endif

Просмотреть файл

@ -70,9 +70,9 @@ void mpi_reduce_f(char *sendbuf, char *recvbuf, MPI_Fint *count,
c_op = MPI_Op_f2c(*op); c_op = MPI_Op_f2c(*op);
c_comm = MPI_Comm_f2c(*comm); c_comm = MPI_Comm_f2c(*comm);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Reduce(sendbuf, recvbuf, *ierr = OMPI_INT_2_FINT(MPI_Reduce(sendbuf, recvbuf,
OMPI_FINT_2_INT(*count), 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_type = MPI_Type_f2c(*datatype);
c_op = MPI_Op_f2c(*op); c_op = MPI_Op_f2c(*op);
inbuf = OMPI_F2C_BOTTOM(inbuf); inbuf = (char *) OMPI_F2C_BOTTOM(inbuf);
inoutbuf = OMPI_F2C_BOTTOM(inoutbuf); inoutbuf = (char *) OMPI_F2C_BOTTOM(inoutbuf);
*ierr = OMPI_INT_2_FINT(MPI_Reduce_local(inbuf, inoutbuf, *ierr = OMPI_INT_2_FINT(MPI_Reduce_local(inbuf, inoutbuf,
OMPI_FINT_2_INT(*count), OMPI_FINT_2_INT(*count),

Просмотреть файл

@ -75,9 +75,9 @@ void mpi_reduce_scatter_f(char *sendbuf, char *recvbuf,
MPI_Comm_size(c_comm, &size); MPI_Comm_size(c_comm, &size);
OMPI_ARRAY_FINT_2_INT(recvcounts, size); OMPI_ARRAY_FINT_2_INT(recvcounts, size);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Reduce_scatter(sendbuf, recvbuf, *ierr = OMPI_INT_2_FINT(MPI_Reduce_scatter(sendbuf, recvbuf,
OMPI_ARRAY_NAME_CONVERT(recvcounts), 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 *intercept_data =
(intercept_extra_state_t*) extra_state; (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, &position, intercept_data->extra_state_f77,
&ierr); &ierr);
return OMPI_FINT_2_INT(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 *intercept_data =
(intercept_extra_state_t*) extra_state; (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, &position, intercept_data->extra_state_f77,
&ierr); &ierr);
return OMPI_FINT_2_INT(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_op = MPI_Op_f2c(*op);
c_comm = MPI_Comm_f2c(*comm); c_comm = MPI_Comm_f2c(*comm);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Scan(sendbuf, recvbuf, *ierr = OMPI_INT_2_FINT(MPI_Scan(sendbuf, recvbuf,
OMPI_FINT_2_INT(*count), 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_sendtype = MPI_Type_f2c(*sendtype);
c_recvtype = MPI_Type_f2c(*recvtype); c_recvtype = MPI_Type_f2c(*recvtype);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount), *ierr = OMPI_INT_2_FINT(MPI_Scatter(sendbuf,OMPI_FINT_2_INT(*sendcount),
c_sendtype, recvbuf, 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(sendcounts, size);
OMPI_ARRAY_FINT_2_INT(displs, size); OMPI_ARRAY_FINT_2_INT(displs, size);
sendbuf = OMPI_F2C_IN_PLACE(sendbuf); sendbuf = (char *) OMPI_F2C_IN_PLACE(sendbuf);
sendbuf = OMPI_F2C_BOTTOM(sendbuf); sendbuf = (char *) OMPI_F2C_BOTTOM(sendbuf);
recvbuf = OMPI_F2C_BOTTOM(recvbuf); recvbuf = (char *) OMPI_F2C_BOTTOM(recvbuf);
*ierr = OMPI_INT_2_FINT(MPI_Scatterv(sendbuf, *ierr = OMPI_INT_2_FINT(MPI_Scatterv(sendbuf,
OMPI_ARRAY_NAME_CONVERT(sendcounts), 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; MPI_Request *c_req;
int i; int i;
c_req = malloc(*count * sizeof(MPI_Request)); c_req = (MPI_Request *) malloc(*count * sizeof(MPI_Request));
if (NULL == c_req) { if (NULL == c_req) {
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, *ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
FUNC_NAME); FUNC_NAME);

Просмотреть файл

@ -69,7 +69,7 @@ void mpi_testall_f(MPI_Fint *count, MPI_Fint *array_of_requests, ompi_fortran_lo
int i; int i;
OMPI_LOGICAL_NAME_DECL(flag); 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))); (sizeof(MPI_Request) + sizeof(MPI_Status)));
if (NULL == c_req){ if (NULL == c_req){
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, *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_LOGICAL_NAME_DECL(flag);
OMPI_SINGLE_NAME_DECL(index); 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) { if (c_req == NULL) {
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, *ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,
MPI_ERR_NO_MEM, 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_SINGLE_NAME_DECL(outcount);
OMPI_ARRAY_NAME_DECL(array_of_indices); 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))); (sizeof(MPI_Request) + sizeof(MPI_Status)));
if (NULL == c_req) { if (NULL == c_req) {
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, *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; int i;
OMPI_ARRAY_NAME_DECL(array_of_block_lengths); 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) { if (NULL == c_type_old_array) {
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, *ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
FUNC_NAME); 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); OMPI_ARRAY_NAME_DECL(array_of_integers);
if (*max_datatypes) { 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) { if (NULL == c_datatype_array) {
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, *ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
FUNC_NAME); FUNC_NAME);
@ -84,7 +84,7 @@ void mpi_type_get_contents_f(MPI_Fint *mtype, MPI_Fint *max_integers,
} }
if (*max_addresses) { 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_address_array) {
if (NULL != c_datatype_array) { if (NULL != c_datatype_array) {
free(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; int i;
OMPI_ARRAY_NAME_DECL(array_of_blocklengths); 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) { if (NULL == c_disp_array) {
*ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, *ierr = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
FUNC_NAME); FUNC_NAME);

Просмотреть файл

@ -73,7 +73,7 @@ void mpi_type_struct_f(MPI_Fint *count, MPI_Fint *array_of_blocklengths,
int i, c_err; int i, c_err;
OMPI_ARRAY_NAME_DECL(array_of_blocklengths); 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))); sizeof(MPI_Aint)));
if (NULL == c_type_old_array) { if (NULL == c_type_old_array) {
c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, 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; MPI_Status *c_status;
int i; 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))); (sizeof(MPI_Request) + sizeof(MPI_Status)));
if (NULL == c_req) { if (NULL == c_req) {
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, *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; int i, c_err;
OMPI_SINGLE_NAME_DECL(index); 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) { if (NULL == c_req) {
c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM, c_err = OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, MPI_ERR_NO_MEM,
FUNC_NAME); FUNC_NAME);

Просмотреть файл

@ -74,7 +74,7 @@ void mpi_waitsome_f(MPI_Fint *incount, MPI_Fint *array_of_requests,
OMPI_SINGLE_NAME_DECL(outcount); OMPI_SINGLE_NAME_DECL(outcount);
OMPI_ARRAY_NAME_DECL(array_of_indices); 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))); (sizeof(MPI_Request) + sizeof(MPI_Status)));
if (NULL == c_req) { if (NULL == c_req) {
*ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD, *ierr = OMPI_INT_2_FINT(OMPI_ERRHANDLER_INVOKE(MPI_COMM_WORLD,