Git Product home page Git Product logo

Comments (14)

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

Are you running with

LD_LIBRARY_PATH=/opt/rocm/lib ./binary

And if not, could you try that?

Following on please post the

results of

ldd ./binary

If you have debug symbols please also post the stack trace.

from hcc.

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

Have a look at this #197

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

Hi,
Im trying to complie saxpy.cpp example (All HCC applications segfaults)
I have linked '--amdgpu-target=AMD:AMDGPU:8:0:1' in the complie options. Here are my env variables:

echo $PATH
/opt/rocm/bin:/opt/rocm/hcc/bin:/home/saa/bin:/home/saa/.local/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games:/snap/bin
echo $LD_LIBRARY_PATH
/opt/rocm/lib ./saxpy

Results of ldd ./saxpy:

ldd ./saxpy
linux-vdso.so.1 => (0x00007fff64b89000)
libc++.so.1 => /usr/lib/x86_64-linux-gnu/libc++.so.1 (0x00007f3e3db86000)
libc++abi.so.1 => /usr/lib/x86_64-linux-gnu/libc++abi.so.1 (0x00007f3e3d936000)
libdl.so.2 => /lib/x86_64-linux-gnu/libdl.so.2 (0x00007f3e3d72e000)
libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f3e3d50e000)
libgcc_s.so.1 => /lib/x86_64-linux-gnu/libgcc_s.so.1 (0x00007f3e3d2f6000)
libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f3e3cf26000)
librt.so.1 => /lib/x86_64-linux-gnu/librt.so.1 (0x00007f3e3cd1e000)
/lib64/ld-linux-x86-64.so.2 (0x0000561f0036a000)

There were no debugging symbols found to post the stack trace.
Let me know i have to provide further information.

Thank you

from hcc.

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

Your LD_LIBRARY_PATH should be set like this

export LD_LIBRARY_PATH="/opt/rocm/lib"

You appear to have included the binary in the export which I think makes the variable invalid. I have had numerous segfaults with the saxpy example, but it works for me at the moment when the LD_LIBRARY_PATH has visibility of the hsa-runtime(64).so

Can youi also do a

ls -l /opt/rocm/lib

just to confirm you have the hsa runtime library?

Thanks

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

So i just set export LD_LIBRARY_PATH=/opt/rocm/lib in my .bashrc file

echo $LD_LIBRARY_PATH
/opt/rocm/lib

./saxpy still segfaults.

I believe i do hsa runtime library!
Results of ls -l /opt/rocm/lib:
total 4
lrwxrwxrwx 1 root root 27 Dec 21 12:23 hip_ir.ll -> /opt/rocm/hip/lib/hip_ir.ll
lrwxrwxrwx 1 root root 64 Nov 11 15:34 libCXLActivityLogger.so -> ../profiler/CXLActivityLogger/bin/x86_64/libCXLActivityLogger.so
lrwxrwxrwx 1 root root 29 Dec 21 12:23 libhc_am.so -> /opt/rocm/hcc/lib/libhc_am.so
lrwxrwxrwx 1 root root 33 Dec 21 12:23 libhip_device.a -> /opt/rocm/hip/lib/libhip_device.a
lrwxrwxrwx 1 root root 31 Dec 21 12:23 libhip_hcc.so -> /opt/rocm/hip/lib/libhip_hcc.so
lrwxrwxrwx 1 root root 37 Dec 21 12:23 libhip_hcc_static.a -> /opt/rocm/hip/lib/libhip_hcc_static.a
lrwxrwxrwx 1 root root 31 Dec 2 14:24 libhsakmt.so -> ../libhsakmt/lib/libhsakmt.so.1
lrwxrwxrwx 1 root root 32 Dec 7 20:14 libhsa-runtime64.so -> ../hsa/lib/libhsa-runtime64.so.1
lrwxrwxrwx 1 root root 29 Dec 21 12:23 libmcwamp.a -> /opt/rocm/hcc/lib/libmcwamp.a
lrwxrwxrwx 1 root root 36 Dec 21 12:23 libmcwamp_atomic.a -> /opt/rocm/hcc/lib/libmcwamp_atomic.a
lrwxrwxrwx 1 root root 34 Dec 21 12:23 libmcwamp_cpu.so -> /opt/rocm/hcc/lib/libmcwamp_cpu.so
lrwxrwxrwx 1 root root 34 Dec 21 12:23 libmcwamp_hsa.so -> /opt/rocm/hcc/lib/libmcwamp_hsa.so

Thanks

from hcc.

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

Can you show me the entire command you used to compile the saxpy example?

And can you confirm that the symlink is valid for /opt/rocm/lib/libhsa-runtime64.so (I'm assuming it is but just to be sure)

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

i tried the below 2 ways to compile the saxpy example:

  • hcc hcc-config --cxxflags --ldflags --amdgpu-target=AMD:AMDGPU:8:0:1 saxpy.cpp -o saxpy
  • hcc hcc-config --cxxflags saxpy.cpp -c -o saxpy.cpp.o
    hcc hcc-config --ldflags --amdgpu-target=AMD:AMDGPU:8:0:1 saxpy.cpp.o -o saxpy

Also to confirm the symlink, i typed 'readlink -f /opt/rocm/lib/libhsa-runtime64.so' on the terminal and got the following result,

readlink -f /opt/rocm/lib/libhsa-runtime64.so
/opt/rocm/hsa/lib/libhsa-runtime64.so.1.1.1

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

PS: i did put hcc-config --cxxflags --ldflags , hcc-config --cxxflags , hcc-config --ldflags in between the two backticks.

from hcc.

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

Yeah I figured, for sake of sanity consider using the following in future ;)

hcc $(hcc-config --cxxflags --ldflags)

I'm stumped, if you're interested in compiling (I have outstanding issues currently preventing me) with debug symbols you can attempt to use the following script I have put together.

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

I compiled saxpy like so:

hcc $(hcc-config --cxxflags --ldflags) --amdgpu-target=AMD:AMDGPU:8:0:1 saxpy.cpp -o saxpy

executing ./saxpy is still segfaulting.
What am i missing?
I'm happy to provide any information regarding my system/environment.
Running the executable through gdb says i do not have any debug symbols.

from hcc.

PhilipDeegan avatar PhilipDeegan commented on September 26, 2024

You'll likely have to wait for one of the actual maintainers to respond, sorry.

from hcc.

utopiabhsg avatar utopiabhsg commented on September 26, 2024

Thanks @dekken.

from hcc.

aditya4d1 avatar aditya4d1 commented on September 26, 2024

Hi,
Sorry to say this, Merlin Falcon boards are not supported by ROCm yet. Please find relevant information here: https://radeonopencompute.github.io/install.html

from hcc.

vrajeshlm avatar vrajeshlm commented on September 26, 2024

@bhsomegowda will you pls help me to get some sample input and way to execute those ArrayBandwidth and HCFFT code because when i do it i am getting following error:

### HCC STATUS_CHECK Error: HSA_STATUS_ERROR_INCOMPATIBLE_ARGUMENTS (0x100d) at file:/home/scchan/code/github/hcc-roc-1.4.x/hcc/lib/hsa/mcwamp_hsa.cpp line:2511
Aborted (core dumped)

and it is refering to a file which doesnt even exist on machine.

from hcc.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.