User`s guide
Cray XMT™ Programming Environment User’s Guide
errno.h errno is thread-specific and not a global variable.
Files that use errno in the same way that it is
used by library calls such as perror must include
errno.h. This is required by ANSI and Posix, but
most systems do not comply with this convention.
On the Cray XMT, each thread has its own value of
errno, so you must include errno.h for correct
behavior.
time.h One goal of the Cray XMT is to support a
Posix-compliant application programming interface.
As a result, when you port non-Posix programs,
you may have to change the header files that
are included. For example, you may need to
include time.h instead of, or in addition to,
sys/time.h.
Executable formats
On the Cray XMT, executable programs are in ELF format instead
of a.out format. Therefore, you should replace a.out.h in your
programs with elf64.h. Another characteristic of the ELF format
is that uninitialized and initialized global variables are both mixed
in memory.
Miscellaneous issues
The following list describes important miscellaneous issues.
printf and $
Different implementations of printf have different
ways of interpreting $. The implementation of
printf on the Cray XMT does not have a special
interpretation.
C and C++ structure passing
Structures cannot be passed by value from C to C++.
mmap mmap is based on file data-block size. The
data-block size for a Cray XMT file is different
from that on BSD 4.4 UNIX. Although you can
use mmap, the mmap_fsblk system call provides
richer semantics.
44 S–2479–20