Technical QuestionsQ:
How do I know which files to download?
A:
To reduce the size of the Sun Performance Library for Sun Studio 10, only the so.4 libraries have been included, and the legacy so.2 and so.3 libraries have been removed from this release. To maintain compatibility with applications that require the legacy so.2 and so.3 libraries, the Sun Studio 10 packages will search for previous installations of the Sun Performance Library on the system and install symlinks to the location of the previously installed libraries. If no prior Sun Performance Library packages are found, the Sun Studio 10 packages will install only the current so.4 libraries. To have symlinks to the legacy libraries, you will need to install the legacy packages before installing the Sun Performance Library for Sun Studio 10 packages. All the versions of the Sun Performance Library are available for download at no cost through the Sun Download Center. The legacy libraries for a particular version of Sun Performance Library are also located on the Forte Developer product CD for that release. For example, the packages for the Forte Developer 6 update 2 release are located in /cdrom/cdrom0/products/packages. ยป See Example You can install one or more of the packages, based upon your needs. Q:
I installed the Sun Performance Library for Sun Studio 10 packages before installing the legacy files. What do I do?
A:
If the legacy libraries have not been installed before installing Sun Studio 10 and you want the symlinks to the legacy libraries, you will need to do the following:
To install the legacy packages use the pkgadd command. See the pkgadd man page for usage instructions. (When installing to a location other than the default, carefully read the pkgadd man page section describing the "-a" option. For example, the "-a none" option will force an interactive install.) Q:
I'm trying to call Performance Library routines from F95 code using the generic interfaces, but I keep getting unresolved externals. What should I do?
A:
Make sure you include the USE SUNPERF statement in the source that is making calls to the Performance Library from F95. The USE statement must appear after the PROGRAM statement and before any other statement (aside from other USE statements).
PROGRAM MyProgram USE SUNPERF ... Q:
I'm trying to call Performance Library routines from F95 code using the generic interfaces, but I keep getting an error that says SUNPERF is specified as the module name on a USE statement, but the compiler cannot find it.
A:
The F95 compiler will only search the current directory for module files specified in a USE statement. You can cause the compiler to search additional directories by adding the -M option to the compilation line.
f95 -o mytest mytest.f -xlic_lib=sunperf -M/opt/SUNWspro/libNOTE: At this time, the f95 compiler will not search architecture specific directories for the correct sunperf.mod file. If you are compiling executables with -xarch set any of the v9 architectures, you must use the specific architecture path so that the compiler will pick up the correct sunperf.mod file. Example: f95 -o mytest mytest.f-xlic_lib=sunperf-xarch=v9a-M/opt/SUNWsproc/lib/v9a Q:
I'm trying to call Performance Library routines from F95 code using the generic interfaces, but I keep getting an error that says ERROR: No specific match can be found for the generic subprogram call.
A:
This error is caused when an attempt is made to call one of the Performance Library routines through the F95 generic interfaces but the parameter list used does not match any of the interfaces provided. F95 implements polymorphism with a technique known as "ad-hoc" polymorphism. This means that while it appears that a given routine is being called through a common interface, what is actually happening is that a number of interfaces are created and the compiler matches the calling sequence with one of the existing interfaces. The error described above indicates that the parameter list used in calling one of the supported routines is different from any parameter list in the sunperf.mod file.
Example 1: SUBROUTINE CAXPY(N,ALPHA,X,INCX,Y,INCY)NOTE: The first letter of the routine name is left off since the routine type is controlled by the type of the ALPHA, X, and Y parameters. There is no support for interfaces that mix floating point or complex type parameters in the same parameter list (i.e., you may not call AXPY with an ALPHA of type REAL*4 and an X or Y type of REAL * 8). Example 2: SUBROUTINE DGELQF(M,N,A,LDA,TAU,WORK,LDWORK,INFO)NOTE: Once a parameter is omitted, successive parameters must use the "pass-by-name" convention for correct function. Parameter names match those listed in the corresponding man pages. Q:
I am trying to call the Performance Library routines from a C source file and I keep getting unsatisfied externals that begin with __f90.
A:
The Performance Library has been compiled with the Sun F95 compiler to take advantage of many of the F95 language features. Because of this, the Performance Library makes calls to the F90 runtime system. When linking an C code with the Performance Library, you can get rid of the unsatisfied symbols in one of two ways:
Q:
Where is the include file for the C interfaces to the Performance Library?
A:
The name of the include file for the Performance Library routines is sunperf.h and is in the compiler include directory.
Example:
If you installed your compilers at /opt/SUNWspro then the include file will have been installed at
/opt/SUNWspro/include/cc/sunperf.h. Q:
How do I use the 64-bit Performance Library routines when compiling my application for the V9 architecture?
A:
The V9 version of the Performance Library contains both 32 and 64-bit interfaces to the supported computational routines. If the 32-bit interface is called, integer parameters are converted to 64-bit integers and the 64-bit routine is called. This means that there is a slight performance penalty for calling the 32-bit interfaces when linking with the V9 version of the Performance Library. The 64-bit interfaces can be called directly by appending _64 to the desired routine name.
Example 1: INTEGER*4 N, INCX, INCY CALLWhen linked to the V9 library, this will result in a call to a wrapper routine that will convert N, INCX, and INCY to 64-bit integers, followed by a call to the CAXPY_64 routine with the promoted parameters. Example 2: INTEGER*8 N, INCX, INCYThis call will directly call the 64-bit CAXPY routine when linked with the V9 version of the Performance Library. NOTE: This interface does not exist in the V8 or V8PLUS versions of the Performance Library, so if you try this while compiling for those architectures you will get unsatisfied external references when linking. Example 3: INTEGER N, INCX, INCYThis will directly call the 64-bit CAXPY routine when linked with the V9 version of the Performance Library. You *must* compile with the compiler flag -xtypemap=integer:64 or you will get undefined results. This is due to the fact that the 64-bit routines expect 64-bit integer parameters. Q:
Calls to Performance Library routines cause segmentation faults. What could be wrong and what can I do?
A:
You may be experiencing stack overflow in your program. There are two types of stack space that need to be addressed.
First, there is the stack space allocated to a process. This is controlled by the limit command. Try unlimiting your process stack by saying:
% unlimit stacksizeSecondly, if your program is multi-threaded each thread must have its own stack space. This is controlled by the ${STACKSIZE} environment variable. The units are in KB so saying: % setenv STACKSIZE 4000sets each thread's stack size to 4 MB. This is the minimum value that Performance Library requires, so make sure that ${STACKSIZE} is set to at least 4000. You may need to increase this value if your program uses large stack based variables. Q:
When is LINPACK going away and what replaces it?
A:
Forte Developer 6 update 2 was the last release that included LINPACK in the Sun Performance Library. LAPACK version 3.0, which supersedes LINPACK and all previous versions of LAPACK, is provided instead. If legacy user codes that call LINPACK routines cannot be modified to use LAPACK routines, the public domain version of LINPACK can still be obtained from Netlib. The LINPACK routines that were removed are listed in the
Table.
| |
|
| ||||||||||||