void mpi_comm_get_name_ (int* comm, char* name, int* len, int* ierr){
*ierr = MPI_Comm_get_name(simgrid::smpi::Comm::f2c(*comm), name, len);
- if(*len>0)
- for(int i = *len; i<MPI_MAX_OBJECT_NAME+1; i++)
- name[i]=' ';
+ for(int i = *len; i<MPI_MAX_OBJECT_NAME+1; i++)
+ name[i]=' ';
}
void mpi_comm_compare_ (int* comm1, int* comm2, int *result, int* ierr){
void mpi_type_get_name_ (int* datatype, char * name, int* len, int* ierr){
*ierr = MPI_Type_get_name(simgrid::smpi::Datatype::f2c(*datatype),name,len);
- if(*len>0)
- name[*len]=' ';
+ for(int i = *len; i<MPI_MAX_OBJECT_NAME+1; i++)
+ name[i]=' ';
}
void mpi_type_get_attr_ (int* type, int* type_keyval, int *attribute_val, int* flag, int* ierr){
}
void Datatype::get_name(char* name, int* length){
- *length = strlen(name_);
- strncpy(name, name_, *length+1);
+ if(name_!=nullptr){
+ *length = strlen(name_);
+ strncpy(name, name_, *length+1);
+ }else{
+ *length = 0;
+ }
}
void Datatype::set_name(const char* name){
#typenamef 1
#typename3f 1 mpiversion=3.0
-#typesnamef 1
+typesnamef 1
#typecntsf 1
#typem2f 1
typesubf 1
include_directories(BEFORE "${CMAKE_HOME_DIRECTORY}/include/smpi")
- foreach(test gaddressf90
+ foreach(test gaddressf90 typesnamef90 structf
# allctypesf90 createf90 get_elem_d get_elem_u
# hindex1f90 hindexed_blockf90
indtype kinds
- # packef90 sizeof structf trf90 typecntsf90 typem2f90 typename3f90
- # typenamef90 typesnamef90
+ # packef90 sizeof trf90 typecntsf90 typem2f90 typename3f90
+ # typenamef90
typesubf90)
add_executable(${test} EXCLUDE_FROM_ALL ${test}.f90)
add_dependencies(tests ${test})
! for MPICH, and to fit in the MPICH test harness - WDG
!
program bustit
- implicit none
use mpi
+ implicit none
+
integer comm
integer newtype
# This file generated by f77tof90
#typenamef90 1
#typename3f90 1 mpiversion=3.0
-#typesnamef90 1
+typesnamef90 1
#typecntsf90 1
#typem2f90 1
typesubf90 1