views:

85

answers:

1

I compiled my program as follows.

mpicc b_eff_io.c -o b_eff_io2 -I/scratch/irodero/papi/include -L/scratch/irodero/papi/src -lpapi -lm


 41125309    4 drwxr-xr-x  3 irodero users    4096 May  3 23:14 .
    39649287    4 drwxr-xr-x 12 irodero users    4096 May  3 00:27 ..
    41126356    4 drwxr-xr-x  2 irodero users    4096 May  3 23:10 kk
    41125409 2632 -rw-r--r--  1 irodero users 2688796 May  3 00:27 libpapi.a
    41126357  764 -rwxr-xr-x  1 irodero users  774486 May  3 23:14 libpapi.so
    41126358  764 -rwxr-xr-x  1 irodero users  774486 May  3 23:14 libpapi.so.4
    41126359  764 -rwxr-xr-x  1 irodero users  774486 May  3 23:14 libpapi.so.4.0.0
    41125398   84 -rw-r--r--  1 irodero users   79032 May  3 00:27 libperfctr.a
    41126360   76 -rwxr-xr-x  1 irodero users   72623 May  3 23:14 libperfctr.so
    41126361   76 -rwxr-xr-x  1 irodero users   72623 May  3 23:14 libperfctr.so.6
    41126362   76 -rwxr-xr-x  1 irodero users   72623 May  3 23:14 libperfctr.so.6.2.6.40
    41125312 1216 -rw-r--r--  1 irodero users 1238236 May  3 00:27 libpfm.a
    41126363 1028 -rwxr-xr-x  1 irodero users 1046742 May  3 23:14 libpfm.so
    41126364 1028 -rwxr-xr-x  1 irodero users 1046742 May  3 23:14 libpfm.so.3
    41126365 1028 -rwxr-xr-x  1 irodero users 1046742 May  3 23:14 libpfm.so.3.9.0

Howeever I got this error

 error while loading shared libraries: libpapi.so: cannot open shared object file: No such file or directory

What shud I do ?

+1  A: 

Maybe...

  • the library is in use
  • the permissions are incorrect
  • it does not exist
  • it's not in the library search path
George Edison
but i'm trying to link statically... why does this error show up ?
Sharat Chandra
.so files are not what you are looking for then. You should be linking with the .a file.
George Edison
Thanks a lot George !
Sharat Chandra