...
- Ensure that the perftools module is loaded before compiling any OpenIFS code. This is important because perftools modifies each object (.o) file for the subsequent analysis by CrayPAT.
Code Block module load perftools
The normal behaviour of the OpenIFS compilation using the fcm command is to perform the final link step by creating and linking against a temporary archive library (libmaster.a) of all the object (.o) files. This temporary library by default will go into a directory specified by the shell environment variable
TMPDIR
. The location of this temporary library can be altered by changingTMPDIR
.
However, this behaviour is not suited to CrayPAT which requires all object files to still be available after compilation and errors similar to the following will occur:Code Block title Possible errors from compilation [FAIL] WARNING: CrayPat is saving object files from a temporary directory into directory '/home/user/.craypat/master.exe/3350' [FAIL] cp: invalid option – '/' [FAIL] Try `cp --help' for more information. [FAIL] basename: invalid option – 'L' [FAIL] Try `basename --help' for more information. [FAIL] WARNING: the link is executed in a temporary directory which may not be accessible later for pat_build
To overcome this, add a new configuration option to the OpenIFS fcm configuration file:
make/oifs.cfg
Code Block oifs.prop{keep-lib-o} = true
This line can be added anywhere in the file but perhaps is best placed after the lineoifs.target =
.
This option changes the behaviour of fcm so that a new directory 'lib
' will be created in the build directory (typicallycce-opt/oifs/lib
) and the archive library for the compiled programs will be stored in there suitable for later use by CrayPAT.Make a clean compilation of OpenIFS, ensuring all code is recompiled. Either use the --new option to the fcm-make command:
Code Block fcm make --new ...
or delete the entire build directory (e.g. cce-opt)
.
The resulting executable binary should then be suitable for use with pat_build e.g.
Code Block pat_build -w make/cce-opt/oifs/bin/master.exe
...