Buildroot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Arnout Vandecappelle <arnout@mind.be>
To: "Yann E. MORIN" <yann.morin.1998@free.fr>
Cc: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>,
	buildroot@buildroot.org
Subject: Re: [Buildroot] [PATCH v4 3/3] package/armadillo: allows to select between clapack, lapack or openblas
Date: Sun, 25 Jul 2021 11:36:11 +0200	[thread overview]
Message-ID: <f3776222-ad4d-2d73-9bf7-a79b335d10f3@mind.be> (raw)
In-Reply-To: <20210725075725.GP2382418@scaer>



On 25/07/2021 09:57, Yann E. MORIN wrote:
> Arnout, All, 
> 
> On 2021-07-24 23:45 +0200, Arnout Vandecappelle (Essensium/Mind) spake thusly:
>> From: Gwenhael Goavec-Merou <gwenhael.goavec-merou@trabucayre.com>

[snip]
>> +config BR2_PACKAGE_ARMADILLO_BLAS_OPENBLAS
> 
> Note the option name here ^^^ [...]
> 
>> +	bool "use openblas"
>> +	depends on BR2_PACKAGE_OPENBLAS_ARCH_SUPPORTS
>> +	select BR2_PACKAGE_OPENBLAS
>> +	help
>> +	  Use OpenBLAS as BLAS library. Without this option, clapack or lapack
>> +	  will be used.
>> +
>> +endchoice
>> +
>> +endif
>> diff --git a/package/armadillo/armadillo.mk b/package/armadillo/armadillo.mk
>> index 624b842ef6..82df7602be 100644
>> --- a/package/armadillo/armadillo.mk
>> +++ b/package/armadillo/armadillo.mk
>> @@ -7,11 +7,37 @@
>>  ARMADILLO_VERSION = 9.900.2
>>  ARMADILLO_SOURCE = armadillo-$(ARMADILLO_VERSION).tar.xz
>>  ARMADILLO_SITE = https://downloads.sourceforge.net/project/arma
>> -ARMADILLO_DEPENDENCIES = clapack
>>  ARMADILLO_INSTALL_STAGING = YES
>>  ARMADILLO_LICENSE = Apache-2.0
>>  ARMADILLO_LICENSE_FILES = LICENSE.txt
>>  
>>  ARMADILLO_CONF_OPTS = -DDETECT_HDF5=false
>>  
>> +# blas support may be provided by lapack, clapack or openblas
>> +# blas library from (c)lapack is libblas.a, libopenblas.a otherwise
>> +ARMADILLO_CONF_OPTS += -DBLAS_FOUND=ON
>> +ifeq ($(BR2_PACKAGE_ARMADILLO_OPENBLAS),y)
> 
> [...] so I guess you meant BR2_PACKAGE_ARMADILLO_BLAS_OPENBLAS here, no?

 See, that's why I resent this patch rather than just applying it :-)

 TBH I meant BR2_PACKAGE_ARMADILLO_OPENBLAS in Config.in, but it doesn't matter
much.

> 
>> +ARMADILLO_CONF_OPTS += -DBLAS_LIBRARIES=-lopenblas
>> +ARMADILLO_DEPENDENCIES = openblas
>> +else
>> +ARMADILLO_CONF_OPTS += -DBLAS_LIBRARIES=-lblas
>> +ifeq ($(BR2_PACKAGE_CLAPACK), y)
> 
> We don't usually add a space after the comma in an ifeq, especially in
> cases like this simple test.
> 
> Why duplicate the dependency on lapack/clapack in the !openblas case,
> when the same dependencies already exist, below?
> 
> I mean: in the !openblas case, we know that either lapack or clapack are
> enabled, so we know will hit either case in the block [...]
> 
>> +ARMADILLO_DEPENDENCIES = clapack
>> +else
>> +ARMADILLO_DEPENDENCIES = lapack
>> +endif
>> +endif
> 
> [...] here:
> 
>> +# lapack support may be provided by lapack or clapack
>> +# but not by openblas
>> +ifeq ($(BR2_PACKAGE_CLAPACK),y)
>> +ARMADILLO_CONF_OPTS += -DLAPACK_FOUND=ON
>> +ARMADILLO_DEPENDENCIES += clapack
>> +else ifeq ($(BR2_PACKAGE_LAPACK),y)
>> +ARMADILLO_CONF_OPTS += -DLAPACK_FOUND=ON
>> +ARMADILLO_DEPENDENCIES += lapack
>> +else
>> +ARMADILLO_CONF_OPTS += -DLAPACK_FOUND=OFF
>> +endif
> 
> Additionally, this block will be hit even in the openblas case. Is this
> expected?

 Historical accident. This is reworked from v3 which had an explicit Config.in
option for the lapack choice

 I'll send a v5 which fixes it. I still want Gwenhael to confirm that it's good
in this shape though.

 Regards,
 Arnout

_______________________________________________
buildroot mailing list
buildroot@busybox.net
http://lists.busybox.net/mailman/listinfo/buildroot

  reply	other threads:[~2021-07-25  9:36 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2021-07-24 21:45 [Buildroot] [PATCH v4 1/3] package/clapack: introduce BR2_PACKAGE_CLAPACK_ARCH_SUPPORTS Arnout Vandecappelle (Essensium/Mind)
2021-07-24 21:45 ` [Buildroot] [PATCH v4 2/3] package/lapack: introduce BR2_PACKAGE_LAPACK_ARCH_SUPPORTS Arnout Vandecappelle (Essensium/Mind)
2021-07-25  7:47   ` Yann E. MORIN
2021-07-24 21:45 ` [Buildroot] [PATCH v4 3/3] package/armadillo: allows to select between clapack, lapack or openblas Arnout Vandecappelle (Essensium/Mind)
2021-07-25  7:57   ` Yann E. MORIN
2021-07-25  9:36     ` Arnout Vandecappelle [this message]
2021-07-25 11:13       ` Arnout Vandecappelle
2021-07-25  7:47 ` [Buildroot] [PATCH v4 1/3] package/clapack: introduce BR2_PACKAGE_CLAPACK_ARCH_SUPPORTS Yann E. MORIN

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=f3776222-ad4d-2d73-9bf7-a79b335d10f3@mind.be \
    --to=arnout@mind.be \
    --cc=buildroot@buildroot.org \
    --cc=gwenhael.goavec-merou@trabucayre.com \
    --cc=yann.morin.1998@free.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox