The code used to develop this information will be probably be hosted somewhere in GitHub.
This task is taking me a little while to figure out.
https://mpi4py.scipy.org/docs/usrman/tutorial.html#compute-pi
Spawning a binary from within MPI4PY is a somewhat difficult task, but necessary when doing certain types of calculations.
$VASP_BIN=vasp_std
$MPI4PY_MPI_SO=MPI.so
ldd $VASP_BIN
ldd $MPI4PY_MPI_SO
check to see that the shared libraries match
import sys
from mpi4py import MPI
assert MPI.COMM_WORLD.Get_size() == 1
nvprof = 'nvprof'
program = './myprogram'
nprocs = 8
command, args = [], []
for i in range(nprocs):
command.append(nvprof)
args.append([program, '-o', 'outfile.%d.log' % i])
MPI.COMM_WORLD.Spawn_multiple(command, args).Free()
MPI_BCAST
MPI_BCAST(BUFFER, COUNT, DATATYPE, ROOT, COMM, IERROR)
F90 MPI DataType F90 Meaning C MPI DataType C Meaning ---------------- --------------- -------------- --------------- MPI_INTEGER INTEGER MPI_INT (signed) int MPI_REAL REAL MPI_FLOAT float MPI_DOUBLE_PRECISION REAL*8 MPI_DOUBLE double MPI_LONG_DOUBLE long double MPI_COMPLEX COMPLEX MPI_LOGICAL LOGICAL MPI_CHARACTER CHARACTER(1) MPI_SIGNED_CHAR signed cahr MPI_UNSIGNED_CHAR unsigned cahr MPI_SHORT signed short int MPI_LONG signed long int MPI_UNSIGNED unsigned int MPI_UNSIGNED_SHORT unsigned short int MPI_UNSIGNED_LONG unsigned long int MPI_BYTE MPI_BYTE MPI_PACKED MPI_PACKED