Mentions légales du service
Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
Chameleon
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Package registry
Container Registry
Operate
Environments
Terraform modules
Monitor
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
solverstack
Chameleon
Commits
86a6ea0c
Commit
86a6ea0c
authored
1 year ago
by
PRUVOST Florent
Committed by
Mathieu Faverge
11 months ago
Browse files
Options
Downloads
Patches
Plain Diff
build macosx: check if starpu is installed, if not install it
parent
67dd9589
No related branches found
No related tags found
1 merge request
!463
build macosx: ensure starpu is installed with brew
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
.gitlab/build.sh
+12
-4
12 additions, 4 deletions
.gitlab/build.sh
tools/homebrew/starpu.rb
+61
-0
61 additions, 0 deletions
tools/homebrew/starpu.rb
with
73 additions
and
4 deletions
.gitlab/build.sh
+
12
−
4
View file @
86a6ea0c
...
@@ -11,11 +11,19 @@ SCAN=""
...
@@ -11,11 +11,19 @@ SCAN=""
if
[[
"
$SYSTEM
"
!=
"windows"
]]
;
then
if
[[
"
$SYSTEM
"
!=
"windows"
]]
;
then
if
[[
"
$SYSTEM
"
==
"macosx"
]]
;
then
if
[[
"
$SYSTEM
"
==
"macosx"
]]
;
then
if
brew
ls
--versions
starpu
>
/dev/null
;
then
# check starpu is already installed and install it if necessary
echo
"Starpu is already installed with brew"
;
DEP_INSTALLED
=
`
brew
ls
--versions
starpu |
cut
-d
" "
-f
2
`
if
[[
-z
"
${
DEP_INSTALLED
}
"
]]
;
then
# dep is not installed, we have to install it
brew
install
--build-from-source
./tools/homebrew/starpu.rb
else
else
echo
"Start installing Starpu with brew"
;
# dep is already installed, check the version with our requirement
brew
install
--build-from-source
~/brew-repo/starpu.rb
;
DEP_REQUIRED
=
`
brew info
--json
./tools/homebrew/starpu.rb |jq
-r
'.[0].versions.stable'
`
if
[[
"
${
DEP_INSTALLED
}
"
!=
"
${
DEP_REQUIRED
}
"
]]
;
then
# if the installed version is not the required one, re-install
brew remove
--force
--ignore-dependencies
starpu
brew
install
--build-from-source
./tools/homebrew/starpu.rb
fi
fi
fi
# clang is used on macosx and it is not compatible with MORSE_ENABLE_COVERAGE=ON
# clang is used on macosx and it is not compatible with MORSE_ENABLE_COVERAGE=ON
# to avoid the Accelerate framework and get Openblas we use BLA_PREFER_PKGCONFIG
# to avoid the Accelerate framework and get Openblas we use BLA_PREFER_PKGCONFIG
...
...
This diff is collapsed.
Click to expand it.
tools/homebrew/starpu.rb
0 → 100644
+
61
−
0
View file @
86a6ea0c
###
#
# @file starpu.rb
# @copyright 2013-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
# @brief Homebrew formula for StarPU
#
# @version 1.3.0
# @date 2024-05-06
#
###
class
Starpu
<
Formula
desc
"StarPU is a task programming library for hybrid architectures"
homepage
"https://starpu.gitlabpages.inria.fr/"
url
"https://files.inria.fr/starpu/starpu-1.4.5/starpu-1.4.5.tar.gz"
sha256
"28f389b34df57a2a4e4743b40554b0f8d098ff2199e9eb8fbbe20aa377b64541"
license
"GNU GPL v2.1"
depends_on
"autoconf"
=>
:build
depends_on
"automake"
=>
:build
depends_on
"libtool"
=>
:build
depends_on
"pkg-config"
=>
[
:build
,
:test
]
depends_on
"hwloc"
depends_on
"openmpi"
def
install
system
"./autogen.sh"
if
build
.
head?
system
"./configure"
,
*
std_configure_args
system
"make"
,
"install"
end
test
do
(
testpath
/
"test.c"
).
write
<<~
EOS
#include <stdio.h>
#include <stdlib.h>
#include <starpu.h>
struct starpu_codelet cl =
{
.where = STARPU_NOWHERE,
};
int main(int argc, char* argv[])
{
int ret = starpu_init(NULL);
STARPU_CHECK_RETURN_VALUE(ret, "starpu_init");
ret = starpu_task_insert(&cl, 0);
STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_insert");
ret = starpu_task_wait_for_all();
STARPU_CHECK_RETURN_VALUE(ret, "starpu_task_wait_for_all");
starpu_shutdown();
return 0;
}
EOS
pkg_config_flags
=
`pkg-config --cflags --libs starpu-1.4`
.
chomp
.
split
system
ENV
.
cc
,
"test.c"
,
*
pkg_config_flags
system
"./a.out"
end
end
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment