MPI_DIST_GRAPH_NEIGHBORS_COUNT(3)
π NAME π
okay bestie, meet MPI_Dist_graph_neighbors_count β this is the Open MPI page for MPI_DIST_GRAPH_NEIGHBORS_COUNT(3), and she returns the number of in and out edges for the calling processes in a distributed graph topology, plus a flag indicating whether the distributed graph is weighted. slay. π
β¨ SYNTAX β¨
π§ C Syntax
#include <mpi.h>
int MPI_Dist_graph_neighbors_count(MPI_Comm comm, int *indegree,
int *outdegree, int *weighted)
π Fortran Syntax
USE MPI
! or the older form: INCLUDE 'mpif.h'
MPI_DIST_GRAPH_NEIGHBORS_COUNT(COMM, INDEGREE, OUTDEGREE, WEIGHTED, IERROR)
INTEGER COMM, INDEGREE, OUTDEGREE, IERROR
LOGICAL WEIGHTED
π¦ Fortran 2008 Syntax
USE mpi_f08
MPI_Dist_graph_neighbors_count(comm, indegree, outdegree, weighted, ierror)
TYPE(MPI_Comm), INTENT(IN) :: comm
INTEGER, INTENT(IN) :: indegree, outdegree
INTEGER, INTENT(OUT) :: weighted
INTEGER, OPTIONAL, INTENT(OUT) :: ierror
π«Ά INPUT PARAMETERS π«Ά
commβ communicator with distributed graph topology (handle). this is the main character of the input situation, no cap. π
πΈ OUTPUT PARAMETERS πΈ
indegreeβ number of edges into this process (non-negative integer). literally the βcome through, edgesβ count. πoutdegreeβ number of edges out of this process (non-negative integer). the βokay bye, edgesβ count. πweightedβ False ifMPI_UNWEIGHTEDwas supplied during creation, true otherwise (logical). so it's giving βwas this graph weighted or not?β energy. βοΈierrorβ Fortran only: error status (integer). π«‘
π DESCRIPTION π
so MPI_Dist_graph_neighbors_count and MPI_Graph_neighbors provide adjacency information for a distributed graph topology. MPI_Dist_graph_neighbors_count returns the number of sources and destinations for the calling process. that's the whole vibe, and honestly? iconic. β¨
π ERRORS π
okay so almost all MPI routines return an error value; C routines get it as the return result of the function, and Fortran routines get it in the last argument. periodt. π
Before the error value is returned, the current MPI error handler associated with the communication object (e.g., communicator, window, file) is called. If no communication object is associated with the MPI call, then the call is considered attached to MPI_COMM_SELF and will call the associated MPI error handler. When MPI_COMM_SELF is not initialized (i.e., before MPI_Init/MPI_Init_thread, after MPI_Finalize, or when using the Sessions Model exclusively) the error raises the initial error handler. The initial error handler can be changed by calling MPI_Comm_set_errhandler on MPI_COMM_SELF when using the World model, or the mpi_initial_errhandler CLI argument to mpiexec or info key to MPI_Comm_spawn/MPI_Comm_spawn_multiple. If no other appropriate error handler has been set, then the MPI_ERRORS_RETURN error handler is called for MPI I/O functions and the MPI_ERRORS_ABORT error handler is called for all other MPI functions. π«
Open MPI includes three predefined error handlers that can be used:
MPI_ERRORS_ARE_FATALβ Causes the program to abort all connected MPI processes. dramatic? yes. effective? also yes. πMPI_ERRORS_ABORTβ An error handler that can be invoked on a communicator, window, file, or session. When called on a communicator, it acts as ifMPI_Abortwas called on that communicator. If called on a window or file, acts as ifMPI_Abortwas called on a communicator containing the group of processes in the corresponding window or file. If called on a session, aborts only the local process.MPI_ERRORS_RETURNβ Returns an error code to the application. the βhand it back to youβ option. π«Ά
MPI applications can also implement their own error handlers by calling:
MPI_Comm_create_errhandlerthenMPI_Comm_set_errhandlerMPI_File_create_errhandlerthenMPI_File_set_errhandlerMPI_Session_create_errhandlerthenMPI_Session_set_errhandleror atMPI_Session_initMPI_Win_create_errhandlerthenMPI_Win_set_errhandler
Note that MPI does not guarantee that an MPI program can continue past an error. so likeβ¦ do not ignore this part, bestie. fr fr. π¨
See the MPI man page for a full list of MPI error codes.
See the Error Handling section of the MPI-3.1 standard for more information.
π SEE ALSO π
MPI_Dist_graph_neighborsβ the related bestie you should also go read. π«Ά
π COPYRIGHT π
2003-2026, The Open MPI Community
that's the page, bestie π«Ά β Open MPI source/version: 2003-2026, The Open MPI Community, dated Sep 11, 2026, for MPI_DIST_GRAPH_NEIGHBORS_COUNT(3). bye, love u, go read ur edges. π
π¦ where this page comes from
- arch rolling: openmpi 5.0.11-1 Β· BSD-3-Clause AND LicenseRef-MPICH
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms