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

Logging is preventing multiple jobs #71

Open
arpaterson opened this issue Oct 4, 2022 · 2 comments
Open

Logging is preventing multiple jobs #71

arpaterson opened this issue Oct 4, 2022 · 2 comments
Assignees
Labels
build performance a (build) performance related issue

Comments

@arpaterson
Copy link

arpaterson commented Oct 4, 2022

(On a Jetson Orin)

This script does not use more than one core, regardless of the value in $CPUS or $JOBS.

I have been having issues building opencv and getting it working with realsense-ros, so I've been reconfiguring and building using my own script, and the one in this git.

I noticed mine is dramatically faster, despite being almost identical aside from a few flags.

Changing nano_build_opencv's make command
make -j${JOBS} 2>&1 | tee -a build.log
to
make -j$(($(nproc)-1)) ,
removes the redirection of the output to the log file but gives a dramatic speed up, with jtop showing multiple or all 12 cores pegged at near 100%.

I think the cmake step is also affected.

Suspect this affects all systems.

@mdegans
Copy link
Owner

mdegans commented Jan 27, 2023

Thanks for letting me know. I haven't tested this recently, but I can see why multiple threads might be blocked writing to the same log file. There might be some options to make or tee that can resolve this.

Possibly ninja build could do a better job, although I don't know if cmake -G ninja works with OpenCV yet. Thanks for filing the issue. I'll look into this if I get a chance. Otherwise, feel free to submit a PR disabling logging for the moment.

@mdegans mdegans self-assigned this Jan 27, 2023
@mdegans mdegans added the build performance a (build) performance related issue label Jan 27, 2023
@arpaterson
Copy link
Author

No worries!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
build performance a (build) performance related issue
Projects
None yet
Development

No branches or pull requests

2 participants