dealii/spack on apple m1

305 views
Skip to first unread message

Praveen C

unread,
Apr 15, 2021, 1:00:07 AM4/15/21
to Deal. II Googlegroup
Dear all

Has anyone succeeded in installing dealii via spack on an apple m1 ?

What works/does not work ?

spack gives me a spec but also gives some warnings

$ spack spec dealii
Input spec
--------------------------------
dealii

Concretized
--------------------------------
sysctl: unknown oid 'machdep.cpu.leaf7_features'
sysctl: unknown oid 'machdep.cpu.vendor'
sysctl: unknown oid 'machdep.cpu.model'
sysctl: unknown oid 'machdep.cpu.leaf7_features'
sysctl: unknown oid 'machdep.cpu.vendor'
sysctl: unknown oid 'machdep.cpu.model'

Or have you been able to compile dealii via some other method on m1 ?

Thanks
praveen

Alberto Salvadori

unread,
Apr 15, 2021, 2:38:38 AM4/15/21
to dea...@googlegroups.com
Hi Praveen,

here is my experience on apple M1 and deal.ii.

1 - After opening a terminal rosetta, installing gcc, installing deal.ii via spack and using gfortran from gcc installation, it works just fine
2 - Even in a rosetta terminal, the current dmg package does not seem to work
3 - After opening a terminal rosetta, NOT installing gcc, installing deal.ii via spack and using gfortran from homebrew installation, deal.ii apparently does not work
4 - I had some issues with openmpi after installation, because of the dynamic library that apparently conflicts with cmake. My skills are very limited, but with some further work (that I cannot recall now)
I made it, even with Xcode projects.

Hope it helps
Alberto

Alberto Salvadori
 Dipartimento di Ingegneria Meccanica e Industriale (DIMI)
 Universita` di Brescia, via Branze 43, 25123 Brescia
 Italy
 tel 030 3715426

e-mail:
 alberto....@unibs.it
web-page:
 http://m4lab.unibs.it/faculty.html



--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/dealii/CCA9B9D2-AC5B-4327-820D-472FB5AE3BDB%40gmail.com.


Informativa sulla Privacy: http://www.unibs.it/node/8155

Praveen C

unread,
Apr 15, 2021, 5:11:27 AM4/15/21
to Deal. II Googlegroup
Thank you for sharing your experience.

So it looks like we cannot yet install spack natively, right ?

On 15-Apr-2021, at 12:08 PM, Alberto Salvadori <alberto....@unibs.it> wrote:

1 - After opening a terminal rosetta, installing gcc, installing deal.ii via spack and using gfortran from gcc installation, it works just fine

Here both gfortran and spack are under rosetta.

2 - Even in a rosetta terminal, the current dmg package does not seem to work
3 - After opening a terminal rosetta, NOT installing gcc, installing deal.ii via spack and using gfortran from homebrew installation, deal.ii apparently does not work

Here gfortran is native but spack is under emulation, which does not work.

4 - I had some issues with openmpi after installation, because of the dynamic library that apparently conflicts with cmake. My skills are very limited, but with some further work (that I cannot recall now)
I made it, even with Xcode projects.

Best
praveen

Jean-Paul Pelteret

unread,
Apr 16, 2021, 2:56:39 PM4/16/21
to dea...@googlegroups.com
Dear Praveen,

Even though you’re trying to install deal.II, it would seem that the issue that you documented

sysctl: unknown oid 'machdep.cpu.leaf7_features'
sysctl: unknown oid 'machdep.cpu.vendor'
sysctl: unknown oid 'machdep.cpu.model'
sysctl: unknown oid 'machdep.cpu.leaf7_features'
sysctl: unknown oid 'machdep.cpu.vendor'
sysctl: unknown oid 'machdep.cpu.model'

must be pervasive for all Spack packages. So I think that if you want to get to the bottom of this, then you should probably raise the question with the Spack developers. It might in fact be that someone has already raised this issue with them? 


In fact, there was confirmation of an initial fix on a feature branch just hours ago:

Best,
Jean-Paul

--
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see https://groups.google.com/d/forum/dealii?hl=en
---
You received this message because you are subscribed to the Google Groups "deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to dealii+un...@googlegroups.com.

Praveen C

unread,
Apr 16, 2021, 11:55:39 PM4/16/21
to Deal. II Googlegroup
Thanks for pointing this out. I think these recent fixes should be the solution to compiling on M1. I will give it a try.

best
praveen

Praveen C

unread,
May 12, 2021, 8:31:52 AM5/12/21
to Deal. II Googlegroup
Latest spack detects the cpu properly on apple m1.

But installing deal.II via spack leads to many dependencies not able to compile.

However, I could install and run deal.II via docker. It installed the ubuntu focal version, which seems to work.

Compiling deal.II code under docker seems somewhat slow, though.

best
praveen
Reply all
Reply to author
Forward
0 new messages