Deal.ii works on Linux subsystem in Windows 10

425 views
Skip to first unread message

Krzysztof Bzowski

unread,
Oct 27, 2016, 11:43:13 AM10/27/16
to dea...@googlegroups.com
This is not a huge deal, but I believe it is worth mentioning because
there is a group of users who still want to use deal.ii on Windows.

Windows 10’s Anniversary Update (build 1607) brings Linux Bash Shell
based on Ubuntu. It is really easy to install and may replace (in the
future) more sophisticated virtual machines like VirtualBox.

Activate the "Developer Mode" switch in Settings > Update & Security >
For Developers. Open Control Panel, click "Programs" > "Turn Windows
Features On or Off" under Programs and Features. Enable the "Windows
Subsystem for Linux (Beta)". After that you need to reboot and "Bash"
will be available in Start Menu. You can install additional packages
using sudo apt-get install <package> command.... and build deal.ii.

Deal.ii 8.4.2 builds and installs successfully. Quick Tests passed.
Simple examples looks to work correctly.

However, I had a problem to build current git version.
expand_instantiations fails with "Invalid instantiation list: missing
'for'" for source/fe/fe_bdm.inst. So it will require further investigation.

TL;DR. Linux shell in Windows works like small virtual machine (but it
is not a virtual machine) with shared file system. This is still beta
but you can build and run deal.ii based applications. I also see some
drawbacks. Graphical application works... sometimes. Compilation will
produce valid linux binaries so the solution is rather not portable
between different windows systems.

Last but not least. There is a plugin (paid) for Visual Studio which
supports building and debugging using Linux subsystem in Windows.

Best regards,
Krzysztof

Wolfgang Bangerth

unread,
Oct 27, 2016, 11:14:27 PM10/27/16
to dea...@googlegroups.com

Krzysztof,

> This is not a huge deal, but I believe it is worth mentioning because there is
> a group of users who still want to use deal.ii on Windows.

No, I think this *is* a big deal -- thanks for being persistent and figuring
this out!

Would you mind putting a version of...

> Windows 10’s Anniversary Update (build 1607) brings Linux Bash Shell based on
> Ubuntu. It is really easy to install and may replace (in the future) more
> sophisticated virtual machines like VirtualBox.
>
> Activate the "Developer Mode" switch in Settings > Update & Security > For
> Developers. Open Control Panel, click "Programs" > "Turn Windows Features On
> or Off" under Programs and Features. Enable the "Windows Subsystem for Linux
> (Beta)". After that you need to reboot and "Bash" will be available in Start
> Menu. You can install additional packages using sudo apt-get install <package>
> command.... and build deal.ii.

...this, possibly slightly expanded where necessary, into either the wiki at

https://github.com/dealii/dealii/wiki/Frequently-Asked-Questions#can-i-use-dealii-on-a-windows-platform
or
https://github.com/dealii/dealii/wiki/Windows
or (best of all) both? That would definitely be fantastic!


> Deal.ii 8.4.2 builds and installs successfully. Quick Tests passed. Simple
> examples looks to work correctly.
>
> However, I had a problem to build current git version. expand_instantiations
> fails with "Invalid instantiation list: missing 'for'" for
> source/fe/fe_bdm.inst. So it will require further investigation.

Hm. It's there, I guess, in the file. In fact, nothing in the file has
changed, so if anything it must be in expand_instantiations.cc, or a
miscompilation...


> TL;DR. Linux shell in Windows works like small virtual machine (but it is not
> a virtual machine) with shared file system. This is still beta but you can
> build and run deal.ii based applications. I also see some drawbacks. Graphical
> application works... sometimes. Compilation will produce valid linux binaries
> so the solution is rather not portable between different windows systems.
>
> Last but not least. There is a plugin (paid) for Visual Studio which supports
> building and debugging using Linux subsystem in Windows.

I would guess that one can also just use Eclipse, which is free and will
likely just work because it can use cmake's Makefile generator in the Eclipse
project.

Best
W.


--
------------------------------------------------------------------------
Wolfgang Bangerth email: bang...@colostate.edu
www: http://www.math.colostate.edu/~bangerth/

Timo Heister

unread,
Oct 28, 2016, 12:40:31 PM10/28/16
to dea...@googlegroups.com
I also played with bash for windows last week and got the same
conclusion: it is super easy to get it to work. I was too busy to
write up an FAQ entry, but I agree that this is probably the best
option on windows right now.


> I would guess that one can also just use Eclipse, which is free and will
> likely just work because it can use cmake's Makefile generator in the
> Eclipse project.

I installed "Visual Studio Code", which worked really well by just
pointing it at the source directory.

--
Timo Heister
http://www.math.clemson.edu/~heister/
Reply all
Reply to author
Forward
0 new messages