The solver fails to pick up a user Fortran shared library when running on an Opteron, using the PGF90 compiler. However the shared library is present.

Please note that this problem only occurs if the shared library has been compiled on a different machine from that used to run the solver. If this is the case, then the problem may be due to unresolved dependencies. A work-around for this problem is to copy some additional shared libraries into the directory containing the user Fortran shared library.

Before doing anything else, check the first error message given by the solver:

Error opening /home/fred/fortran/project/linux-amd64/ cannot open shared object file: No such file or directory

If the problem is due to an unresolved dependency, then you will see a second shared object file listed ( in the above example). If so, then the procedure below can be used to work around the problem. Note that this advice is correct for CFX-10.0. Future releases may not require this procedure.

STEP 1: Re-make the shared library, instructing the compiler to check for dependencies.

This is done by using the -WL,-R$ORIGIN argument on the cfx5mkext command line. For example:

cfx5mkext test.F -WL,-R$ORIGIN

STEP 2: Use ldd to list the dependencies.

Example shown below, with sample output:

ldd linux-amd64/ => /usr/pgi/linux86-64/5.2/libso/ => /usr/pgi/linux86-64/5.2/libso/ => /usr/pgi/linux86-64/5.2/libso/ => /usr/pgi/linux86-64/5.2/libso/ => /usr/pgi/linux86-64/5.2/libso/ => /usr/lib64/ (0x0000002a95d09000) => /lib64/ (0x0000002a95e2e000) => /usr/pgi/linux86-64/5.2/libso/ => /lib64/ (0x0000002a9618a000)
/lib64/ => /lib64/

STEP 3: Copy the required files to the directory containing the user Fortran sharedlibrary.

For the example listing shown in step 2, this would be all files named /usr/pgi/*.so. For example::

cp /usr/pgi/linux86-64/5.2/libso/ /usr/pgi/linux86-64/5.2/libso/ /usr/pgi/linux86-64/5.2/libso/ /usr/pgi/linux86-64/5.2/libso/ /usr/pgi/linux86-64/5.2/libso/ /usr/pgi/linux86-64/5.2/libso/ linux-amd64/.

STEP 4:On a machine without a compiler, check that all dependencies are resolved.

The ldd command is used to do this. Example shown below:

ldd linux-amd64/ => /home/fred/fortran/project/linux-amd64/ => /home/fred/fortran/project/linux-amd64/ => /home/fred/fortran/project/linux-amd64/ => /home/fred/fortran/project/linux-amd64/ => /home/fred/fortran/project/linux-amd64/ => /usr/lib64/ => /lib64/tls/ => /home/fred/fortran/project/linux-amd64/ => /lib64/tls/

Show Form
No comments yet. Be the first to add a comment!