Analyzers
Talk to fellow users of Intel Analyzer tools (Intel VTune™ Profiler, Intel Advisor)
5116 Discussions

PrintCpuInfo32: error while loading shared libraries: libcpuinfo2.so.1

lazanoff
Beginner
1,647 Views
looking for a pointer on how to resolve the error reporting that libcpuinfo2.so.1 can't be found when it is present in /opt/intel/vtune/shared/bin and this directory is included in $LD_LIBRARY_PATH. To confirm access, I successfully copied this file to my home directory.
The script vtl.calls echos the path and attempts to call profilean executable.
more vtl.calls
echo $LD_LIBRARY_PATH
vtl activity -c callgraph -app $HOME/Fortran/MATMUL/matmul.81 -moi $HOME/Fortran/MATMUL/matmul.81
vtl view -gui -calls
./vtl.calls
/opt/intel/vtune/analyzer/bin:/opt/intel/vtune/shared/bin:/opt/intel/comp/8.1.026/lib
VTune Performance Analyzer 3.0 for Linux*
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.
PrintCpuInfo32: error while loading shared libraries: libcpuinfo2.so.1: cannot open shared object file: No such file or directory
VTune Performance Analyzer 3.0 for Linux*
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.
The Activity Result was not found. Use 'vtl show' to display the project's contents.
ls -l /opt/intel/vtune/shared/bin/libcpu*
lrwxrwxrwx 1 root all 16 Apr 13 17:51 /opt/intel/vtune/shared/bin/libcpuinfo2.so -> libcpuinfo2.so.1
lrwxrwxrwx 1 root all 20 Apr 13 17:51 /opt/intel/vtune/shared/bin/libcpuinfo2.so.1 -> libcpuinfo2.so.1.0.0
-rwxr-x--- 1 root all 18940 Nov 18 19:07 /opt/intel/vtune/shared/bin/libcpuinfo2.so.1.0.0
TIA
Art
0 Kudos
14 Replies
jeffrey-gallagher
1,647 Views
Hello Art,
I've never seend the -gui option in play except as the very last option in a view statement, thus:
$ vtl view -gui
Do you get the same or a different error if you leave that out of your script, something like this instead:
vtl view
if that works, then try just
vtl view -gui
and let us know what you see
cheers
jdg
0 Kudos
lazanoff
Beginner
1,647 Views
vtl view -gui -calls
VTune Performance Analyzer 3.0 for Linux*
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.
The Activity Result was not found. Use 'vtl show' to display the project's contents.
I think my problem starts with the failure of the collector activity to run following the "error while loading shared libraries". This error may be a link/permissions problem in vtune/shared/bin. After reporting the error here, I copied the directory to my home directory and added this location to LD_LIBRARY_PATH. Now I get a complaint about another missing file: libcxaguard.so.5, and I can't find this in /opt/intel/vtune.
columbia4> echo $LD_LIBRARY_PATH
/opt/intel/vtune/analyzer/bin:/opt/intel/vtune/shared/bin:/opt/intel/comp/8.1.026/lib:/opt/sgi/mpt/1.11.0.0/lib:/u/lazanoff/shared/bin
columbia4> vtl activity -c callgraph -app ./matmul.81 -moi ./matmul.81
VTune Performance Analyzer 3.0 for Linux*
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.
PrintCpuInfo32: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
Thanks again,
Art
0 Kudos
jeffrey-gallagher
1,647 Views
Totally ok if you don't want to do what I suggest, Art. Just looking for clues.
For VTune to work at all, you must be a member of the vtune group that was picked during install, default "vtune" although your installer could select any group at all. Might make sure that group has access to directory tree of interest, that you're working with. Also, if any of the tree has especially restricted access or is using restricted shells of some kind, naturally that is designed to prevent access, and therefore may have to be altered.
If your guess is right, a quick way of proving there is a perms issue is to simply log on as root, and, repeat the vtl experiment. Success would indicate perms aren't right yet for nonroot users.
Another thing to consider: examine the install.log file and make sure the install went very smoothly.
/var/log/install.log
0 Kudos
lazanoff
Beginner
1,647 Views
Hi,
Perhaps I wasn't clear that my question was about what it took to find a missing library for the collection phase rather than for the viewing phase. The collection activity doesn't get as far as instrumenting the code and then fails to run the code, and there isn't any data for the viewing phase to display.
columbia4.73> vtl activity -c callgraph -app $HOME/Fortran/MATMUL/matmul.81 -moi $HOME/Fortran/MATMUL/matmul.81
PrintCpuInfo32: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
PrintCpuInfo32: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
VTune Performance Analyzer 3.0 for Linux*
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.
PrintCpuInfo32: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory
columbia4. 74>
command used to compile:
ifort -V -ip -O3 -pad -align -i8 -o matmul.81 matmul.f90
columbia4.nas.nasa.gov 78> ifort -V -ip -O3 -pad -i8 -o matmul.81 matmul.f90
Intel Fortran Itanium Compiler for Itanium-based applications
Version 8.1 Build 20041123 Package ID: l_fc_pc_8.1.023
Copyright (C) 1985-2004 Intel Corporation. All rights reserved.
GNU ld version 2.14.90.0.4 20030523
Supported emulations:
elf64_ia64
elf_i386
i386linux
columbia4. 62> more bistro.log
--------------------------------
Completion started at Tue May 17 11:37:27 2005
Completion ended at Tue May 17 11:37:28 2005
example program execution:
columbia4.79> ./matmul.81
kind real, integer = 8 8
lenx, leny = 1000 2000
hand written time (sec) = 6.972548
matmul time (sec) = 0.8354568
Note that the bistro log shows a 1 second runtime.
I've got another more complicated MPI example where VTune instruments the code (also -calls experiment) but then takes way too long to run the problem.
Incidentally Intel's document on c++/gnu suggests that libcxaguard.so.5 is used to support gcc extensions within Intel's c++ compiler. Since my example is pure Fortran, I can only assume that a reference to libcxaguard.so.5 is something that vtune is trying to use for itself.
Art
0 Kudos
lazanoff
Beginner
1,647 Views

Here's a bit more of our story: the PrintCpuInfo32 command is being invoked by vtl on an itanium-2 instead of PrintCpuInfo64.

columbia4.65> ./PrintCpuInfo64

GetCPUSpeed:0:34730127,23156,1499,1500

GetCPURawSpeed:0:1499

GetCPUNormSpeed:0:1500

GetIntervalTimerCounterRegister:0:522714908670930

GetProcessorCount:0:512

IsClone:1

GetCPUFamily:0:31

GetCPUFeatures:0:1

GetCPUCacheInfo(0):0:16,64

GetCPUCacheInfo(1):0:16,64

GetCPUCacheInfo(2):0:256,128

GetCPUCacheInfo(3):0:6144,128

GetHighestCPUIDRegisterSupported:0:4

GetCPUIDRegister(0):0:5288754736637306183

GetCPUIDRegister(1):0:1818588270

GetCPUIDRegister(2):0:0

GetCPUIDRegister(3):0:520160516

GetCPUIDRegister(4):0:1

columbia4.66> ./PrintCpuInfo32

./PrintCpuInfo32: error while loading shared libraries: libcxaguard.so.5: cannot open shared object file: No such file or directory

Art

0 Kudos
jeffrey-gallagher
1,647 Views
Hey Art,
Thanks for sticking in there and helping me see what's going on. I searched on my system for that file and found it here:
/opt/sag/gcc-3.2/lib/libcxaguard.so.5
The /opt/sag subdirectory is created by the vtune install andwhat's in there is aset of services that vtune requires to function. You can easily check them out:
$ ps -ef | grep sag
A couple of thoughts here:
1) It might be time for you to go to premier.intel.com and open a support case there, including all the detail you've carefully provided here and if possible, a pack and go of the project. If you can't share this exact code, maybe create a simple sample showing the same problem, pack that up, and attach?
2) What version of gcc is installed on your system currently? A default or upgrade or downgrade? Just curious. The versions of gcc that we support are listed in the release notes of the vtune product, might not hurt to double check to make sure we're in alignment there.
3) Still might not hurt to examine /var/log/install.log and scan for installation errors. Maybe something along the way didn't completely install (out of processes during install, full filesystems, something...). That lvtune log keeps track of all user decisions, installation successes and failures, along with date and time stamps. Might teach us a lot.
No matter what, report back here if any of this rings a bell or not.
cheers
jdg

Message Edited by jdgallag on 05-18-2005 10:12 AM

Message Edited by jdgallag on 05-18-2005 10:13 AM

Message Edited by jdgallag on 05-18-2005 10:14 AM

Message Edited by jdgallag on 05-18-2005 10:14 AM

0 Kudos
lazanoff
Beginner
1,647 Views
We, too, found the /opt/sag stuff installed but are now wondering why the ia-32 version (lib32's stuff is ia-32, and lib64 is ia-64) is being called rather than the ia-64 version. We also looked into directory/file permissions but even an attempted run as root did not produce an instrumented run.
We're wondering whether group vtune is hard-wired into the code? We did install using a different group name for other reasons. vtl sources clscripts.common which seems to use the group id of VTUNE_GLOBAL_DIR to check access to this path, but for nothing else.
The test program is trivial and written in Fortran. The only app using gcc in this particular instance is vtune itself, and as you know, vtl prepends the gcc library directories that it needsto LD_LIBRARY_PATH.
We'll send in a log to the premier folks and put them to work on the problem.
TIA
Art
0 Kudos
lazanoff
Beginner
1,647 Views
We've decided that the problem is that vtl 3.0 should be using PrintCpuInfo64 and not PrintCpuInfo32 on an ia-64. The file command shows that PrintCpuInfo32 is a 32-bit executable and PrintCpuInfo64 is a 64-bit executable. The library error is just a side-effect of the wrong PrintCpuInfo command.
columbia4 95> file /opt/intel/vtune/3.0/shared/bin/PrintCpuInfo32
/opt/intel/vtune/3.0/shared/bin/PrintCpuInfo32: ELF 32-bit LSB executable, Intel 80386, version 1 (SYSV), for GNU/Linux 2.2.5, dynamically linked (uses shared libs), stripped
columbia4 96> file /opt/intel/vtune/3.0/shared/bin/PrintCpuInfo64
/opt/intel/vtune/3.0/shared/bin/PrintCpuInfo64: ELF 64-bit LSB executable, IA-64, version 1 (SYSV), for GNU/Linux 2.4.0, dynamically linked (uses shared libs), stripped
I've reported this as a bug to the premier site.
Art
0 Kudos
David_A_Intel1
Employee
1,647 Views
This results from the fact that the VTune analyzer 3.0 for Linux requires the 32-bit compatibility libraries (glibc). This is documented in the Release Notes, see the second bullet in the General Limitations section (SCR#21948).
0 Kudos
lazanoff
Beginner
1,647 Views
so, are you saying that the display that I can get PrintCpuInfo32 produces is incorrect because glibc32 isn't present?
columbia4.nas.nasa.gov 55> PrintCpuInfo32
GetCPUSpeed:0:0,0,0,0
GetCPURawSpeed:0:0
GetCPUNormSpeed:0:0
GetTimeStampRegister:0:2077286008,2077286008
GetProcessorCount:0:0
IsCPUIDSupported:0
IsClone:1
GetCPUFamily:0:15
GetProcessorSignature:0:2101075
GetCPUFeatures:0:1200128273
GetCPUCacheSize(2):-2147467231
GetCPUCacheSize(3):-2147467231
GetBrandID:0:0
GetProcessorSerialNumber:-2147467231
GetProcessorName:-2147467231
GetHighestCPUIDInputsSupported:0:1,0
GetCPUIDOutput(0):0:1,1970169159,1818588270,1231384169
GetCPUIDOutput(1):0:2101075,66560,1,1200128273
0 Kudos
David_A_Intel1
Employee
1,647 Views
No. I suspect that the output of PrintCpuInfo32 is not used when running in a 64-bit environment, even though the app is executed. I am checking with engineering and will let you know what I find out.

Message Edited by DaveA on 05-27-2005 09:44 AM

0 Kudos
vikram_kalsi
Beginner
1,647 Views
Dave,

I have a similar situation, but its bit more complicated because I'm running VTune 3.0 on RHEL4 on dual-Itanium2 with a Sampling Update from Intel Premier Support (Sampling Update README is attached).


[user@linux-server2 ~]$ vtl run a1
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
VTune Performance Analyzer 3.0 for Linux*. FOR NON-COMMERCIAL USE ONLY
Copyright (C) 2000-2004 Intel Corporation. All rights reserved.

The Activity is running.
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
Thu Jul 7 16:07:31 2005 linux-server2 (Run 0) The Sampling Collector is collecting samples based on the following event(s): L3_READS-DATA_READ-MISS, L3_READS-DATA_READ-ALL, IA64_INST_RETIRED-THIS, CPU_CYCLES.
Thu Jul 7 16:07:34 2005 linux-server2 (Run 0) Sampling data was successfully collected.
sh: /opt/intel/vtune/shared/bin/PrintCpuInfo32: cannot execute binary file
The Activity has finished running.


I do get results after running the Activity and they seem to be reasonable, but, I want to confirm that the results VTune is giving me are indeed correct inspite of these messages about PrintCpuInfo32.

Moreover, I can see that there is a PrintCpuInfo64 present in /opt/intel/vtune/shared/bin/ along with PrintCpuInfo32. Since, its a 64 bit m/c should VTune be executing PrintCpuInfo64 instead of PrintCpuInfo32?

Thanks,
0 Kudos
David_A_Intel1
Employee
1,647 Views
FYI All:
The way the code currently works is that it executes PrintCpuInfo32 and based on its output determines if it needs to execute PrintCpuInfo64, thus the requirement to install the 32-bit emulation libraries.
The error message you are receiving, vikram, is different, so I'm not sure that you have the same problem. However, you should:
  1. Verify that you have the 32-bit emulation libraries installed
  2. Verify that all files permissions look correct (i.e., is PrintCpuInfo32 executable by members of the 'vtune' group?)
  3. Do not reuse old projects. This problem has been experienced by users updating to 3.0 and attempting to reuse 2.0 projects. Try deleting all .stg? files in the VTune directory in the user's home directory.

Regards,

0 Kudos
vikram_kalsi
Beginner
1,647 Views
Thanks Dave, problem solved by installing 32-bit emulation layer, I suppose I should have checked that first before posting.

However, now, I need to know how VTune uses PrintCpuInfo32 and PrintCpuInfo64, because I have already gathered lot of data as seen in my earlier post. Is that data valid? I certainly hope so and it seems sensible to me!

Thanks again,
0 Kudos
Reply