Subject: Discussion related to cado-nfs
List archive
- From: Emmanuel Thomé <Emmanuel.Thome@inria.fr>
- To: cado-nfs@inria.fr
- Subject: Re: [cado-nfs] reducing space after compiling?
- Date: Thu, 8 Jul 2021 09:43:47 +0200
- Ironport-hdrordr: A9a23:Q8Bgsqqum4iiR0aQIW6LNqoaV5oKeYIsimQD101hICG9Vvb5qynIpoV56faUskdyZJhOo6HlBEDtewKkyXcX2+gs1MmZLXPbUQKTRekPguXfKlvbakrDH4VmpN9dmsZFebvNJGk/pcvn5GCDYq0dKaG8gcWVrNab81MoZwRrZ6Z8qy91Bx3zKCYdKTV7OQ==
Hi,
-g does take a huge lot of space. If you're not willing to debug the
code, feel free to take -g out of your CFLAGS / CXXFLAGS
Now you might tell me that you did, and that the space is still enormous.
Indeed, CMakeLists.txt forces -g, which does not make a lot of sense. I'm
taking this out (latest commit on master branch ; I'm attaching the
patch as well, since inria gitlab seems to be off today)
The outcome is as follows.
$ export CFLAGS="-O3 -DNDEBUG" CXXFLAGS="-O3 -DNDEBUG"
force_build_tree=/tmp/test0
$ make tidy ; make -j8
[...]
$ eval `make show` ; du -sh $build_tree
167M [...]
$ export CFLAGS="-g -O3 -DNDEBUG" CXXFLAGS="-g -O3 -DNDEBUG"
force_build_tree=/tmp/test1
$ make tidy ; make -j8
[...]
$ eval `make show` ; du -sh $build_tree
2.1G [...]
E.
On Wed, Jul 07, 2021 at 10:12:29PM +0200, François Morain wrote:
> On my cluster, I find that
>
> % du -s build
> 2985456 build
>
> It's annoying on such a shared cluster...
>
> Is there an easy way to reduce the space? Like for instance removing
> DL stuff if only factoring (and vice-versa) or some other trick?
>
> Thanks in advance,
> FM
>
> --
From 3595130412156b4b7439528d3e59b5b84aa5ef0b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Emmanuel=20Thom=C3=A9?= <Emmanuel.Thome@inria.fr> Date: Wed, 7 Jul 2021 22:59:31 +0200 Subject: [PATCH] do not force -g --- CMakeLists.txt | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/CMakeLists.txt b/CMakeLists.txt index ec45952c6..eb7a1844e 100644 --- a/CMakeLists.txt +++ b/CMakeLists.txt @@ -146,7 +146,7 @@ if(CMAKE_COMPILER_IS_GNUCC) # prevents the definition of __STRICT_ANSI__ # # Ditto for C++, with the c++98/gnu++98 subtlety. - set (CMAKE_C_FLAGS "-g -W -Wall ${CMAKE_C_FLAGS}") + set (CMAKE_C_FLAGS "-W -Wall ${CMAKE_C_FLAGS}") if (MINGW) set (CMAKE_C_FLAGS "-std=gnu99 ${CMAKE_C_FLAGS}") else() @@ -156,7 +156,7 @@ if(CMAKE_COMPILER_IS_GNUCC) endif() if(CMAKE_CXX_COMPILER_ID STREQUAL "GNU") - set (CMAKE_CXX_FLAGS "-g -W -Wall ${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "-W -Wall ${CMAKE_CXX_FLAGS}") if (CMAKE_CXX_COMPILER_VERSION VERSION_LESS 5.0) message(FATAL_ERROR "cado-nfs requires gcc version 5 or greater") endif() @@ -177,8 +177,8 @@ endif() if(CMAKE_C_COMPILER_ID MATCHES "Intel") message(STATUS "Applying flags for icc") - set (CMAKE_C_FLAGS "-g -W -Wall -wd13200,13203 ${CMAKE_C_FLAGS}") - set (CMAKE_CXX_FLAGS "-g -W -Wall -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}") + set (CMAKE_C_FLAGS "-W -Wall -wd13200,13203 ${CMAKE_C_FLAGS}") + set (CMAKE_CXX_FLAGS "-W -Wall -wd13200,13203,3058 ${CMAKE_CXX_FLAGS}") set (CMAKE_C_FLAGS "-std=c99 ${CMAKE_C_FLAGS}") # only icc>=15 is full c++11 compliant, it seems. But 14 will do. @@ -190,13 +190,13 @@ if(CMAKE_C_COMPILER_ID MATCHES "Intel") message(STATUS "Not enabling C++11 support for ICC 14, see bug #21416") else() # don't set standard flags explicitly. The default seems fine. - # set (CMAKE_CXX_FLAGS "-std=gnu++98 -g -W -Wall ${CMAKE_CXX_FLAGS}") + # set (CMAKE_CXX_FLAGS "-std=gnu++98 -W -Wall ${CMAKE_CXX_FLAGS}") endif() endif() if(CMAKE_C_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME STREQUAL "Darwin" AND CMAKE_C_COMPILER_ID MATCHES "Clang" ) - set (CMAKE_C_FLAGS "-std=c99 -g -W -Wall ${CMAKE_C_FLAGS}") + set (CMAKE_C_FLAGS "-std=c99 -W -Wall ${CMAKE_C_FLAGS}") endif() if(CMAKE_CXX_COMPILER_ID MATCHES "AppleClang" OR CMAKE_HOST_SYSTEM_NAME @@ -216,7 +216,7 @@ elseif(CMAKE_CXX_COMPILER_ID MATCHES "^Clang") set (CMAKE_CXX_FLAGS "-std=c++11 ${CMAKE_CXX_FLAGS}") set (HAVE_CXX11 1) message(STATUS "Enabling C++11 support") - set (CMAKE_CXX_FLAGS "-std=c++11 -g -W -Wall ${CMAKE_CXX_FLAGS}") + set (CMAKE_CXX_FLAGS "-std=c++11 -W -Wall ${CMAKE_CXX_FLAGS}") endif() endif() message(STATUS "CFLAGS=${CMAKE_C_FLAGS} (synthetized)") -- 2.30.2
- [cado-nfs] reducing space after compiling?, Francois Morain, 07/07/2021
- Re: [cado-nfs] reducing space after compiling?, Emmanuel Thomé, 07/08/2021
Archive powered by MHonArc 2.6.19+.