MPI_INFO_ENV(3)

πŸ‘‘ MPI_INFO_ENV πŸ’–

okay bestie, welcome to the Open MPI manual page for MPI_Info_env β€” a static MPI_Info object that's literally holding all the tea about how your application got executed ✨


🌸 NAME 🌸

MPI_Info_env β€” a static MPI_Info object containing info about the application 🫢


✨ DESCRIPTION ✨

so the MPI-3 standard said "let there be a static MPI_Info object" and its name is MPI_Info_env, and it's the one you hit up when you wanna know how your application was run from the run-time. that's it, that's the vibe πŸ’…


πŸŽ€ SUPPORTED FIELDS πŸŽ€

these are the fields you can pull out of it, one by one, no skipping πŸ“

  • command β€” if it's available, this gets set to argv[0]. and ngl, it might not always be available β€” like, a program is fully allowed to call MPI_Init with NULL parameters, and in that case argv[0] just won't be set if it's run as a singleton. also this value will never be set in a Fortran program, because the argv just aren't there. sorry Fortran girlies 😭
  • argv β€” the argv that was given to the application. if no arguments were passed to the application, this value won't be set. and it also won't be set if it's a singleton calling MPI_Init with NULL parameters, or if it's a Fortran program. πŸ’€
  • maxprocs β€” the number of processes in the job. simple, iconic πŸ‘‘
  • soft β€” Open MPI does not support the soft option for specifying the number of processes to be executed, so this value is set to the same thing as maxprocs. no soft launch energy here bestie 🌈
  • host β€” the name of the host this process is executing upon, aka the value that comes back from gethostname(). 🏠
  • arch β€” the architecture of the host this process is executing upon. this tells you the underlying chip architecture (like, x86_64 for example) β€” if it can be determined. lowkey conditional πŸ’œ
  • wdir β€” the working directory at the time the process was launched by mpiexec. heads up though: this value will not be set for processes launched as singletons, because there's no reliable way for the MPI library to figure out the location. she tried her best πŸ₯Ί
  • file β€” even though the MPI-3 standard specifies this field, no value is currently set for it. it's giving ghost πŸ‘»
  • thread_level β€” the requested MPI thread level. note that this may differ from the actual MPI thread level of the application, so don't get it twisted ⚠️
  • ompi_num_apps β€” the number of application contexts in an MPMD job. this is an Open MPI-specific field and value πŸ¦‹
  • ompi_np β€” the number of processes in each application context, handed to you as a space-delimited list of integers. Open MPI-specific field and value ✨
  • ompi_first_rank β€” the MPI rank of the first process in each application context, also handed to you as a space-delimited list of integers. Open MPI-specific field and value πŸ’«
  • ompi_positioned_file_dir β€” if Open MPI was asked to pre-position files, this field gives you the top-level directory where those files were placed. Open MPI-specific field and value πŸ“

πŸ’€ ERRORS πŸ’€

when you call MPI_Info_get, the flag parameter gets set to zero (false) if a value for the field has not been set. so like, always check the flag, bestie, fr fr.

See also:

  • MPI_Info_get

2003-2026, The Open MPI Community


and that's the whole page, no cap 🫢 written by the Open MPI girlies, source version pegged to that Sep 10, 2026 date β€” go forth and MPI_Info_get responsibly, mwah πŸ’–βœ¨πŸŽ€

πŸ“¦ where this page comes from