What is the path to the dealii installation directory in a containerized version?

223 views
Skip to first unread message

Jhon Uribe

unread,
Jul 30, 2019, 4:48:47 PM7/30/19
to deal.II User Group

Hello


I am using a container from the image v9.1.1-gcc-mpi-fulldepsspack-debugrelease, but when I try to use the command "cmake -DDEAL_II_DIR=/path/to/installed/deal.II .", I don't know what to replace the string "/path/to/installed/deal.II" for.


Thank you for your attention


Jhon Uribe

unread,
Jul 30, 2019, 6:23:11 PM7/30/19
to deal.II User Group
This is the problem:

I have the following files (in the directory /home/dealii/documents/examples_backup/step-1):

dealii@9b28e44a5519:~/documents/examples_backup/step-1$ ls
CMakeLists.txt  doc  step-1.cc

Then I write the following command:

dealii@9b28e44a5519:~/documents/examples_backup/step-1$ cmake .

And the following error is printed:

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!

luca.heltai

unread,
Jul 31, 2019, 2:35:52 AM7/31/19
to Jhon Uribe, Deal.II Users
Jhon,

the path is there, and it is correct. The message is telling you that you are in a directory containing developement version of the examples.

If you inspect the CMakeLists.txt of the example you are trying to compile, it tells you:


FIND_PACKAGE(deal.II 9.2.0 QUIET
HINTS ${deal.II_DIR} ${DEAL_II_DIR} ../ ../../ $ENV{DEAL_II_DIR}
)
IF(NOT ${deal.II_FOUND})
MESSAGE(FATAL_ERROR "\n"
"*** Could not locate a (sufficiently recent) version of deal.II. ***\n\n"
"You may want to either pass a flag -DDEAL_II_DIR=/path/to/deal.II to cmake\n"
"or set an environment variable \"DEAL_II_DIR\" that contains this path."
)
ENDIF()

i.e., I guess your program is looking for deal.II 9.2.0, but finds only 9.1.1, and bails out.

Try replacing 9.2.0 with 9.1.0 in the CMakeLists.txt, and you should be able to compile and run within docker.

Best,
Luca.

> On 30 Jul 2019, at 23:39, Luca Heltai <luca....@gmail.com> wrote:
>
> You don't need to do that, because the container already export DEAL_II_DIR to the correct path.
>
> Luca
>
> Il giorno 30 lug 2019, alle ore 22:50, Jhon Uribe <jaur...@gmail.com> ha scritto:
>
>>
>>
>> El martes, 30 de julio de 2019, 15:48:47 (UTC-5), Jhon Uribe escribió:

Jhon Uribe

unread,
Jul 31, 2019, 3:37:13 AM7/31/19
to luca.heltai, Deal.II Users
Thank very much Luca, it worked!
Reply all
Reply to author
Forward
0 new messages