[CP2K-user] [CP2K:20895] Accelerate Framework vs. OpenBLAS
Rashid Riboul
sastargetx at gmail.com
Tue Nov 12 07:30:35 UTC 2024
It would be an interesting development hobby; I think it would involve
making sure that the differences in commands between OpenBLAS and
Accelerate are accounted for.
On Monday, November 4, 2024 at 12:36:45 AM UTC-8 Krack Matthias wrote:
>
>
> The CP2K toolchain uses (always) OpenBLAS in a first step to detect the
> CPU type. The subsequent full build and linking of the OpenBLAS library
> during the make step, however, is optional, e.g. MKL or other libs
> providing LAPACK/BLAS can be used instead.
>
>
>
> The latest update of the Darwin arch files either links the OpenBLAS
> library (default) or the Accelerate framework
> <https://github.com/cp2k/cp2k/blob/master/arch/Darwin-gnu-arm64.psmp#L267-L276>
> and tries to separate clearly both choices.
>
>
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of
> Rashid Riboul <sasta... at gmail.com>
> *Date: *Monday, 4 November 2024 at 04:46
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *Re: [CP2K:20851] Accelerate Framework vs. OpenBLAS
>
> Oh, I see. So with the way the Darwin arch files are written now, it seems
> that it is using both Accelerate AND OpenBLAS together, right?
>
>
>
> Also; I understand that there isn't any significant performance gain with
> Accelerate vs. OpenBLAS, but I wanted to try to use only Accelerate since
> according to Apple's own literature, usage of it's linear algebra
> frameworks has better core utilization efficiency and just wanted to use it
> for both CP2K and eventually GROMACS.
>
>
>
> On Sunday, November 3, 2024 at 12:10:34 PM UTC-8 Krack Matthias wrote:
>
> Hi
>
>
>
> Your observation matches my experience. While the compilation using the
> Accelerate framework works, the subsequent regression test run fails. That
> is why the OpenBLAS library is still used as the default LAPACK/BLAS
> instead of the Accelerate framework with Darwin. I have updated the macOS
> arch files to facilitate the switching between OpenBLAS and the Accelerate
> framework. Maybe further adjustments are needed to get it working properly.
>
>
>
> To the best of my knowledge, there is, however, no evidence yet that the
> Accelerate framework will provide any significant performance gain compared
> to OpenBLAS.
>
>
>
> Best
>
>
>
> Matthias
>
>
>
> *From: *cp... at googlegroups.com <cp... at googlegroups.com> on behalf of
> Rashid Riboul <sasta... at gmail.com>
> *Date: *Saturday, 2 November 2024 at 07:34
> *To: *cp2k <cp... at googlegroups.com>
> *Subject: *[CP2K:20846] Accelerate Framework vs. OpenBLAS
>
> Hi;
>
>
>
> So, I installed the program using the default arch files for MacOS install
> (thanks Krack!) and tested the install and got no errors during regression
> testing!
>
>
>
> I then proceeded to reinstall CP2K to only utilize Apple's Accelerate
> Framework as the BLAS and LAPACK libraries and while it did compile, I had
> one failure and 10 wrong values during the regression testing.
>
>
>
> I think that I'm probably not implementing the framework properly. I saw
> in the instructions that " -D__ACCELERATE" must be defined to account for
> some interface incompatibilities between Accelerate and reference
> BLAS/LAPACK, but I'm not entirely sure how to do that. The only thing I did
> do was add "-framework Accelerate" to the LIBS flag at the end of the arch
> file. Is there something else that needs to be done to define the framework?
>
> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cp2k+uns... at googlegroups.com.
> To view this discussion visit
> https://groups.google.com/d/msgid/cp2k/e9d370dd-eb2b-409d-9d49-eb1625db925bn%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/e9d370dd-eb2b-409d-9d49-eb1625db925bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to cp2k+uns... at googlegroups.com.
>
> To view this discussion visit
> https://groups.google.com/d/msgid/cp2k/1c9f88e1-34b9-4767-90c0-8a694a03a16bn%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/1c9f88e1-34b9-4767-90c0-8a694a03a16bn%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
--
You received this message because you are subscribed to the Google Groups "cp2k" group.
To unsubscribe from this group and stop receiving emails from it, send an email to cp2k+unsubscribe at googlegroups.com.
To view this discussion visit https://groups.google.com/d/msgid/cp2k/3abde0d9-36d8-436d-8872-8ddef51be8b6n%40googlegroups.com.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20241111/b382956a/attachment.htm>
More information about the CP2K-user
mailing list