opagetvf_env(1)

πŸ’– opagetvf_env β€” the manual page, bestie edition πŸ’–

okay so real talk, this is opagetvf_env(1) from the IFSFFCLIRG manual set, and it's genuinely one of my faves because it's just vibes and shell functions. 🫢


✨ NAME ✨

opagetvf_env β€” it hands you two little shell besties, opagetvf_func and opagetvf2_func, that go ask a vFabric what its parameters are. πŸ¦‹

It also exports values telling you the PKEY, SL, MTU, and RATE that belong to that vFabric. So iconic.

The typical usage is literally just sourcing it inside a shell script, like this:

. /usr/sbin/opagetvf_env

There's a whole usage example waiting for you at:

/usr/src/opa/mpi_apps/openmpi.params
NOTE: opagetvf_func and opagetvf2_func are used pretty much the same way. The one difference is whether MTU and RATE come back as absolute values or as enum values, respectively. that's the whole tea. πŸ“

🌸 Function Syntax 🌸

no cap, here's how you call them:

opagetvf_func "arguments to opagetvf" pkey_env_var_name sl_env_var_name [ mtu_env_var_name [ rate_env_var_name]]

or

opagetvf2_func "arguments to opagetvf" pkey_env_var_name sl_env_var_name [ mtu_env_var_name [ rate_env_var_name]]

πŸ’… Function Options πŸ’…

  • "arguments to opagetvf" β€” this is a whole little set of arguments you pass along to opagetvf so it knows which virtual fabric you're talking about. Peep opagetvf for the deets. πŸ‘‘
  • pkey_env_var_name β€” the name of the environment variable you want filled in with the pkey for the virtual fabric you picked. It gets exported with the hex numeric value for the pkey. And if you hand it a variable name of ""? Then pkey just… isn't saved. bye. πŸ’€
  • sl_env_var_name β€” the environment variable to fill in with the service level (sl) for the selected virtual fabric. It'll be exported with the numeric value for the sl. Pass "" as the variable name and sl doesn't get saved. periodt.
  • mtu_env_var_name β€” the environment variable to fill in with the maximum MTU for the selected virtual fabric. It gets exported with the value for the MTU. If you give a variable name of "", then MTU is not saved. πŸ™ˆ
    • With opagetvf_func, MTU comes back as an absolute value of 2048, 4096, 8192, or 10240.
    • With opagetvf2_func, MTU comes back as an enumerated value</enumerated> of 4, 5, 6, or 7, which line up with those absolute values above, respectively.
    • And if the virtual fabric you selected doesn't have a limitation specified for MTU, the variable is left unaltered. it does not touch it, bestie.
  • rate_env_var_name β€” the environment variable to fill in with the maximum static rate for the selected virtual fabric. It gets exported with the value for the rate. Give it "" and rate is not saved. 🌈
    • With opagetvf_func, rate comes back as an absolute value of 25g, 50g, 75g or 100g.
    • With opagetvf2_func, rate comes back as an enumerated value</enumerated> of 15, 12, 9, or 16, matching those absolute values above, respectively.
    • And if the selected virtual fabric has no limitation specified for rate, the variable stays unaltered. same energy as above fr fr.

πŸŽ€ Function Example πŸŽ€

here's the moment, the main character example:

# ensure values are empty in case they are not specified for the virtual fabric

MTU=

RATE=

opagetvf_func "-d 'Compute'" PKEY SERVICE_LEVEL MTU RATE

echo "The Compute Virtual Fabric has pkey: $PKEY SL:$SERVICE_LEVEL MTU: $MTU rate:$RATE"
NOTE: there are more examples chilling in /usr/src/opa/mpi_apps/openmpi.params and /usr/src/opa/mpi_apps/mvapich2.params. Those scripts use opagetvf_func and opagetvf2_func to grab virtual fabric parameters and then hand them off to openmpi and mvapich2, respectively. obsessed. πŸ”₯

and that's the whole page, bestie β€” copyright held by Copyright(C) 2015-2019 Intel Corporation, from the IFSFFCLIRG manual set, and this page answers to the name opagetvf_env(1). mwah, go source it. πŸ’œβœ¨