Mentions légales du service

Skip to content
Snippets Groups Projects
Commit f4311c20 authored by Mathieu Faverge's avatar Mathieu Faverge
Browse files

Merge branch 'macosx' into 'master'

build macosx: ensure starpu is installed with brew

See merge request !463
parents 67dd9589 c6737b1f
No related branches found
No related tags found
1 merge request!463build macosx: ensure starpu is installed with brew
......@@ -11,11 +11,19 @@ SCAN=""
if [[ "$SYSTEM" != "windows" ]]; then
if [[ "$SYSTEM" == "macosx" ]]; then
if brew ls --versions starpu > /dev/null; then
echo "Starpu is already installed with brew";
# check starpu is already installed and install it if necessary
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
echo "Start installing Starpu with brew";
brew install --build-from-source ~/brew-repo/starpu.rb;
# dep is already installed, check the version with our requirement
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
# 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
......
......@@ -2,8 +2,8 @@
#
# @file CMakeLists.txt
#
# @copyright 2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
# @copyright 2024-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
###
#
......@@ -14,7 +14,7 @@
# @version 1.3.0
# @author Florent Pruvost
# @author Mathieu Faverge
# @date 2024-03-19
# @date 2024-05-06
#
###
......
......@@ -2,8 +2,8 @@
*
* @file comm_split.c
*
* @copyright 2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
* @copyright 2024-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
......@@ -12,7 +12,7 @@
* @version 1.3.0
* @author Florent Pruvost
* @author Mathieu Faverge
* @date 2024-03-19
* @date 2024-05-06
*
*/
#include "comm_split.h"
......
......@@ -2,8 +2,8 @@
*
* @file comm_split.h
*
* @copyright 2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
* @copyright 2024-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
* Univ. Bordeaux. All rights reserved.
*
***
*
......@@ -12,7 +12,7 @@
* @version 1.3.0
* @author Florent Pruvost
* @author Mathieu Faverge
* @date 2024-03-19
* @date 2024-05-06
*
*/
#ifndef _comm_split_h_
......
......@@ -4,10 +4,10 @@
# @copyright 2016-2024 Bordeaux INP, CNRS (LaBRI UMR 5800), Inria,
# Univ. Bordeaux. All rights reserved.
#
# @version 1.2.0
# @version 1.3.0
# @author Florent Pruvost
# @author Mathieu Faverge
# @date 2022-02-22
# @date 2024-05-06
#
# This script check that basic informations is present and correct in
# headers of source files.
......@@ -193,7 +193,8 @@ files=$( git ls-files |
grep -v "distrib/debian/.*" |
grep -v "tools/bench/jube/requirements.txt" |
grep -v "\.org" |
grep -v "\.scm" )
grep -v "\.scm" |
grep -v "\.rb")
if [ $# -gt 0 ]
then
files=$*
......
###
#
# @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
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment