-void mpi_testsome_ (int* incount, int* requests, int* outcount, int* indices, MPI_Status* statuses, int* ierr) {
- MPI_Request* reqs;
- int i;
-
- reqs = xbt_new(MPI_Request, *incount);
- for(i = 0; i < *incount; i++) {
- reqs[i] = simgrid::smpi::Request::f2c(requests[i]);
- indices[i]=0;
- }
- *ierr = MPI_Testsome(*incount, reqs, outcount, indices, FORT_STATUSES_IGNORE(statuses));
- for(i=0;i<*incount;i++){
- if(indices[i] && reqs[indices[i]]==MPI_REQUEST_NULL){
- simgrid::smpi::Request::free_f(requests[indices[i]]);
- requests[indices[i]]=MPI_FORTRAN_REQUEST_NULL;
- }
- }
- xbt_free(reqs);
-}
-
-void mpi_comm_test_inter_ (int* comm, int* flag, int* ierr) {
- *ierr = MPI_Comm_test_inter(simgrid::smpi::Comm::f2c(*comm), flag);
-}
-
-void mpi_unpack_ (void* inbuf, int* insize, int* position, void* outbuf, int* outcount, int* type, int* comm,
- int* ierr) {
- *ierr = MPI_Unpack(inbuf, *insize, position, outbuf, *outcount, simgrid::smpi::Datatype::f2c(*type), simgrid::smpi::Comm::f2c(*comm));
-}
-
-void mpi_pack_external_size_ (char *datarep, int* incount, int* datatype, MPI_Aint *size, int* ierr){
- *ierr = MPI_Pack_external_size(datarep, *incount, simgrid::smpi::Datatype::f2c(*datatype), size);
-}
-
-void mpi_pack_external_ (char *datarep, void *inbuf, int* incount, int* datatype, void *outbuf, MPI_Aint* outcount,
- MPI_Aint *position, int* ierr){
- *ierr = MPI_Pack_external(datarep, inbuf, *incount, simgrid::smpi::Datatype::f2c(*datatype), outbuf, *outcount, position);
-}
-
-void mpi_unpack_external_ ( char *datarep, void *inbuf, MPI_Aint* insize, MPI_Aint *position, void *outbuf,
- int* outcount, int* datatype, int* ierr){
- *ierr = MPI_Unpack_external( datarep, inbuf, *insize, position, outbuf, *outcount, simgrid::smpi::Datatype::f2c(*datatype));
-}
-
-void mpi_type_hindexed_ (int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr) {
- MPI_Datatype tmp;
- *ierr = MPI_Type_hindexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
-}
-
-void mpi_type_create_hindexed_(int* count, int* blocklens, MPI_Aint* indices, int* old_type, int* newtype, int* ierr){
- MPI_Datatype tmp;
- *ierr = MPI_Type_create_hindexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
-}
-
-void mpi_type_create_hindexed_block_ (int* count, int* blocklength, MPI_Aint* indices, int* old_type, int* newtype,
- int* ierr) {
- MPI_Datatype tmp;
- *ierr = MPI_Type_create_hindexed_block(*count, *blocklength, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
-}
-
-void mpi_type_indexed_ (int* count, int* blocklens, int* indices, int* old_type, int* newtype, int* ierr) {
- MPI_Datatype tmp;
- *ierr = MPI_Type_indexed(*count, blocklens, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
-}
-
-void mpi_type_create_indexed_block_ (int* count, int* blocklength, int* indices, int* old_type, int*newtype,
- int* ierr){
- MPI_Datatype tmp;
- *ierr = MPI_Type_create_indexed_block(*count, *blocklength, indices, simgrid::smpi::Datatype::f2c(*old_type), &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
-}
-
-void mpi_type_struct_ (int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr) {
- MPI_Datatype tmp;
- int i=0;
- MPI_Datatype* types = static_cast<MPI_Datatype*>(xbt_malloc(*count*sizeof(MPI_Datatype)));
- for(i=0; i< *count; i++){
- types[i] = simgrid::smpi::Datatype::f2c(old_types[i]);
- }
- *ierr = MPI_Type_struct(*count, blocklens, indices, types, &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
- xbt_free(types);
-}
-
-void mpi_type_create_struct_(int* count, int* blocklens, MPI_Aint* indices, int* old_types, int* newtype, int* ierr){
- MPI_Datatype tmp;
- int i=0;
- MPI_Datatype* types = static_cast<MPI_Datatype*>(xbt_malloc(*count*sizeof(MPI_Datatype)));
- for(i=0; i< *count; i++){
- types[i] = simgrid::smpi::Datatype::f2c(old_types[i]);
- }
- *ierr = MPI_Type_create_struct(*count, blocklens, indices, types, &tmp);
- if(*ierr == MPI_SUCCESS) {
- *newtype = tmp->add_f();
- }
- xbt_free(types);
-}
-
-void mpi_ssend_ (void* buf, int* count, int* datatype, int* dest, int* tag, int* comm, int* ierr) {
- *ierr = MPI_Ssend(buf, *count, simgrid::smpi::Datatype::f2c(*datatype), *dest, *tag, simgrid::smpi::Comm::f2c(*comm));
-}