Dealii docker workflow

35 views
Skip to first unread message

Jiang Hu

unread,
Nov 23, 2022, 6:29:41 PM11/23/22
to deal.II User Group
Hi Dealii experts,

I am trying to use deal.ii through docker desktop on windows system.

I made the docker image pull : docker pull dealii/dealii:latest

and get into the image  through:  docker run -i -t dealii/dealii:latest

at the directory of /usr/local/examples, i am trying to run step-1 with 

cmake . 

I received below error message.  is there a docker image work flow i can follow?

sorry for this rookie question.

Thanks

Martin

///////////////////////////////////

 dealii@692261f3d221:/usr/local/examples/step-1$ cmake .
-- Using the deal.II-9.4.0 installation found at /usr/local
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_add_test.cmake
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_initialize_cached_variables.cmake
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_invoke_autopilot.cmake
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_pickup_tests.cmake
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_query_git_information.cmake
-- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_setup_target.cmake
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:173 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeOutput.log
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error: Could not open file for write in copy operation /usr/local/examples/step-1/CMakeFiles/3.16.3/CMakeSystem.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:185 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdC
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:116 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


-- The C compiler identification is unknown
CMake Error: Could not open file for write in copy operation /usr/local/examples/step-1/CMakeFiles/3.16.3/CMakeCCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCCompiler.cmake:212 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error: Could not find cmake module file: /usr/local/examples/step-1/CMakeFiles/3.16.3/CMakeCCompiler.cmake
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:228 (file):
  file problem creating directory:
  /usr/local/examples/step-1/CMakeFiles/3.16.3/CompilerIdCXX
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:32 (CMAKE_DETERMINE_COMPILER_ID_BUILD)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:879 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  /usr/share/cmake-3.16/Modules/CMakeDetermineCompilerId.cmake:60 (CMAKE_DETERMINE_COMPILER_ID_VENDOR)
  /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:111 (CMAKE_DETERMINE_COMPILER_ID)
  CMakeLists.txt:38 (PROJECT)


-- The CXX compiler identification is unknown
CMake Error: Could not open file for write in copy operation /usr/local/examples/step-1/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake.tmp
CMake Error: : System Error: No such file or directory
CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineCXXCompiler.cmake:210 (configure_file):
  configure_file Problem configuring file
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error: Could not find cmake module file: /usr/local/examples/step-1/CMakeFiles/3.16.3/CMakeCXXCompiler.cmake
-- Check for working C compiler: /usr/bin/cc
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:32 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeTmp/testCCompiler.c
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:44 (try_compile):
  Unknown extension ".c" for file

    /usr/local/examples/step-1/CMakeFiles/CMakeTmp/testCCompiler.c

  try_compile() works only for enabled languages.  Currently these are:

    C CXX

  See project() command to enable other languages.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


-- Check for working C compiler: /usr/bin/cc -- broken
CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:56 (file):
  file failed to open for writing (No such file or directory):

    /usr/local/examples/step-1/CMakeFiles/CMakeError.log
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


CMake Error at /usr/share/cmake-3.16/Modules/CMakeTestCCompiler.cmake:60 (message):
  The C compiler

    "/usr/bin/cc"

  is not able to compile a simple test program.

  It fails with the following output:





  CMake will not be able to correctly generate this project.
Call Stack (most recent call first):
  CMakeLists.txt:38 (PROJECT)


-- Configuring incomplete, errors occurred!
CMake Error: Cannot open file for write: /usr/local/examples/step-1/CMakeCache.txt.tmp
CMake Error: : System Error: Permission denied
CMake Error: Unable to open cache file for save. /usr/local/examples/step-1/CMakeCache.txt
CMake Error: : System Error: Permission denied
dealii@692261f3d221:/usr/local/examples/step-1$

Wolfgang Bangerth

unread,
Nov 23, 2022, 6:34:00 PM11/23/22
to dea...@googlegroups.com
On 11/23/22 16:29, Jiang Hu wrote:
> -- Include macro /usr/local/share/deal.II/macros/macro_deal_ii_setup_target.cmake
> CMake Error at /usr/share/cmake-3.16/Modules/CMakeDetermineSystem.cmake:173
> (file):
>   file failed to open for writing (No such file or directory):

You can't have write to this directory. Create a directory in your home dir,
copy everything from the step-1/ directory into it, and run
cmake -DDEAL_II_DIR=... ./
there.

Best
W.

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


Jiang Hu

unread,
Nov 23, 2022, 6:44:33 PM11/23/22
to deal.II User Group
Hi Porfessor Bangerth,

Thanks for your quick help.

if I only copy step-1 content to the directory I need to create in my home directory in the container, will it be able to find other dependency: the header files and library? they are not in my home directory.
I really know quite little about the linux file system.

many thanks

Martin 

Wolfgang Bangerth

unread,
Nov 23, 2022, 6:51:13 PM11/23/22
to dea...@googlegroups.com
On 11/23/22 16:44, Jiang Hu wrote:
>
> if I only copy step-1 content to the directory I need to create in my home
> directory in the container, will it be able to find other dependency: the
> header files and library? they are not in my home directory.

That's why you need to provide the
-DDEAL_II_DIR=...
flag to cmake. In fact, looking at the error message, what you need to say is
cmake -DDEAL_II_DIR=/usr/local/share/deal.II .
in the directory where you have your copied files.

Jiang Hu

unread,
Nov 23, 2022, 6:54:28 PM11/23/22
to deal.II User Group
Thanks, I will give it a go and hope it works.
appreciate your help.

Martin

Reply all
Reply to author
Forward
0 new messages