Sun MPI 4.0 User's Guide: With CRE

File Descriptors

If your job consists of a large number of processes, you may need to consider the number of file descriptors the job is using and, if necessary, increase the default number available to you.

For merged standard I/O, each process in a job requires two descriptors. For separate stderr and stdout streams, each process requires three descriptors. You also need three file descriptors for interacting with your terminal.

You can find out the default number of file descriptors available in your shell by issuing the command

C shell

% limit descriptors

Bourne shell

# ulimit -n

The default for most shells is 64. This limits you to about 30 processes for merged standard I/O and about 20 processes for separate standard I/O. If this isn't sufficient, you can increase your limit by issuing the command

C shell

% limit descriptors 128

Bourne shell

# ulimit -n 128

Or you can set it to the maximum value

C shell

% unlimit descriptors

Bourne shell

# ulimit -n `ulimit -Hn`

The file descriptor maximum in Solaris 2.6 and Solaris 7 is 1024.