Shared File View
Although a file opened by multiple processes of an application is shared, each core maintains a private file pointer and file position. This means that if a certain order of input or output from multiple cores is desired, the application must synchronize its I/O requests or position its file pointer such that it acts on the desired file location.
Output requests to standard output and standard error are
fp = fopen ("myfile", "a+");
Private File View
Although the shared file approach improves ease of use for most applications, some applications, especially those written for
For example, assume /tmp and/tmp1 have been configured on each compute node.
Now each process can open up a file named /tmp/myscratch or /tmp1/myotherscratch and each would see a unique file pointer. If these file systems do not exist local to the node, an error results.
It is a good idea to use this option for temporary storage only, and make sure that the application deletes the file at the end.
C example: fd = open ("/tmp/myscratch", flags)
Fortran example: open (unit=9, file="/tmp1/myotherscratch" )
Communication Between Nodes
On the HP XC system, processes in an MPI application run on compute nodes and use the system interconnect for communication between the nodes. By default, intranode communication is done using shared memory between MPI processes. Refer to the
Communication Between Nodes 97