Using 32bit pintool on a 64 bit machine - 32bit-64bit

I am new to pintool and I spent weeks on this problem:
I have a 64 bit architecture running ubuntu 14.04 and I try to use a pintool (source/tools/SimpleExample - trace.cpp) on a 32 bit binary. I used the following command:
make obj-ia32/trace.so TARGET=ia32
to create the obj-ia32 folder including the (hopefully) compiled 32-bit version of trace.cpp. I think this worked, however when I then try to use
../../../pin -t obj-ia32/trace.so -- /path/to/binary/binary.o
I receive the following error:
E: Unable to load obj-ia32/trace.so. Check the architecture type.
Do you have any idea how I can manage to use pintool on a 64bit machine on 32bit binaries? I know I need to compile the specific tool to 32 (which I thought I did above). I looked through the entire user manual multiple times, but I just can't seem to find the solution. Thank you so much in advance for any suggestions or hints you can give me.
Cheers!

Related

:version shows "Dependencies: python27.dll, which is not on my computer

I downloaded Vim 7.3 and installed it on my Windows7 64 bit system. I coded a simple python 3.4 program and tried to run it without success using the :!python COMMAND. When I checked version, bottom of output said:
Dependency: python27.dll, python33.dll, x64-msvcrt-ruby200.dll, lva52.dll, libintl.dll, lidiconv.dll, iconv.dll.
When I checked, python27.dll is not found on my system at all, python33.dll is in a directory for a program called "Autodesk 123D Design". I didn't check for the others yet. Can someone explain if these are required and if so, where they go? I have no idea why they would not have downloaded with the program during install.
They are used for writing vim plugins in Python. They are not required for normal operation.
They are also unrelated to your problem; check the value of %PATH% to see if python.exe is accessible.

Julia and unixODBC

So: I'm using Ubuntu 12.04 64 bit; I've set up unixODBC, and I'm trying to open an ODBC connection in Julia. I've tried this on both stable 0.20 and the latest nightly of Julia 0.30; I'm using ODBC.jl version 0.3.1. The problem I hit is that Julia seems to not be loading my DSNs. For instance:
ulia> ODBC.listdsns()
0x2 Array{String,2}
On the other hand, isql can connect to my DSNs just fine (so unixODBC is set up correctly). So... now I'm not sure how to proceed. I've tried using ODBC.advancedconnect(), but oddly, I get the same error message as when I try to use a DSN:
IM002: [unixODBC][Driver Manager]Data source name not found, and no default driver specified
There is a note about setting const odbc_dm on the ODBC.jl github page; I can't find any libs that sound like the one that note is talking about, but maybe that's the problem?
Any suggestions appreciated -- I don't particularly know how to proceed with this one, so this posting feels a little spare on details. If there's more information that would be helpful, just let me know and I'll get it posted.
ODBC.jl developer here. Yeah, it's probably because the package isn't finding your unixODBC library. Once you run using ODBC, type ODBC.odbc_dm to see what the package is picking up. You may have to manually set it (by modifying the ODBC_types.jl file in your package directory, or I can add some better logic to pick it up (better long-term). Feel free to open an issue at the repo and we can troubleshoot from there.

Rcpp on Solaris

I am trying to compile Rcpp_0.9.7 from source on sparc-sun-solaris2.10. I am getting the following error when I try to use install.packages:
sh: make: not found
ERROR: compilation failed for package 'Rcpp'
From research on the internet, it appears others have had similar problems with solaris. Unfortunately I do not know very much about which compilers I should or should not be using. One thing I am beginning to realize, however, is that solaris seems to be a sub-optimal environment for running R (in terms of performance as well as convenience).
Solaris can mean different things: it could be Solaris on x86, or Solaris on Sparc.
According to the Rcpp build results page on CRAN, Rcpp does now build on x86 Solaris (thanks to a recent patch by Martyn Plummer) but not Sparc Solaris. We were just discussing that this week on the rcpp-devel list.
As for your error, you are lacking critical components, namely the make tool. You likely lack more. Your conclusion is correct, though. Depending your level of Unix knowledge, you may be best off to simply install Ubuntu and enjoy tens of thousands of pre-built packages, including R and well over a hundred related packages.
Not really a solution but too long for a comment.
First of all get a decent environment for your testing of building Rccp on Solaris. Personally I use VirtualBox on my Windows workstation. This way I have an environment that I can control myself and do not depend on any grumpy SysAdmin. Best of all: there's no cost involved! When you are confident with your build you can either (1) move the binaries over to your target host or (2) replicate the build setup on your target host.
Secondly you can use these instructions to set up a proper build host on Solaris. (you seem to be lacking some crucial tools!). Remember to use gmake when building as per the instructions in the posting.
As Dirk mentioned, you're lacking the make command. If you're running Solaris 10
or earlier, then you need to find your installation media and pkgadd SUNWsprot.
If you're running Solaris 11 or later, then
pkg install developer/build/make
will get you that utility. You probably need the system headers as well, which are in pkg://solaris/system/header for Solaris 11 and later, or SUNWhea in earlier releases.
I see that you mention sparc-sun-solaris2.10 in your question - is there any opportunity for you to update to Solaris 11 or later? The developer environment is muchmuch nicer in the newer releases. Certainly easier to get a copy of a compiler....

Java program doesn't start on Unix machine

When I start Java application from command line on AIX 6.1 machine the application just doesn't start. All I get is a blinking cursor, hitting CTRL+C doesn't help. It seats in the list of processes all the time.
Even running the following command produces the same result so I don't think it is program related.
java -version
Cursor is blinking on the next line and nothing happens. When I open second session and type
ps -ef
I get the following:
tomcat 32243914 31850686 0 13:50:27 pts/7 0:00 -ksh
tomcat 5439538 32243914 1 13:50:50 pts/7 0:00 /usr/java6/jre/bin/java -version
On Windows my program runs just fine. So I think it is JRE or Unix related.
I'm not a Unix expert so I would appreciate any suggestions on how to trouble shoot this.
sounds strange , it seems that your process does not give hands back... No return
Do you have top binary installed on your AIX machine ?
Could you check that this machine follows the long list of requirements to run the java binary ? You may find useful information on the IBM java package webpage I guess...
Do you have lsof binaries or any other standard debuging tool ? lsof would point to any problem related to your AIX machine
HTH
Jerome
We have an intermittent similar issue with Java on Solaris. Sometimes rebooting the machine helps. Other times we have to remove the .java file from the user's home directory. Very random and annoying. The box can be up for months before it happens, or mere hours...

Error -1001 in clGetPlatformIDs Call !

I am trying to start working with OpenCL. I have two NVidia graphics card, I installed "developer driver" as well as SDK from NVidia website. I compiled the demos but when I run
./oclDeviceQuery
I see:
OpenCL SW Info:
Error -1001 in clGetPlatformIDs Call
!!!
How can I fix it? Does it mean my nvidia cards cannot be detected? I am running Ubuntu 10.10 and X server works properly with nvidia driver.
I am pretty sure the problem is not related to file permissions as it doesn't work with sudo either.
In my case I have solved it by installing nvidia-modprobe package available in ubuntu (utopic/multiverse). And the driver itself (v346) was installed from https://launchpad.net/~mamarley/+archive/ubuntu/nvidia
Concretely, I have installed nvidia-opencl-icd-346, nvidia-libopencl1-346, nvidia-346-uvm, nvidia-346 and libcuda1-346. Not sure if they are all needed for OpenCL.
This is a result of not installing the ICD portion of Nvidia's openCL runtime. The ICD profile will instruct your application of the different openCL implementations installed on the system as multiple implementations from different vendors can coexist. Whe your application does not find the ICD information it gives the Error -1001.
Run your program as root. In case of success: you have trouble with cl_khr_icd- extension to load the vendor driver.
If you not running X11, you have to create device files manually or by (boot-)script:
ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Same problem for me on a Linux system. Solution is to add the user to the video group:
# sudo usermod -aG video your-user-name
Since I just spend a couple of hours on this, I thought I would share:
I got the error because I was connected to the machine per remote desktop (mstsc). On the machine itself everything worked fine.
I have been told that it should work with TeamViewer by the way.
Dont know if you ever solved this problem, but I had the same issue and solved it in this post: ERROR: clGetPlatformIDs -1001 when running OpenCL code (Linux)
Hope it helps!
I have solved it in Ubuntu 13.10 saucy for intel opencl by created link:
sudo ln -s /opt/intel/opencl-1.2-3.2.1.16712/etc/intel64.icd /etc/OpenCL/vendors/nvidia.icd
I just ran into this problem on ubuntu 14.04 and I could not find ANY working answers anywhere online including this thread (though this was the first to show up on google). What ended up working for me was to remove ALL previous nvidia software and then to reinstall it using the .run file provided on the nvidia website. Installing the components through apt-get seems to fail for some reason.
1) Download CUDA .run file: https://developer.nvidia.com/cuda-downloads
2) Purge all previous nvidia packages
sudo apt-get purge nvidia-*
3) Install all run file components (you will likely have to stop X or restart in recovery mode to run this)
sudo sh cuda_X.X.XX_linux.run
This is because OpenCL has the same brain damaged one library per vendor setup that OpenGL has. A likely reason for the -1001 error is that you have compiled with a different library than the linker is trying to dynamically load.
So see if this is the problem run:
$ ldd oclDeviceQuery
...
libOpenCL.so.1 => important path here (0x00007fe2c17fb000)
...
Does the path point towards the NVidia-provided libOpenCL.so.1 file? If it doesn't, you should recompile the program with an -L parameter pointing towards the directory containing NVidia's libOpenCL.so.1. If you can't do that, you can override the linker's path like this:
$ LD_LIBRARY_PATH=/path/to/nvidias/lib ./oclDeviceQuery
For me, I was missing the CUDA OpenCL library, Running sudo apt install cuda-opencl-dev-12-0 solved it.
You should get number of platforms, allocate the memory for platforms, again get this platforms and then create context from this platform. There is good example:
http://developer.amd.com/support/KnowledgeBase/Lists/KnowledgeBase/DispForm.aspx?ID=71
This might be due to querying clGetPlatformIDs by multiple threads at the same time

Resources