From abf4a20b6cc34e0c646b7b8c44e0180a6e6ef65f Mon Sep 17 00:00:00 2001 From: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 11:45:35 +0900 Subject: [PATCH 1/6] feat: add how to reduce memory usage while building Signed-off-by: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> --- docs/support/troubleshooting.md | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index a88e8e921d3..8d52039f670 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -86,7 +86,13 @@ A workaround here is to limit the job number while building. MAKEFLAGS="-j4" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release ``` -You can adjust `-j4` to any number based on your system. +You can adjust `-j4` to any number based on your system. Please see [manual page of GNU make](https://www.gnu.org/software/make/manual/make.html#Parallel-Disable) for details. + +By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. + +```bash +MAKEFLAGS=-j1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 +``` ### Errors when using the latest version of Autoware From c45504a96dcb948200c9ff31a3c1ebc7cbcabbb6 Mon Sep 17 00:00:00 2001 From: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 11:53:09 +0900 Subject: [PATCH 2/6] feat: make options consistent Signed-off-by: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> --- docs/support/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index 8d52039f670..fd415d78255 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -91,7 +91,7 @@ You can adjust `-j4` to any number based on your system. Please see [manual page By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. ```bash -MAKEFLAGS=-j1 colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 +MAKEFLAGS="-j1" colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 ``` ### Errors when using the latest version of Autoware From 8944cc79a5e41885d95fe690ec6d47cbc6415880 Mon Sep 17 00:00:00 2001 From: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 11:54:33 +0900 Subject: [PATCH 3/6] feat: add symlink-install Signed-off-by: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> --- docs/support/troubleshooting.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index fd415d78255..75ceb5e5f4f 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -91,7 +91,7 @@ You can adjust `-j4` to any number based on your system. Please see [manual page By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. ```bash -MAKEFLAGS="-j1" colcon build --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 +MAKEFLAGS="-j1" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 ``` ### Errors when using the latest version of Autoware From 59c1b0375ec98c6d4c8c474bb253cd59b399dc2a Mon Sep 17 00:00:00 2001 From: Shintaro Tomie <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:39:32 +0900 Subject: [PATCH 4/6] Update docs/support/troubleshooting.md Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> --- docs/support/troubleshooting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index 75ceb5e5f4f..139c43c4b05 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -86,7 +86,8 @@ A workaround here is to limit the job number while building. MAKEFLAGS="-j4" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release ``` -You can adjust `-j4` to any number based on your system. Please see [manual page of GNU make](https://www.gnu.org/software/make/manual/make.html#Parallel-Disable) for details. +You can adjust `-j4` to any number based on your system. +For more details, see the [manual page of GNU make](https://www.gnu.org/software/make/manual/make.html#Parallel-Disable). By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. From 77f486926002f41a76c277685beac8bd4e5d6caf Mon Sep 17 00:00:00 2001 From: Shintaro Tomie <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 14:39:38 +0900 Subject: [PATCH 5/6] Update docs/support/troubleshooting.md Co-authored-by: Kenji Miyake <31987104+kenji-miyake@users.noreply.github.com> --- docs/support/troubleshooting.md | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index 139c43c4b05..74dff109ef9 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -89,7 +89,8 @@ MAKEFLAGS="-j4" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=R You can adjust `-j4` to any number based on your system. For more details, see the [manual page of GNU make](https://www.gnu.org/software/make/manual/make.html#Parallel-Disable). -By reducing the number of packages built in parallel, you can also reduce the amount of memory used. In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. +By reducing the number of packages built in parallel, you can also reduce the amount of memory used. +In the following example, the number of packages built in parallel is set to 1, and the number of jobs used by `make` is limited to 1. ```bash MAKEFLAGS="-j1" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 From dbc08ffb23b1b8a49f5563c2b4e25129010ac15a Mon Sep 17 00:00:00 2001 From: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> Date: Tue, 25 Apr 2023 17:49:31 +0900 Subject: [PATCH 6/6] feat: add note about trade-off between memory usage and time for building Signed-off-by: Shin-kyoto <58775300+Shin-kyoto@users.noreply.github.com> --- docs/support/troubleshooting.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/docs/support/troubleshooting.md b/docs/support/troubleshooting.md index 74dff109ef9..d175f418dfd 100644 --- a/docs/support/troubleshooting.md +++ b/docs/support/troubleshooting.md @@ -96,6 +96,11 @@ In the following example, the number of packages built in parallel is set to 1, MAKEFLAGS="-j1" colcon build --symlink-install --cmake-args -DCMAKE_BUILD_TYPE=Release --parallel-workers 1 ``` +!!! note + + By lowering both the number of packages built in parallel and the number of jobs used by `make`, you can reduce the memory usage. + However, this also means that the build process takes longer. + ### Errors when using the latest version of Autoware If you are working with the latest version of Autoware, issues can occur due to out-of-date software or old build files.