undefined reference on Tegra K1

[Old posts from the commercial version of ArrayFire] Discussion of ArrayFire using CUDA or OpenCL.

Moderator: pavanky

undefined reference on Tegra K1

Postby Medivh » Fri Jul 18, 2014 9:37 am

Hello

as thesis student i am testing echographic beamforming code with arrayfire lib on Tegra K1.

I followed instructions but testing "helloworld.cpp" (that helloworld included in folder arrayfire/examples that i have downloaded for tegra) i got thit output

Code: Select all
ubuntu@tegra-ubuntu:/opt/arrayfire/examples/helloworld$ sudo make
[sudo] password for ubuntu:
cc helloworld.cpp -DOS_LNX -Wall -Werror -lstdc++ -I../../include -pthread -O2 -DNDEBUG -I/usr/local/cuda/include -Wl,--no-as-needed -L../../lib -lpthread -lm -Wl,-rpath,../../lib,-rpath,/opt/arrayfire/lib -Wl,-rpath,/usr/local/cuda/lib -lafcu -L/usr/local/cuda/lib -lcudart -lcurand -lcusparse -lstdc++ -lcuda -lrt -o helloworld_cuda
../../lib/libafcu.so: undefined reference to `af_accum_U(unsigned int*, unsigned int, unsigned int*, unsigned int const*, unsigned int, int, int, bool)'
../../lib/libafcu.so: undefined reference to `af_accum_I(int*, unsigned int, unsigned int*, int const*, unsigned int, int, int, bool)'
collect2: error: ld returned 1 exit status
make: *** [helloworld_cuda] Error 1


At moment i have no idea what is the issue. Any suggestion?
Medivh
 
Posts: 6
Joined: Fri Jul 18, 2014 9:19 am

Re: undefined reference on Tegra K1

Postby shehzan » Fri Jul 18, 2014 11:38 am

Hi

Thanks for bringing this problem to our notice.
We will upload a new installer for Tegra K1 ASAP.
I'll leave a message here when we have done that.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: undefined reference on Tegra K1

Postby shehzan » Fri Jul 18, 2014 12:38 pm

The new installer is live. You can download it from www.arrayfire.com/download.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm

Re: undefined reference on Tegra K1

Postby Medivh » Fri Jul 18, 2014 2:09 pm

thanks very much for support.

I'll try this installer as soon as possible.
Medivh
 
Posts: 6
Joined: Fri Jul 18, 2014 9:19 am

Re: undefined reference on Tegra K1

Postby Medivh » Tue Jul 22, 2014 9:00 am

Now it works properly except a warning "modprobe: FATAL: Module nvidia not found."

Code: Select all
ubuntu@tegra-ubuntu:/opt/arrayfire/examples/helloworld$ sudo make
cc helloworld.cpp -DOS_LNX -Wall -Werror -lstdc++ -I../../include -pthread -O2 -DNDEBUG -I/usr/local/cuda/include -Wl,--no-as-needed -L../../lib -lpthread -lm -Wl,-rpath,../../lib,-rpath,/opt/arrayfire/lib -Wl,-rpath,/usr/local/cuda/lib -lafcu -L/usr/local/cuda/lib -lcudart -lcurand -lcusparse -lstdc++ -lcuda -lrt -o helloworld_cuda
ubuntu@tegra-ubuntu:/opt/arrayfire/examples/helloworld$ sudo make run
for F in  helloworld_cuda; do echo $F; ./${F} 0 -; done
helloworld_cuda
modprobe: FATAL: Module nvidia not found.
ArrayFire v (CUDA, 32-bit Linux, build 4c3c009)
License: Standalone (Tegra boom)
Addons: MGL16, DLA, SLA
ARM
 0 : GK20A, 1747 MB, CUDA Compute 3.2
Memory Usage: 118 MB free (1747 MB total)


create a 5-by-3 matrix of random floats on the GPU
A [5 3] =
        0.7402     0.4464     0.7762
        0.9210     0.6673     0.2948
        0.0390     0.1099     0.7140
        0.9690     0.4702     0.3585
        0.9251     0.5132     0.6814

element-wise arithmetic
B [5 3] =
        0.7744     0.5317     0.8006
        0.8962     0.7189     0.3905
        0.1390     0.2097     0.7549
        0.9243     0.5531     0.4509
        0.8987     0.5910     0.7299

Fourier transform the result
C [5 3] =
           3.6327 + 0.0000i       2.6043 + 0.0000i       3.1267 + 0.0000i
           0.4689 + 0.4640i       0.3193 + 0.0802i       0.1713 + 0.1441i
          -0.3491 - 0.7454i      -0.2923 - 0.4018i       0.2667 + 0.4886i
          -0.3491 + 0.7454i      -0.2923 + 0.4018i       0.2667 - 0.4886i
           0.4689 - 0.4640i       0.3193 - 0.0802i       0.1713 - 0.1441i

grab last row
c [1 3] =
           0.4689 - 0.4640i       0.3193 - 0.0802i       0.1713 - 0.1441i

zero out every other column
negate the first three elements of middle column
B [5 3] =
        0.0000    -0.5317     0.0000
        0.0000    -0.7189     0.0000
        0.0000    -0.2097     0.0000
        0.0000     0.5531     0.0000
        0.0000     0.5910     0.0000

create 2-by-3 matrix from host data
D [2 3] =
        1.0000     3.0000     5.0000
        2.0000     4.0000     6.0000

copy last column onto first
D [2 3] =
        5.0000     3.0000     5.0000
        6.0000     4.0000     6.0000
Medivh
 
Posts: 6
Joined: Fri Jul 18, 2014 9:19 am

Re: undefined reference on Tegra K1

Postby shehzan » Wed Jul 23, 2014 10:52 am

According to NVIDIA this is a harmless error. To quote:
Harmless error. To make it go away, do the following as root:
echo "alias nvidia nvhost_vi" >> /etc/modprobe.d/nvidia.conf
Following that, a "modprobe nvidia" should silently succeed, and you'll no longer get the annoying warnings when you run CUDA code.


The above was found on NVIDIA's forum post https://devtalk.nvidia.com/default/topic/744179/jetson-tk1-modprobe-fatal-module-nvidia-not-found-/.
----
Shehzan
Developer
AccelerEyes
User avatar
shehzan
 
Posts: 121
Joined: Tue Feb 12, 2013 7:20 pm


Return to [archive-commercial] Programming & Development with ArrayFire

cron