Skip to content

Raspbian problem with multiple definitions #2639

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

Closed
swepettax opened this issue Jun 2, 2020 · 14 comments
Closed

Raspbian problem with multiple definitions #2639

swepettax opened this issue Jun 2, 2020 · 14 comments

Comments

@swepettax
Copy link

Hello!

I'm not sure, but i belive this is a OpenBLAS problem so i start posting here and see what you guys say.

I have previously (last week) successfully made it work with the same setup on fedora, but now i'm trying to do it on raspbian without success. My setup is RPI 3b with rasbian, HPL 2.1 (i know there is newer HPL versions and i have tried them without it working, so that's not the issue here), OpenBLAS 0.3.9 and MPICH newest version 3.3

I've tried to compile the make.rpi file, sometimes it compiles, sometimes it doesn't, but i've tried diffrent files etc in the setup so that may be why. Anyway, i ran gcc on the ./xhpl file (see the attached doc named logg) and that is why i belive it's a problem with OpenBLAS. I also attach the Make.rpi file. Any help would be deeply appricated :)

logg.txt

Make_rpi.txt

@martin-frbg
Copy link
Collaborator

Uh, why would you run gcc on the xhpl file ? That is supposed to be the benchmark executable, so once that exists I'd assume compilation worked fine and you just need to execute ./xhpl itself. See
https://www.howtoforge.com/tutorial/hpl-high-performance-linpack-benchmark-raspberry-pi/

@swepettax
Copy link
Author

I ran it because i keep getting segmentation fault code 11, I've reinstalled raspbian already and it didn't work and I didn't know what else to to do. When I looked in gdb it told me it was something with mutex lock and dies...

@martin-frbg
Copy link
Collaborator

Running a compiler on an executable is not going to achieve anything. Perhaps it would help to know how you built OpenBLAS, and if there was anything suspicious in the log of that build (which includes a few tests for correctness of the library functions, so any segmentation faults related to thread locks would be likely to show up there as well). Probably best to rebuild both OpenBLAS and xhpl on that system.

@swepettax
Copy link
Author

where can i find the log of the build? i have searched in /var/log/ but can't see it, unless it is in user or sys? But when i builded it i remember it said 28 test OK and 0 failed (it was marked green).

@martin-frbg
Copy link
Collaborator

You would need to redirect the messages to a file, like make >makelog.txt. But if it got to the final test it probably did not get a segmentation fault on the initial BLAS tests (which are similar to what xhpl does, just with smaller matrix dimensions)

@swepettax
Copy link
Author

swepettax commented Jun 2, 2020

I reinstalled Raspbian again, and as i went on doing the procedure i made logs for you. However, my pi kept freezing several times during openblas installation, so i removed the log there and it worked. so i manually copied the output from the terminal, but it's missing the first parts.

Please let me know if i can provide you with more details.

make_xhpl.txt
openblas_install.txt
make_openblas_log.txt
mpich_install.txt
Make_rpi.txt

@martin-frbg
Copy link
Collaborator

These logs look good as far as I can tell. Do you still get segmentation faults when you try to run xhpl ? (In my experience at least with the Pi4, a good power supply and good cooling are important to avoid freezing or crashing)

@swepettax
Copy link
Author

yes i do unfortunately :(

I've removed all the covers and they have real power supplys. I have 10 of the pies, so i can try another one tomorrow and see if it yields better results, but i'm doubtful it will.

Thank you for saying that it looks good, then i'm not blind and stupid. I've read alot of issues with problems regarding what i'm trying to do, and you seems like the top guy on the field so i deeply appricate that you're trying to help me out :)

@brada4
Copy link
Contributor

brada4 commented Jun 6, 2020

Try to change cpufreq to powersave and use less than all (like two) cores, that will limit thermal output of SoC, if stable it proves the point of insufficient cooling.
It is not your fault per se, it has been seen that commonplace x86_64 CPU on a commonplace mainboard gets throttled when CPU fan does not spin up fast enough.
Raspberry heatsinks are quite cheap compared to their desktop siblings:
image

@woreom
Copy link

woreom commented Jun 8, 2020

Hi, this might not be the greatest place to ask this but I thought it would be better than opening an issue, I'm trying to make arm-linux-gnu-gcc, following the instructions on mxnet. I saw arm-linux-andriod-gcc but I don't believe that it would help me. in the matter of fact, I'm not even sure if OpenBLAS supports armv71 on linux by #1483. Can I use OpenBLAS? this is my command:

make NOFORTRAN=1 NO_SHARED=1 CC=arm-linux-gnu-gcc

I have a raspberry pi 4 with 4gb ram and armv71

@martin-frbg
Copy link
Collaborator

@woreom opening an issue would probably be better than "hijacking" a vaguely related one. That command should work if "arm-linux-gnu-gcc" is in the search path for executables on your build host. If it does not work, please post the error messages and/or full build log in a new issue. (#1483 is only about how much hardware acceleration support is available on 32bit ARMV7, certainly 64bit ARMV8 would give better performance but OpenBLAS can be built on V7)

@swepettax
Copy link
Author

Update on my issue: it looks like it's working on RPI 3B+, but not on RPI 3B. I have ordered new RPI 4B, haven't got them yet, but i think/hope they will work. Since i won't have time or energy to look into this matter anymore, i'm closing this issue and thank you all for your help and support. If i would continue with this error tracing i would look into what brada4 suggested. Thank you!

@woreom
Copy link

woreom commented Jun 8, 2020

@woreom opening an issue would probably be better than "hijacking" a vaguely related one. That command should work if "arm-linux-gnu-gcc" is in the search path for executables on your build host. If it does not work, please post the error messages and/or full build log in a new issue. (#1483 is only about how much hardware acceleration support is available on 32bit ARMV7, certainly 64bit ARMV8 would give better performance but OpenBLAS can be built on V7)

sorry, will do boss :))

@brada4
Copy link
Contributor

brada4 commented Jun 8, 2020

Update on my issue: it looks like it's working on RPI 3B+, but not on RPI 3B. I have ordered new RPI 4B, haven't got them yet, but i think/hope they will work. Since i won't have time or energy to look into this matter anymore, i'm closing this issue and thank you all for your help and support. If i would continue with this error tracing i would look into what brada4 suggested. Thank you!

Thats how to pinpoint most likely problem, the new Rpi-s have performant processors, they serve fine for simple workloads without cooling, but OpenBLAS (or any science software) or gcc (or anything with heaps of under-the-hood processes) are known to push CPUs to their thermal envelope.

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

No branches or pull requests

4 participants