-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #9532 from ryanrhymes/master
Add conf-openblas.0.1
- Loading branch information
Showing
4 changed files
with
45 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
Virtual package to install OpenBLAS and LAPACKE. | ||
The package prepares OpenBLAS (CBLAS) and LAPACKE backend for Owl (OCaml numerical library). It can only be installed if OpenBLAS and LAPACKE are installed on the system. |
11 changes: 11 additions & 0 deletions
11
packages/conf-openblas/conf-openblas.0.1/files/centos_install.sh
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
#!/usr/bin/env bash | ||
|
||
yes | yum update | ||
yes | yum install git | ||
yes | yum install gcc gcc-c++ gcc-gfortran make kernel-devel | ||
|
||
git clone https://github.com/xianyi/OpenBLAS.git | ||
cd OpenBLAS | ||
make && make install | ||
cd .. | ||
rm -rf OpenBLAS |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,10 @@ | ||
extern double cblas_dnrm2(int N, double *X, int INCX); | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
int N = 3; | ||
double X[] = { 1, 2, 3 }; | ||
int INCX = 1; | ||
double res = cblas_dnrm2(N, X, INCX); | ||
return 0; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,22 @@ | ||
opam-version: "1.2" | ||
maintainer: "Liang Wang ([email protected])" | ||
author: "Liang Wang ([email protected])" | ||
homepage: "https://github.com/xianyi/OpenBLAS" | ||
bug-reports: "https://github.com/ocaml/opam-repository/issues" | ||
dev-repo: "https://github.com/ocaml/opam-repository.git" | ||
license: "BSD" | ||
build: [ | ||
["%{build}%/centos_install.sh"] {os = "centos"} | ||
["sh" "-exc" "cc $CFLAGS test.c -lopenblas"] {os = "alpine" } | ||
["sh" "-exc" "cc $CFLAGS test.c -lopenblas"] {os = "ubuntu" } | ||
["sh" "-exc" "cc $CFLAGS test.c -lopenblas"] {os = "debian" } | ||
["sh" "-exc" "cc $CFLAGS test.c -L/opt/OpenBLAS/lib -lopenblas"] {os = "centos"} | ||
["sh" "-exc" "cc $CFLAGS test.c -L/usr/local/opt/openblas/lib -lopenblas"] {os = "darwin"} | ||
] | ||
depexts: [ | ||
[["centos"] [""]] | ||
[["alpine"] ["libc-dev openblas-dev"]] | ||
[["ubuntu"] ["libopenblas-dev liblapacke-dev"]] | ||
[["debian"] ["libopenblas-dev liblapacke-dev"]] | ||
[["osx" "homebrew"] ["homebrew/science/openblas"]] | ||
] |