---
name: "sc_ExEnv"
section: "3"
platform: "linux"
package: "libsc-doc"
version: "2.3.1-22"
release: "Debian 12 (Bookworm)"
platforms: ["linux"]
url: "https://new.carta.tech/sc_ExEnv"
---

# sc\_ExEnv(3)

The ExEnv class is used to find out about how the program is being run.

## NAME

sc::ExEnv - The **ExEnv** class is used to find out about how the program is being run.

## SYNOPSIS

`#include <exenv.h>`

### Static Public Member Functions

static void **init** (int &argcref, char \*\*&argvref)\
 Set the argument count and vector.  static int **initialized** ()\
 Return nonzero if **ExEnv** has been initialized.  static int & **argc** ()\
 Return an reference to the argument count.  static char \*\*& **argv** ()\
 Return an reference to the argument vector.  static const char \* **program\_name** ()\
 Return argv\[0\] with the path removed.  static const char \* **hostname** ()\
 Return the host name.  static const char \* **username** ()\
 Return the user name.  static void **set\_out** (std::ostream \*o)\
 static std::ostream & **outn** ()\
 Return an ostream that writes from all nodes.  static std::ostream & **errn** ()\
 Return an ostream for error messages that writes from all nodes.  static std::ostream & **out0** ()\
 Return an ostream that writes from node 0.  static std::ostream & **err0** ()\
 Return an ostream for error messages that writes from node 0.  static size\_t **memory** ()\
 The amount of memory on this node.  static int **nproc** ()\
 The number of processors on this node.

### Static Protected Attributes

static int **initialized\_**\
 static int \* **argc\_**\
 static char \*\*\* **argv\_**\
 static char **hostname\_** \[256\]\
 static char **username\_** \[9\]\
 static size\_t **mem\_**\
 static int **nproc\_**\
 static std::ostream \* **out\_**\
 static std::ostream \* **nullstream\_**\

## Detailed Description

The **ExEnv** class is used to find out about how the program is being run.

## Author

Generated automatically by Doxygen for MPQC from the source code.
