Deal.II on Docker

47 views
Skip to first unread message

Robert Kopp

unread,
Mar 12, 2020, 9:47:46 PM3/12/20
to deal.II User Group
After some false starts, I was able to use deal.II on Ubuntu 18.04 by installing it from the backport PPA. It occurred to me that I might want to use it during a Windows session, and since Windows does not support it natively, the use of a pre-built Docker container came to mind.

The most likely candidate was dealii/dealii:latest. I was disappointed to note the the "examples" weren't there (or, at least, I can't find them) so I downloaded these from Github. As in the case of my abortive attempts on bare metal, I received such messages as the following:

dealii@5ee4b768bb50:~/dealii/examples/step-5$ cmake .
CMake Error at CMakeLists.txt:30 (MESSAGE):  

  *** Could not locate a (sufficiently recent) version of deal.II.  ***  

  You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake

  or set an environment variable "DEAL_II_DIR" that contains this path.

I was hoping that it would be a complete kit, but upbeat_albattani had let me down. Can anyone suggest a good way (reference, etc.) to get up to speed on this container? I can do everything I need to do on Linux, but there would be some advantage to being able to use it on Windows as well. 

Luca Heltai

unread,
Mar 13, 2020, 3:53:47 AM3/13/20
to dea...@googlegroups.com
The examples you are using are likely looking for deal.II 9.2.pre. Try changing the makefile, and see if that works. :-)

Luca

Il giorno 13 mar 2020, alle ore 02:47, Robert Kopp <iconokl...@gmail.com> ha scritto:


--
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/e007aee1-2057-4541-9eed-92c9bf5b0cf6%40googlegroups.com.

luca.heltai

unread,
Mar 14, 2020, 2:23:55 PM3/14/20
to Deal.II Users
By the way, the examples in the docker image are located under

$(spack location -i dealii)/share/deal.II/examples

i.e., you can go to

cd $(spack location -i dealii)/share/deal.II/examples

and from there, compile and run. Notice that they are not pre-compiled (they would just take up download bandwidth).

Best,
Luca

Reza Rastak

unread,
Mar 15, 2020, 6:58:30 PM3/15/20
to deal.II User Group
Hi Robert,

Please take a look at the dealii docker images that I built. They are updated weekly based on the latest master branch of dealii. It also includes a docker image built from the libdealii.ii-dev ubuntu package installed on ubuntu 18.04. I use these images to perform automated testing of my repositories. Feel free to ask me question about it or provide suggestions.


Regards,

Reza
> To unsubscribe from this group and stop receiving emails from it, send an email to dea...@googlegroups.com.

Robert Kopp

unread,
Mar 18, 2020, 12:45:06 AM3/18/20
to deal.II User Group
I was able to make it work, in a certain manner of speaking. I already had the source code of dealii on the host, with the examples in it. Then:

docker run --rm -t -i -v `pwd`:/home/dealii/app rrastak/dealii:ubuntu-package

See what an expert I am? This maps to the home directory on the host, and the examples can be run. I'm sure there's room for improvement (at least, on my part) though.

Reza Rastak

unread,
Mar 18, 2020, 10:33:59 PM3/18/20
to deal.II User Group
Hi Robert,

I am glad you were able to compile and run the example using the rrastak/dealii:ubuntu-package image. It seems that the example directory does not exist in this image, so you need to download the examples folder from GitHub. But be careful about possible incompatibly error in case the version of the GitHub code is very different than the dealii version already installed in this image as an ubuntu package. In most cases, it should work fine.

Alternatively, you can use the images rrastak/dealii:master-bare-gcc or rrastak/dealii:master-bare-clang and run the examples that are located in /dealii/examples. The advantage is that these images are updated every week based on the latest master branch of dealii. The disadvantage is that these images are bare, so they don't have the external libraries such as Trilinos, or OpemMPI.

If you use the official image dealii/dealii:latest, the examples are included in the directory /home/dealii/dealii-master-src/examples. Although this image represents dealii version 9.1.1 it has not been updated since 9 months ago, so the examples might be a little different than the latest development version on GitHub.

Hope this explanation is helpful.

Regards,

Reza
Reply all
Reply to author
Forward
0 new messages