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

Implement the solution for the Ubuntu/OpenBLAS problem in the GH Actions workflow #357

Open
moazzammoriani opened this issue Jun 8, 2022 · 3 comments
Labels
enhancement New feature or request

Comments

@moazzammoriani
Copy link
Contributor

For #341 , conf-openblas fails to install in the GH actions workflow. This happens because of a known issue. The work-around is to build OpenBLAS from source--as shown in this Dockerfile. I'm not sure how to get the necessary permission in the GH actions workflow to use the ldconfig command. Any help would be appreciated.

@shakthimaan
Copy link
Contributor

how to get the necessary permission in the GH actions workflow to use the ldconfig command.

You can add the build steps to the GitHub Actions main.yml file (https://github.com/ocaml-bench/sandmark/blob/main/.github/workflows/main.yml) with a PR.

What error or permission are you facing with ldconfig?

@moazzammoriani
Copy link
Contributor Author

This is the failure that I'm talking about: https://github.com/ocaml-bench/sandmark/runs/6807710255?check_suite_focus=true. And this is the line that makes it fail: https://github.com/ocaml-bench/sandmark/pull/341/files#diff-7829468e86c1cc5d5133195b5cb48e1ff6c75e3e9203777f6b2e379d9e4882b3R45. Is it possible to obtain the necessary permissions to run this command?

@shakthimaan shakthimaan added the enhancement New feature or request label Jun 21, 2022
@shakthimaan shakthimaan moved this to Backlog in Benchmarking Jun 21, 2022
@shakthimaan shakthimaan moved this from Backlog to Todo in Benchmarking Jun 21, 2022
@shakthimaan
Copy link
Contributor

OpenBLAS can be installed locally without having to require sudo. The Installation Guide provides the required details at https://github.com/xianyi/OpenBLAS/wiki/User-Manual. For example, one can build and install OpenBLAS on Ubuntu 20.04.3 LTS using the following commands:

$ wget https://github.com/xianyi/OpenBLAS/releases/download/v0.3.20/OpenBLAS-0.3.20.tar.gz
$ tar xzvf OpenBLAS-0.3.20.tar.gz 
$ cd OpenBLAS-0.3.20/
$ make
$ make PREFIX=/tmp/openblas install

The test_blas_open.c file can be compiled using:

$ gcc -o test_blas_open test_blas_open.c -I /tmp/openblas/include -L /tmp/openblas/lib -lopenblas -lpthread

The LD_LIBRARY_PATH environment variable needs to be updated as follows:

$ export LD_LIBRARY_PATH=/tmp/openblas/lib:$LD_LIBRARY_PATH

The binary can finally be executed as shown below:

$  ./test_blas_open 
11.000000 -9.000000 5.000000 -9.000000 21.000000 -1.000000 5.000000 -1.000000 3.000000

Avoid sudo, unless it is absolutely necessary.

@ElectreAAS ElectreAAS removed their assignment Jul 5, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
Status: Todo
Development

No branches or pull requests

3 participants