Example #1
0
//Comm_size
//Returns the size of the group associated with a communicator.
func Comm_size(comm Comm) (int, int) {

	var size C.int
	err := C.MPI_Comm_size(C.MPI_Comm(comm), &size)

	return int(size), int(err)
}
Example #2
0
File: mpi.go Project: npadmana/mpi
// Size returns the MPI_Size
func Size(comm Comm) (int, error) {
	var r C.int
	perr := C.MPI_Comm_size(comm, &r)
	if perr != 0 {
		return -1, errors.New("Error calling MPI_Comm_size")
	}
	return int(r), nil
}
Example #3
0
File: mpi.go Project: adk9/go-mpi
func Comm_size(comm MPI_Comm) int {
	var size int
	C.MPI_Comm_size(comm, (*C.int)(unsafe.Pointer(&size)))
	return size
}
Example #4
0
File: mpi.go Project: rwl/mpi
func Comm_size(comm C.MPI_Comm) int {
	n := C.int(-1)
	C.MPI_Comm_size(comm, &n)
	return int(n)
}
Example #5
0
func Size() int {
	var size C.int
	C.MPI_Comm_size(COMM_WORLD, &size)
	return int(size)
}