MPI_INFO_ENV(3)

πŸ’« MPI_INFO_ENV β€” the static MPI_Info object that knows things about your app ✨

okay so this is the MPI_INFO_ENV(3) page from the Open MPI manual set, and honestly? it's a little gem. let's get into it.


πŸ’– NAME πŸ’–

MPI_Info_env β€” a static MPI_Info object stuffed full of info about how your application got executed 🫢

🌸 DESCRIPTION 🌸

so the MPI-3 standard was like "bestie, we need a static MPI_Info object" and thus MPI_Info_env was born ✨ it's literally there so you can peek at how the application was executed from the run-time. like a little receipt of your own launch. iconic behavior tbh.

πŸŽ€ SUPPORTED FIELDS πŸŽ€

real talk, here's every field and what it's giving:

  • command β€” if it's available, the value gets set to argv[0]. BUT ⚠️ it might not always be available β€” it's totally valid for a program to call MPI_Init with NULL parameters, and in that case argv[0] won't be set if you're running as a singleton. also, this value will never be set in a Fortran program, because the argv are just not there. sorry Fortran besties 😭
  • argv β€” the argv given to your application. no arguments passed? then this value is not set. also not set if you're a singleton calling MPI_Init with NULL parameters, or if you're a Fortran program. same deal, different field πŸ’…
  • maxprocs β€” the number of processes in the job. the headcount. the squad size πŸ‘‘
  • soft β€” Open MPI does not support the soft option for specifying the number of processes to be executed, so this value is just set to the same thing as maxprocs. it's matching energies 🌈
  • host β€” the name of the host this process is executing upon β€” literally the value returned from gethostname(). where you at girl πŸ“
  • arch β€” the architecture of the host this process is executing upon. this value indicates the underlying chip architecture (e.g., x86_64), if it can be determined. it's giving "we'll try our best" πŸ¦‹
  • wdir β€” the working directory at the time of process launch by mpiexec. heads up πŸ™ˆ this value will not be set for processes launched as singletons, because there's no reliable way for the MPI library to determine the location. no cap, it just can't know.
  • file β€” although it's specified by the MPI-3 standard, no value is currently set for this field. ghost field. imaginary. we pretend we don't see her πŸ’€
  • thread_level β€” the requested MPI thread level. important nuance bestie: this may differ from the actual MPI thread level of the application. requested β‰  received, we've all been there 😭
  • ompi_num_apps β€” the number of application contexts in an MPMD job. this one is an Open MPI-specific field and value πŸ”₯
  • ompi_np β€” the number of processes in each application context, provided as a space-delimited list of integers. also Open MPI-specific πŸ“
  • ompi_first_rank β€” the MPI rank of the first process in each application context, provided as a space-delimited list of integers. Open MPI-specific, yes ma'am ✨
  • ompi_positioned_file_dir β€” if Open MPI was asked to pre-position files, this field provides the top-level directory where those files were placed. Open MPI-specific field and value, we're so fancy πŸ’œ

πŸ’… ERRORS πŸ’…

when calling MPI_Info_get, the flag parameter will be set to zero (false) if a value for the field has not been set. so like... if it's zero, the field is empty. that's the vibe check πŸŽ€

πŸ¦‹ SEE ALSO πŸ¦‹

  • MPI_Info_get

2003-2026, The Open MPI Community


πŸ’– that's the whole page bestie, every field accounted for, nothing skipped, periodt. go forth and query your environment ✨

β€” lovingly signed off from the Open MPI manual set, dated Sep 11, 2026 🌸🫢

πŸ“¦ where this page comes from