1
1

The f2c interface of these routines have to do proper conversation of

fortran strings to c strings, else the name-publishing and name-lookup
and all subsequent calls (e.g. connect/accept) do not work with fortran.

This commit was SVN r9272.
Этот коммит содержится в:
Edgar Gabriel 2006-03-13 22:56:56 +00:00
родитель 11ebf40814
Коммит 073c6e6c32
8 изменённых файлов: 106 добавлений и 53 удалений

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_CLOSE_PORT = mpi_close_port_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_CLOSE_PORT,
pmpi_close_port_,
pmpi_close_port__,
pmpi_close_port_f,
(char *port_name, MPI_Fint *ierr),
(port_name, ierr) )
(char *port_name, MPI_Fint *ierr, int port_name_len),
(port_name, ierr, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_CLOSE_PORT,
mpi_close_port_,
mpi_close_port__,
mpi_close_port_f,
(char *port_name, MPI_Fint *ierr),
(port_name, ierr) )
(char *port_name, MPI_Fint *ierr, int port_name_len),
(port_name, ierr, port_name_len) )
#endif
@ -57,7 +58,11 @@ OMPI_GENERATE_F77_BINDINGS (MPI_CLOSE_PORT,
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_close_port_f(char *port_name, MPI_Fint *ierr)
void mpi_close_port_f(char *port_name, MPI_Fint *ierr, int port_name_len)
{
*ierr = OMPI_INT_2_FINT(MPI_Close_port(port_name));
char *c_port_name;
ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Close_port(c_port_name));
free ( c_port_name);
}

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_COMM_ACCEPT = mpi_comm_accept_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_COMM_ACCEPT,
pmpi_comm_accept_,
pmpi_comm_accept__,
pmpi_comm_accept_f,
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr),
(port_name, info, root, comm, newcomm, ierr) )
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len),
(port_name, info, root, comm, newcomm, ierr, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_ACCEPT,
mpi_comm_accept_,
mpi_comm_accept__,
mpi_comm_accept_f,
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr),
(port_name, info, root, comm, newcomm, ierr) )
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len),
(port_name, info, root, comm, newcomm, ierr, port_name_len) )
#endif
@ -58,18 +59,23 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_ACCEPT,
#endif
void mpi_comm_accept_f(char *port_name, MPI_Fint *info, MPI_Fint *root,
MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr)
MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr,
int port_name_len)
{
MPI_Comm c_comm, c_new_comm;
MPI_Info c_info;
char *c_port_name;
c_comm = MPI_Comm_f2c(*comm);
c_info = MPI_Info_f2c(*info);
ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Comm_accept(port_name, c_info,
*ierr = OMPI_INT_2_FINT(MPI_Comm_accept(c_port_name, c_info,
OMPI_FINT_2_INT(*root),
c_comm, &c_new_comm));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*newcomm = MPI_Comm_c2f(c_new_comm);
}
free ( c_port_name );
}

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_COMM_CONNECT = mpi_comm_connect_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_COMM_CONNECT,
pmpi_comm_connect_,
pmpi_comm_connect__,
pmpi_comm_connect_f,
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr),
(port_name, info, root, comm, newcomm, ierr) )
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len),
(port_name, info, root, comm, newcomm, ierr, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CONNECT,
mpi_comm_connect_,
mpi_comm_connect__,
mpi_comm_connect_f,
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr),
(port_name, info, root, comm, newcomm, ierr) )
(char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len),
(port_name, info, root, comm, newcomm, ierr, port_name_len) )
#endif
@ -59,19 +60,23 @@ OMPI_GENERATE_F77_BINDINGS (MPI_COMM_CONNECT,
void mpi_comm_connect_f(char *port_name, MPI_Fint *info,
MPI_Fint *root, MPI_Fint *comm,
MPI_Fint *newcomm, MPI_Fint *ierr)
MPI_Fint *newcomm, MPI_Fint *ierr,
int port_name_len)
{
MPI_Comm c_comm, c_new_comm;
MPI_Info c_info;
char *c_port_name;
c_comm = MPI_Comm_f2c(*comm);
c_info = MPI_Info_f2c(*info);
ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Comm_connect(port_name, c_info,
*ierr = OMPI_INT_2_FINT(MPI_Comm_connect(c_port_name, c_info,
OMPI_FINT_2_INT(*root),
c_comm, &c_new_comm));
if (MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
*newcomm = MPI_Comm_c2f(c_new_comm);
}
free ( c_port_name );
}

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_LOOKUP_NAME = mpi_lookup_name_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_LOOKUP_NAME,
pmpi_lookup_name_,
pmpi_lookup_name__,
pmpi_lookup_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_LOOKUP_NAME,
mpi_lookup_name_,
mpi_lookup_name__,
mpi_lookup_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
@ -58,12 +59,26 @@ OMPI_GENERATE_F77_BINDINGS (MPI_LOOKUP_NAME,
#endif
void mpi_lookup_name_f(char *service_name, MPI_Fint *info,
char *port_name, MPI_Fint *ierr)
char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len)
{
MPI_Info c_info;
char *c_service_name;
char *c_port_name;
c_info = MPI_Info_f2c(*info);
*ierr = OMPI_INT_2_FINT(MPI_Lookup_name(service_name, c_info,
port_name));
ompi_fortran_string_f2c(service_name, service_name_len, &c_service_name);
c_port_name = (char *) malloc (port_name_len+1);
if ( NULL == c_port_name ) {
*ierr = MPI_ERR_OTHER;
return;
}
*ierr = OMPI_INT_2_FINT(MPI_Lookup_name(c_service_name, c_info,
c_port_name));
if ( MPI_SUCCESS == OMPI_FINT_2_INT(*ierr)) {
ompi_fortran_string_c2f(c_port_name, port_name, port_name_len);
}
free (c_service_name);
free (c_port_name);
}

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_OPEN_PORT = mpi_open_port_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_OPEN_PORT,
pmpi_open_port_,
pmpi_open_port__,
pmpi_open_port_f,
(MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(info, port_name, ierr) )
(MPI_Fint *info, char *port_name, MPI_Fint *ierr, int port_name_len),
(info, port_name, ierr, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_OPEN_PORT,
mpi_open_port_,
mpi_open_port__,
mpi_open_port_f,
(MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(info, port_name, ierr) )
(MPI_Fint *info, char *port_name, MPI_Fint *ierr, int port_name_len),
(info, port_name, ierr, port_name_len) )
#endif
@ -57,11 +58,16 @@ OMPI_GENERATE_F77_BINDINGS (MPI_OPEN_PORT,
#include "ompi/mpi/f77/profile/defines.h"
#endif
void mpi_open_port_f(MPI_Fint *info, char *port_name, MPI_Fint *ierr)
void mpi_open_port_f(MPI_Fint *info, char *port_name, MPI_Fint *ierr, int port_name_len)
{
MPI_Info c_info;
char c_port_name[MPI_MAX_PORT_NAME];
c_info = MPI_Info_f2c(*info);
*ierr = OMPI_INT_2_FINT(MPI_Open_port(c_info, port_name));
*ierr = OMPI_INT_2_FINT(MPI_Open_port(c_info, c_port_name));
if ( MPI_SUCCESS == OMPI_FINT_2_INT (*ierr )) {
ompi_fortran_string_c2f(c_port_name, port_name, port_name_len );
}
}

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

@ -85,11 +85,11 @@ PN(void, mpi_cart_rank, MPI_CART_RANK, (MPI_Fint *comm, MPI_Fint *coords, MPI_Fi
PN(void, mpi_cart_shift, MPI_CART_SHIFT, (MPI_Fint *comm, MPI_Fint *direction, MPI_Fint *disp, MPI_Fint *rank_source, MPI_Fint *rank_dest, MPI_Fint *ierr));
PN(void, mpi_cart_sub, MPI_CART_SUB, (MPI_Fint *comm, MPI_Flogical *remain_dims, MPI_Fint *new_comm, MPI_Fint *ierr));
PN(void, mpi_cartdim_get, MPI_CARTDIM_GET, (MPI_Fint *comm, MPI_Fint *ndims, MPI_Fint *ierr));
PN(void, mpi_close_port, MPI_CLOSE_PORT, (char *port_name, MPI_Fint *ierr));
PN(void, mpi_comm_accept, MPI_COMM_ACCEPT, (char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr));
PN(void, mpi_close_port, MPI_CLOSE_PORT, (char *port_name, MPI_Fint *ierr, int port_name_len));
PN(void, mpi_comm_accept, MPI_COMM_ACCEPT, (char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len));
PN(void, mpi_comm_call_errhandler, MPI_COMM_CALL_ERRHANDLER, (MPI_Fint *comm, MPI_Fint *errorcode, MPI_Fint *ierr));
PN(void, mpi_comm_compare, MPI_COMM_COMPARE, (MPI_Fint *comm1, MPI_Fint *comm2, MPI_Fint *result, MPI_Fint *ierr));
PN(void, mpi_comm_connect, MPI_COMM_CONNECT, (char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr));
PN(void, mpi_comm_connect, MPI_COMM_CONNECT, (char *port_name, MPI_Fint *info, MPI_Fint *root, MPI_Fint *comm, MPI_Fint *newcomm, MPI_Fint *ierr, int port_name_len));
PN(void, mpi_comm_create_errhandler, MPI_COMM_CREATE_ERRHANDLER, (ompi_errhandler_fortran_handler_fn_t* function, MPI_Fint *errhandler, MPI_Fint *ierr));
PN(void, mpi_comm_create_keyval, MPI_COMM_CREATE_KEYVAL, (ompi_mpi2_fortran_copy_attr_function* comm_copy_attr_fn, ompi_mpi2_fortran_delete_attr_function* comm_delete_attr_fn, MPI_Fint *comm_keyval, MPI_Fint *extra_state, MPI_Fint *ierr));
PN(void, mpi_comm_create, MPI_COMM_CREATE, (MPI_Fint *comm, MPI_Fint *group, MPI_Fint *newcomm, MPI_Fint *ierr));
@ -232,9 +232,9 @@ PN(void, mpi_issend, MPI_ISSEND, (char *buf, MPI_Fint *count, MPI_Fint *datatype
PN(void, mpi_is_thread_main, MPI_IS_THREAD_MAIN, (MPI_Flogical *flag, MPI_Fint *ierr));
PN(void, mpi_keyval_create, MPI_KEYVAL_CREATE, (ompi_mpi1_fortran_copy_attr_function* copy_fn, ompi_mpi1_fortran_delete_attr_function* delete_fn, MPI_Fint *keyval, MPI_Fint *extra_state, MPI_Fint *ierr));
PN(void, mpi_keyval_free, MPI_KEYVAL_FREE, (MPI_Fint *keyval, MPI_Fint *ierr));
PN(void, mpi_lookup_name, MPI_LOOKUP_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr));
PN(void, mpi_lookup_name, MPI_LOOKUP_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len));
PN(void, mpi_op_create, MPI_OP_CREATE, (ompi_op_fortran_handler_fn_t* function, MPI_Flogical *commute, MPI_Fint *op, MPI_Fint *ierr));
PN(void, mpi_open_port, MPI_OPEN_PORT, (MPI_Fint *info, char *port_name, MPI_Fint *ierr));
PN(void, mpi_open_port, MPI_OPEN_PORT, (MPI_Fint *info, char *port_name, MPI_Fint *ierr, int port_name_len));
PN(void, mpi_op_free, MPI_OP_FREE, (MPI_Fint *op, MPI_Fint *ierr));
PN(void, mpi_pack_external, MPI_PACK_EXTERNAL, (char *datarep, char *inbuf, MPI_Fint *incount, MPI_Fint *datatype, char *outbuf, MPI_Fint *outsize, MPI_Fint *position, MPI_Fint *ierr));
PN(void, mpi_pack_external_size, MPI_PACK_EXTERNAL_SIZE, (char *datarep, MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *size, MPI_Fint *ierr));
@ -242,7 +242,7 @@ PN(void, mpi_pack, MPI_PACK, (char *inbuf, MPI_Fint *incount, MPI_Fint *datatype
PN(void, mpi_pack_size, MPI_PACK_SIZE, (MPI_Fint *incount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *size, MPI_Fint *ierr));
PN(void, mpi_pcontrol, MPI_PCONTROL, (MPI_Fint *level));
PN(void, mpi_probe, MPI_PROBE, (MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *status, MPI_Fint *ierr));
PN(void, mpi_publish_name, MPI_PUBLISH_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr));
PN(void, mpi_publish_name, MPI_PUBLISH_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len));
PN(void, mpi_put, MPI_PUT, (char *origin_addr, MPI_Fint *origin_count, MPI_Fint *origin_datatype, MPI_Fint *target_rank, MPI_Fint *target_disp, MPI_Fint *target_count, MPI_Fint *target_datatype, MPI_Fint *win, MPI_Fint *ierr));
PN(void, mpi_query_thread, MPI_QUERY_THREAD, (MPI_Fint *provided, MPI_Fint *ierr));
PN(void, mpi_recv_init, MPI_RECV_INIT, (char *buf, MPI_Fint *count, MPI_Fint *datatype, MPI_Fint *source, MPI_Fint *tag, MPI_Fint *comm, MPI_Fint *request, MPI_Fint *ierr));
@ -309,7 +309,7 @@ PN(void, mpi_type_struct, MPI_TYPE_STRUCT, (MPI_Fint *count, MPI_Fint *array_of_
PN(void, mpi_type_ub, MPI_TYPE_UB, (MPI_Fint *mtype, MPI_Fint *ub, MPI_Fint *ierr));
PN(void, mpi_type_vector, MPI_TYPE_VECTOR, (MPI_Fint *count, MPI_Fint *blocklength, MPI_Fint *stride, MPI_Fint *oldtype, MPI_Fint *newtype, MPI_Fint *ierr));
PN(void, mpi_unpack, MPI_UNPACK, (char *inbuf, MPI_Fint *insize, MPI_Fint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *comm, MPI_Fint *ierr));
PN(void, mpi_unpublish_name, MPI_UNPUBLISH_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr));
PN(void, mpi_unpublish_name, MPI_UNPUBLISH_NAME, (char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len));
PN(void, mpi_unpack_external, MPI_UNPACK_EXTERNAL, (char *datarep, char *inbuf, MPI_Fint *insize, MPI_Fint *position, char *outbuf, MPI_Fint *outcount, MPI_Fint *datatype, MPI_Fint *ierr));
PN(void, mpi_waitall, MPI_WAITALL, (MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *array_of_statuses, MPI_Fint *ierr));
PN(void, mpi_waitany, MPI_WAITANY, (MPI_Fint *count, MPI_Fint *array_of_requests, MPI_Fint *index, MPI_Fint *status, MPI_Fint *ierr));

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_PUBLISH_NAME = mpi_publish_name_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_PUBLISH_NAME,
pmpi_publish_name_,
pmpi_publish_name__,
pmpi_publish_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PUBLISH_NAME,
mpi_publish_name_,
mpi_publish_name__,
mpi_publish_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
@ -58,12 +59,18 @@ OMPI_GENERATE_F77_BINDINGS (MPI_PUBLISH_NAME,
#endif
void mpi_publish_name_f(char *service_name, MPI_Fint *info,
char *port_name, MPI_Fint *ierr)
char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len)
{
MPI_Info c_info;
char *c_service_name;
char *c_port_name;
c_info = MPI_Info_f2c(*info);
ompi_fortran_string_f2c(service_name, service_name_len, &c_service_name);
ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Publish_name(service_name, c_info,
port_name));
*ierr = OMPI_INT_2_FINT(MPI_Publish_name(c_service_name, c_info,
c_port_name));
free ( c_service_name);
free ( c_port_name);
}

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

@ -19,6 +19,7 @@
#include "ompi_config.h"
#include "ompi/mpi/f77/bindings.h"
#include "ompi/mpi/f77/strings.h"
#if OMPI_HAVE_WEAK_SYMBOLS && OMPI_PROFILE_LAYER
#pragma weak PMPI_UNPUBLISH_NAME = mpi_unpublish_name_f
@ -31,8 +32,8 @@ OMPI_GENERATE_F77_BINDINGS (PMPI_UNPUBLISH_NAME,
pmpi_unpublish_name_,
pmpi_unpublish_name__,
pmpi_unpublish_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
#if OMPI_HAVE_WEAK_SYMBOLS
@ -48,8 +49,8 @@ OMPI_GENERATE_F77_BINDINGS (MPI_UNPUBLISH_NAME,
mpi_unpublish_name_,
mpi_unpublish_name__,
mpi_unpublish_name_f,
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr),
(service_name, info, port_name, ierr) )
(char *service_name, MPI_Fint *info, char *port_name, MPI_Fint *ierr, int service_name_len, int port_name_len),
(service_name, info, port_name, ierr, service_name_len, port_name_len) )
#endif
@ -58,12 +59,20 @@ OMPI_GENERATE_F77_BINDINGS (MPI_UNPUBLISH_NAME,
#endif
void mpi_unpublish_name_f(char *service_name, MPI_Fint *info,
char *port_name, MPI_Fint *ierr)
char *port_name, MPI_Fint *ierr,
int service_name_len, int port_name_len)
{
MPI_Info c_info;
char *c_service_name;
char *c_port_name;
c_info = MPI_Info_f2c(*info);
ompi_fortran_string_f2c(service_name, service_name_len, &c_service_name);
ompi_fortran_string_f2c(port_name, port_name_len, &c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Unpublish_name(c_service_name, c_info,
c_port_name));
free ( c_service_name);
free ( c_port_name);
*ierr = OMPI_INT_2_FINT(MPI_Unpublish_name(service_name, c_info,
port_name));
}