Setting up dealii through Docker

190 views
Skip to first unread message

Bhavesh Shrimali

unread,
Jun 25, 2020, 6:51:49 PM6/25/20
to deal.II User Group
Hi dealii users,

I wanted to get started with dealii (and in the long run hopefully use it for my research). Naturally, I sought the easiest way forward through docker. Since I use Singularity more often than docker (due to seamless transition to running on our HPC cluster) I put together a container here. It basically pulls the corresponding `tagged` image from DockerHub and installs a bunch of other libraries that I use in my research.

However when I try to execute step-1 as listed in the tutorials section, it seems that dealii isn't installed on the docker image (or maybe I am missing something)

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.


-- Configuring incomplete, errors occurred!




Does anyone know, what am I missing here ? 

Thanks in advance! 

Daniel Arndt

unread,
Jun 27, 2020, 12:04:14 AM6/27/20
to dea...@googlegroups.com
Bhavesh,

It's hard to tell if there is something going wrong and if so what it is from just the information you provided.
If you inspect your container can you find the deal.II library, i.e. the include files and the shared library?
If so, how did you try to invoke CMake when trying to build step-1? Do you set any environment variables like DEAL_II_DIR?

Best,
Daniel

--
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/d2840b63-7278-4519-a8dc-1282035dad2ao%40googlegroups.com.

Bhavesh Shrimali

unread,
Jun 27, 2020, 12:58:06 AM6/27/20
to deal.II User Group
Hi Daniel, 

Thanks for your reply. So the error above was pretty obvious 

So I was going to update this after today's try. I did see (after posting this) yesterday that I could see

/usr/includ/deal.II

the directories therein. Also I sourced  `.bashrc` in /home/dealii, which I thought would set the proper paths. I couldn't view the contents of .bashrc (my bad that I didn't install a text editor inside the container). Now it at least (perhaps) locates deal.II properly, but throws:

bshrima2@golubh1:/projects/meca/bshrima2/Deal2/examples/step-1$ cmake .
-- The C compiler identification is GNU 7.5.0
-- The CXX compiler identification is unknown
-- Check for working C compiler: /usr/bin/gcc
-- Check for working C compiler: /usr/bin/gcc -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
CMake Error at CMakeLists.txt:38 (PROJECT):
  The CMAKE_CXX_COMPILER:

    /usr/local/gcc/7.2.0/bin/c++

  is not a full path to an existing compiler tool.

  Tell CMake where to find the compiler by setting either the environment
  variable "CXX" or the CMake cache entry CMAKE_CXX_COMPILER to the full path
  to the compiler, or to the compiler name if it is in the PATH.


I am using cmake/3.12 that is installed on our cluster. I would update the container with a text editor and redo the entire process. 

As for building step-1, I copied step-1.cc and CMakeLists.txt in a new folder and did `cmake .` following the instructions on the dealii website. 

Thanks
Bhavesh

On Friday, 26 June 2020 23:04:14 UTC-5, Daniel Arndt wrote:
Bhavesh,

It's hard to tell if there is something going wrong and if so what it is from just the information you provided.
If you inspect your container can you find the deal.II library, i.e. the include files and the shared library?
If so, how did you try to invoke CMake when trying to build step-1? Do you set any environment variables like DEAL_II_DIR?

Best,
Daniel

Am Do., 25. Juni 2020 um 18:51 Uhr schrieb Bhavesh Shrimali <bhavesh...@gmail.com>:
Hi dealii users,

I wanted to get started with dealii (and in the long run hopefully use it for my research). Naturally, I sought the easiest way forward through docker. Since I use Singularity more often than docker (due to seamless transition to running on our HPC cluster) I put together a container here. It basically pulls the corresponding `tagged` image from DockerHub and installs a bunch of other libraries that I use in my research.

However when I try to execute step-1 as listed in the tutorials section, it seems that dealii isn't installed on the docker image (or maybe I am missing something)

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.


-- Configuring incomplete, errors occurred!




Does anyone know, what am I missing here ? 

Thanks in advance! 

--
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 dea...@googlegroups.com.

Luca Heltai

unread,
Jun 27, 2020, 2:58:07 AM6/27/20
to dea...@googlegroups.com
Are you using an example from deal.II master? If this is the case, the example looks for 9.3pre but the image we provide only has 9.1 installed.  Try inspecting the CMakeList.txt to see which version is being looked for, and try changing to 9.1. 

Luca

Il giorno 27 giu 2020, alle ore 06:58, Bhavesh Shrimali <bhavesh....@gmail.com> ha scritto:


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/3a602a9e-51b3-445d-99a1-ed564c37ccc3o%40googlegroups.com.

Bhavesh Shrimali

unread,
Jun 27, 2020, 9:34:02 PM6/27/20
to deal.II User Group
Hi Luca, 

Thanks a lot for the reply! After a fresh pull of the container (with vim installed) and changing CMakeLists.txt accordingly, everything works like charm  


Best,
Bhavesh


On Saturday, 27 June 2020 01:58:07 UTC-5, Luca Heltai wrote:
Are you using an example from deal.II master? If this is the case, the example looks for 9.3pre but the image we provide only has 9.1 installed.  Try inspecting the CMakeList.txt to see which version is being looked for, and try changing to 9.1. 

Luca

Luca Heltai

unread,
Jun 28, 2020, 2:43:51 AM6/28/20
to dea...@googlegroups.com
If you want to develop using an ide, you could use visual studio code, with the remote development extension. This allows you to compile inside the docker as if it was a local compiler (including code completion, and debugging facilities):

https://code.visualstudio.com/docs/remote/containers

Best,
Luca

Il giorno 28 giu 2020, alle ore 03:34, Bhavesh Shrimali <bhavesh....@gmail.com> ha scritto:


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/cc0f220f-1c6c-4bcb-a777-d7fc34545343o%40googlegroups.com.

Bhavesh Shrimali

unread,
Jun 28, 2020, 12:01:23 PM6/28/20
to deal.II User Group
Thanks Luca, 
Will checkout the remote extension of VS Code. I think I may have used it in past to work remotely on our cluster but never inside a container.  

Thanks again both Daniel and Luca! Hoping to pick up dealii in the coming months

Best,
Bhavesh


On Sunday, 28 June 2020 01:43:51 UTC-5, Luca Heltai wrote:
If you want to develop using an ide, you could use visual studio code, with the remote development extension. This allows you to compile inside the docker as if it was a local compiler (including code completion, and debugging facilities):

Reply all
Reply to author
Forward
0 new messages