Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Tests fail with invalid pointer on free during make #117

Closed
zpzim opened this issue Jun 14, 2019 · 5 comments
Closed

Tests fail with invalid pointer on free during make #117

zpzim opened this issue Jun 14, 2019 · 5 comments

Comments

@zpzim
Copy link

zpzim commented Jun 14, 2019

Not sure if this is on my end or in one of my shared libraries causing the problem.

Here's the error during the build.
https://gist.github.com/zpzim/a7added1e63587e162f871383e33b1dc

It might be related to Intel TBB. I get this error even when I comment out the entire test function

@zpzim
Copy link
Author

zpzim commented Jun 17, 2019

I have tried in two envs, here is the one I got furthest on:

Env Details:
Ubuntu 18.04
compiler: gcc (Ubuntu 7.4.0-1ubuntu1~18.04.1) 7.4.0
Conan version 1.16.1
Arrayfire version: 3.6.2 Linux

I was able to get it working without building the tests, but I had to manually install MKL/TBB and point to the libraries using LD_LIBRARY_PATH

@zpzim
Copy link
Author

zpzim commented Jun 17, 2019

I tried to do another fresh install and I get the following error when running the matrixExample:
Terminate called after throwing an instance of 'af::exception'
what(): ArrayFire Exception (Failed to load dynamic library. :501):
Error in af_err unified::AFSymbolManager::call(const char*, CalleeArgs ...) [with CalleeArgs = {void**, const void*, unsigned int, const long long int*, af_dtype}]
In file src/api/unified/symbol_manager.hpp:61
Failed to load dynamic library. See http://www.arrayfire.com/docs/unifiedbackend.htm for instructions to set up environment for Unified backend.

In function void af::initDataArray(void**, const T*, af::source, dim_t, dim_t, dim_t, dim_t) [with T = int; af_array = void*; af::source = af_source; dim_t = long long int]
In file src/api/cpp/array.cpp:141
Aborted (core dumped)

This machine does not have CUDA installed.

@zpzim
Copy link
Author

zpzim commented Jun 17, 2019

Here's some more info:
Tried to install on a new system:

The following additional packages were installed based on errors:

  1. Needed to install package default-jdk, which is an undocumented dependancy
  2. Needed to install package google-gmock, which I found from googling a linker error https://stackoverflow.com/questions/24820664/undefined-reference-to-testinginternaleqfailure-in-gtest
  3. After this, I get 'error while loading shared libraries: libmkl_core.so: cannot open shared object file: No such file or directory' so I think MKL needs to be installed separately as well
  4. Same for libtbb

@otorreno
Copy link
Contributor

We have been investigating your installation issue starting from a fresh Ubuntu 18.04 box.

We believe your issue is related with the ArrayFire installation. We have thoroughly followed their installation guide for Linux (which is available at: http://arrayfire.org/docs/installing.htm#Linux).

Your problem might be related with the second step of the guide, which includes the ArrayFire lib64 folder to the LD_LIBRARY_PATH. This can be done in any of the 2 following ways:

  1. If you have sudo permissions:
echo /opt/arrayfire/lib64 > /etc/ld.so.conf.d/arrayfire.conf
sudo ldconfig
  1. If you don't have sudo permissions in your box, use:
export LD_LIBRARY_PATH=${LD_LIBRARY_PATH}:/opt/arrayfire/lib64

Another possible issue could be that your box do not have the following libraries installed:

  • libfreeimage3
  • libfontconfig1
  • libglu1-mesa

You can install them using the following command: apt-get install libfreeimage3 libfontconfig1 libglu1-mesa

To test your ArrayFire installation, you might want to use the ArrayFire Python binding. Follow the next steps:

  1. pip3 install arrayfire
  2. export AF_VERBOSE_LOADS=1
  3. python3
Python 3.6.8 (default, Jan 14 2019, 11:02:34)
[GCC 8.0.1 20180414 (experimental) [trunk revision 259383]] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>
  1. type import arrayfire as af

The last command will provide you with the names of the shared libraries that could not be loaded. If you don't have CUDA installed, then ignore the CUDA missing library error message.

The MKL and TBB libraries are included in the /opt/arrayfire/lib64 folder, so they will be found if you add such folder with any of the 2 options stated above. You don't need to install them manually.

@raulbocanegra
Copy link
Contributor

Fixed on #153

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

3 participants