Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for parallel compilation #96

Open
jvoisin opened this issue Aug 11, 2022 · 1 comment
Open

Add support for parallel compilation #96

jvoisin opened this issue Aug 11, 2022 · 1 comment
Assignees

Comments

@jvoisin
Copy link
Contributor

jvoisin commented Aug 11, 2022

It's currently not possible to build Mesh using more than one core:

$ /tmp/Mesh git show  | head -n 1
commit 797e234afacfc9b9a0d1b13873f2b32c8bc5ef54
$ /tmp/Mesh cmake .
-- The CXX compiler identification is GNU 12.1.0
-- The C compiler identification is GNU 12.1.0
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/Mesh
$ /tmp/Mesh make -j 8
[  2%] Creating directories for 'googletest'
[  4%] Building CXX object src/CMakeFiles/mesh.dir/global_heap.cc.o
[  7%] Building CXX object src/CMakeFiles/mesh.dir/runtime.cc.o
[ 11%] Building CXX object src/CMakeFiles/mesh.dir/real.cc.o
[ 11%] Building CXX object src/CMakeFiles/mesh.dir/d_assert.cc.o
[ 14%] Creating directories for 'heap_layers'
[ 16%] Building CXX object src/CMakeFiles/unit.test.dir/d_assert.cc.o
[ 19%] Building CXX object src/CMakeFiles/mesh.dir/meshable_arena.cc.o
[ 23%] Performing download step (git clone) for 'googletest'
[ 23%] Performing download step (git clone) for 'heap_layers'
Cloning into 'heap_layers-src'...
Cloning into 'googletest-src'...
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/global_heap.h:14,
                 from /tmp/Mesh/src/global_heap.cc:8:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /tmp/Mesh/src/real.cc:10:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/mesh.dir/build.make:90: src/CMakeFiles/mesh.dir/global_heap.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[2]: *** [src/CMakeFiles/mesh.dir/build.make:118: src/CMakeFiles/mesh.dir/real.cc.o] Error 1
In file included from /tmp/Mesh/src/d_assert.cc:11:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/mesh.dir/build.make:76: src/CMakeFiles/mesh.dir/d_assert.cc.o] Error 1
[ 26%] Building CXX object src/CMakeFiles/unit.test.dir/global_heap.cc.o
[ 28%] Building CXX object src/CMakeFiles/unit.test.dir/runtime.cc.o
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/runtime.h:22,
                 from /tmp/Mesh/src/runtime.cc:18:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/mesh.dir/build.make:104: src/CMakeFiles/mesh.dir/runtime.cc.o] Error 1
[ 30%] Building CXX object src/CMakeFiles/unit.test.dir/real.cc.o
In file included from /tmp/Mesh/src/d_assert.cc:11:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
[ 33%] Building CXX object src/CMakeFiles/unit.test.dir/meshable_arena.cc.o
make[2]: *** [src/CMakeFiles/unit.test.dir/build.make:76: src/CMakeFiles/unit.test.dir/d_assert.cc.o] Error 1
make[2]: *** Waiting for unfinished jobs....
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/meshable_arena.h:31,
                 from /tmp/Mesh/src/meshable_arena.cc:26:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/mesh.dir/build.make:132: src/CMakeFiles/mesh.dir/meshable_arena.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:156: src/CMakeFiles/mesh.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/global_heap.h:14,
                 from /tmp/Mesh/src/global_heap.cc:8:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /tmp/Mesh/src/real.cc:10:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/unit.test.dir/build.make:90: src/CMakeFiles/unit.test.dir/global_heap.cc.o] Error 1
make[2]: *** [src/CMakeFiles/unit.test.dir/build.make:118: src/CMakeFiles/unit.test.dir/real.cc.o] Error 1
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/runtime.h:22,
                 from /tmp/Mesh/src/runtime.cc:18:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
In file included from /tmp/Mesh/src/internal.h:21,
                 from /tmp/Mesh/src/meshable_arena.h:31,
                 from /tmp/Mesh/src/meshable_arena.cc:26:
/tmp/Mesh/src/common.h:39:10: fatal error: utility/ilog2.h: No such file or directory
   39 | #include "utility/ilog2.h"
      |          ^~~~~~~~~~~~~~~~~
compilation terminated.
make[2]: *** [src/CMakeFiles/unit.test.dir/build.make:104: src/CMakeFiles/unit.test.dir/runtime.cc.o] Error 1
make[2]: *** [src/CMakeFiles/unit.test.dir/build.make:132: src/CMakeFiles/unit.test.dir/meshable_arena.cc.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:182: src/CMakeFiles/unit.test.dir/all] Error 2
HEAD is now at a80041c Some types to eliminate warnings.
[ 35%] Performing update step for 'heap_layers'
[ 38%] No patch step for 'heap_layers'
[ 40%] No configure step for 'heap_layers'
[ 42%] No build step for 'heap_layers'
[ 45%] No install step for 'heap_layers'
[ 47%] No test step for 'heap_layers'
[ 50%] Completed 'heap_layers'
[ 50%] Built target heap_layers
HEAD is now at 3e0e32ba Merge pull request #3664 from kuzkry:typo-fixes
[ 52%] Performing update step for 'googletest'
[ 54%] No patch step for 'googletest'
[ 57%] Performing configure step for 'googletest'
-- The C compiler identification is GNU 12.1.0
-- The CXX compiler identification is GNU 12.1.0
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Check for working C compiler: /usr/bin/cc - skipped
-- Detecting C compile features
-- Detecting C compile features - done
-- Detecting CXX compiler ABI info
-- Detecting CXX compiler ABI info - done
-- Check for working CXX compiler: /usr/bin/c++ - skipped
-- Detecting CXX compile features
-- Detecting CXX compile features - done
-- Found Python: /usr/bin/python3.10 (found version "3.10.5") found components: Interpreter 
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD
-- Performing Test CMAKE_HAVE_LIBC_PTHREAD - Failed
-- Looking for pthread_create in pthreads
-- Looking for pthread_create in pthreads - not found
-- Looking for pthread_create in pthread
-- Looking for pthread_create in pthread - found
-- Found Threads: TRUE  
-- Configuring done
-- Generating done
-- Build files have been written to: /tmp/Mesh/googletest-build
[ 59%] Performing build step for 'googletest'
[ 12%] Building CXX object googletest/CMakeFiles/gtest.dir/src/gtest-all.cc.o
[ 25%] Linking CXX static library ../lib/libgtest.a
[ 25%] Built target gtest
[ 37%] Building CXX object googlemock/CMakeFiles/gmock.dir/src/gmock-all.cc.o
[ 50%] Building CXX object googletest/CMakeFiles/gtest_main.dir/src/gtest_main.cc.o
[ 62%] Linking CXX static library ../lib/libgtest_main.a
[ 62%] Built target gtest_main
[ 75%] Linking CXX static library ../lib/libgmock.a
[ 75%] Built target gmock
[ 87%] Building CXX object googlemock/CMakeFiles/gmock_main.dir/src/gmock_main.cc.o
[100%] Linking CXX static library ../lib/libgmock_main.a
[100%] Built target gmock_main
[ 61%] No install step for 'googletest'
[ 64%] No test step for 'googletest'
[ 66%] Completed 'googletest'
[ 66%] Built target googletest
make: *** [Makefile:91: all] Error 2
[2]
$ /tmp/Mesh 
@emeryberger
Copy link
Member

@bpowers @bobby-stripe maybe a missing dependency on Heap Layers?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants