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

Output from Rust profiler build hides concurrent C++ build output #860

Open
manopapad opened this issue Oct 13, 2023 · 1 comment
Open
Assignees
Labels
bug Something isn't working

Comments

@manopapad
Copy link
Contributor

During our Legion build we also do the build of the legion profiler (which goes through Corrosion), and that happens in a recursive invocation of cmake:

    [0/227] cd /home/mpapadakis/condagcc/legion/tools/legion_prof_rs && /home/mpapadakis/condagcc/env/bin/cmake -E env ...

At that point the sub-cmake seems to take over the output, and prints out successive lines of which package it’s compiling, e.g.

       Compiling libc v0.2.147
       Compiling memchr v2.5.0
       ...

In the meantime, other targets from the parent cmake invocation continue to be built, but their output is lost.

See no-corrosion.txt and with-corrosion.txt for a comparison.

I tried disabling cargo's progress bar CARGO_TERM_PROGRESS_WHEN=never, but that didn't help.

I'm reporting this here because I was not able to reproduce using a pure Legion build, so it possibly has something to do with the recursive build of Legion that we do during legate.core build, or possibly our use of ninja, or who knows what.

On a pure Legion build:

~/temp> git clone --depth 1 [email protected]:StanfordLegion/legion.git
~/temp> cd legion
~/temp/legion> mkdir build/
~/temp/legion> cd build/
~/temp/legion/build> cmake -DLegion_BUILD_RUST_PROFILER=ON ..
~/temp/legion/build> cmake --build . -j 2

I see the lines from corrosion/cargo mixed together with the C++ compilation lines, but at least no lines get lost.

@manopapad manopapad added the bug Something isn't working label Oct 13, 2023
@manopapad manopapad changed the title Build output from the Rust Legion profiler hides output of concurrent C++ builds Output from Rust profiler build hides concurrent C++ build output Oct 13, 2023
@manopapad
Copy link
Contributor Author

I tried passing --quiet to conda-build:

@@ -964,6 +964,7 @@ if(Legion_BUILD_ALL OR Legion_BUILD_RUST_PROFILER)
     MANIFEST_PATH tools/legion_prof_rs/Cargo.toml
     ALL_FEATURES
     PROFILE release
+    FLAGS --quiet
   )

   install(

This kills all the output from the legion_prof step, but still the concurrent output is hidden:

    -- Build files have been written to: /home/mpapadakis/condagcc/legate.core/_skbuild/linux-x86_64-3.10/cmake-build
    [0/227] cd /home/mpapadakis/condagcc/legion/tools/legion_prof_rs && /home/mpapadakis/condagcc/env/bin/cmake -E env CARGO_TARGET_X86_64_UNKNOWN_LINUX_GNU_LINKER=/home/mpapadakis/condagcc/env/bin/x86_64-conda-linux-gnu-cc CC_x86_64-unknown-linux-gnu=/home/mpapadakis/condagcc/env/bin/x86_64-conda-linux-gnu-cc CXX_x86_64-unknown-linux-gnu=/home/mpapadakis/condagcc/env/bin/x86_64-conda-linux-gnu-c++ CORROSION_BUILD_DIR=/home/mpapadakis/condagcc/legate.core/_skbuild/linux-x86_64-3.10/cmake-build/_deps/legion-build CARGO_BUILD_RUSTC=/home/mpapadakis/condagcc/env/bin/rustc /home/mpapadakis/condagcc/env/bin/cargo rustc --bin=legion_prof --target=x86_64-unknown-linux-gnu --all-features --package legion_prof --manifest-path /home/mpapadakis/condagcc/legion/tools/legion_prof_rs/Cargo.toml --target-dir /home/mpapadakis/condagcc/legate.core/_skbuild/linux-x86_64-3.10/cmake-build/./cargo/build --profile=release --quiet -- -Cdefault-linker-libraries=yes
    [207/227] /home/mpapadakis/condagcc/env/bin/x86_64-conda-linux-gnu-c++ -DLegionRuntime_EXPORTS -DUSE_CUDA -I/home/mpapadakis/condagcc/legion/runtime -I/home/mpapadakis/condagcc/legate.core/_skbuild/linux-x86_64-3.10/cmake-build/_deps/legion-build/runtime -fvisibility-inlines-hidden -fmessage-length=0 -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /home/mpapadakis/condagcc/env/include  -I/home/mpapadakis/condagcc/env/targets/x86_64-linux/include  -L/home/mpapadakis/condagcc/env/targets/x86_64-linux/lib -L/home/mpapadakis/condagcc/env/targets/x86_64-linux/lib/stubs -march=haswell -O0 -g -std=gnu++17 -fPIC -MD -MT _deps/legion-build/runtime/CMakeFiles/LegionRuntime.dir/legion/legion_analysis.cc.o -MF _deps/legion-build/runtime/CMakeFiles/LegionRuntime.dir/legion/legion_analysis.cc.o.d -o _deps/legion-build/runtime/CMakeFiles/LegionRuntime.dir/legion/legion_analysis.cc.o -c /home/mpapadakis/condagcc/legion/runtime/legion/legion_analysis.cc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants