Hi,
I'm trying gambit 4.6.4 under Ubuntu 32bits, 64 bits and Gentoo 64 bits. It compiles fine in these systems. However:
- Ubuntu 32 bits: fails to compile blackhole, with an out of memory error - Ubuntu 64 bits: compiles, but on a 16gb ram machine. - Gentoo 64 bits: uses all 4gb of ram and takes forever using swap. I didn't finish compiling, because taking that long makes it impossible to develop Blackhole.
I've read in the git commits that now the default flag is -O2, could this be the reason?
Best regards
Álvaro
Afficher les réponses par date
On 2012-02-15, at 4:32 PM, Álvaro Castro-Castilla wrote:
Hi,
I'm trying gambit 4.6.4 under Ubuntu 32bits, 64 bits and Gentoo 64 bits. It compiles fine in these systems. However:
- Ubuntu 32 bits: fails to compile blackhole, with an out of memory error
- Ubuntu 64 bits: compiles, but on a 16gb ram machine.
- Gentoo 64 bits: uses all 4gb of ram and takes forever using swap. I didn't finish compiling, because taking that long makes it impossible to develop Blackhole.
I've read in the git commits that now the default flag is -O2, could this be the reason?
It could. Please modify the configure script so that it uses -O1 and check if that works better. I would be interested in the time both ways, and the version of your gcc.
Marc
Hallo,
2012/2/15 Marc Feeley feeley@iro.umontreal.ca:
I've read in the git commits that now the default flag is -O2, could this be the reason?
It could. Please modify the configure script so that it uses -O1 and check if that works better. I would be interested in the time both ways, and the version of your gcc.
FWIW, I opened a bug[1] for GCC that, after fixed for 4.7.0, did let me compile Gambit-C with -O3 and using `make -j 3` on machine with 8GB of RAM, very quickly.
[1] - http://gcc.gnu.org/bugzilla/show_bug.cgi?id=51389
Cheers
On 2012-02-15, at 4:41 PM, Alex Queiroz wrote:
Hallo,
2012/2/15 Marc Feeley feeley@iro.umontreal.ca:
I've read in the git commits that now the default flag is -O2, could this be the reason?
It could. Please modify the configure script so that it uses -O1 and check if that works better. I would be interested in the time both ways, and the version of your gcc.
FWIW, I opened a bug[1] for GCC that, after fixed for 4.7.0, did let me compile Gambit-C with -O3 and using `make -j 3` on machine with 8GB of RAM, very quickly.
Neat! I'm quite surprised that gcc -O3 when using --enable-single-host completes at all! I have always used -O1 and only recently (this past week) noticed that the gcc I was using (v4.2.1) could compile at -O2 without taking too much RAM. I think -O3 is pushing it. I may have to revert to -O1 as a default if people are having problems with -O2.
If only I could find a good heuristic for the configure script to choose the "right" optimization level for the user's development environment.
Marc
Maybe just activating O2 if gcc >= 4.7 (if the patch Alex was telling about works); then O3 if more than 8gb ram available and gcc >= 4.7.
On Thu, Feb 16, 2012 at 12:00 AM, Marc Feeley feeley@iro.umontreal.cawrote:
On 2012-02-15, at 4:41 PM, Alex Queiroz wrote:
Hallo,
2012/2/15 Marc Feeley feeley@iro.umontreal.ca:
I've read in the git commits that now the default flag is -O2, could
this be the reason?
It could. Please modify the configure script so that it uses -O1 and
check if that works better. I would be interested in the time both ways, and the version of your gcc.
FWIW, I opened a bug[1] for GCC that, after fixed for 4.7.0, did let me compile Gambit-C with -O3 and using `make -j 3` on machine with 8GB of RAM, very quickly.
Neat! I'm quite surprised that gcc -O3 when using --enable-single-host completes at all! I have always used -O1 and only recently (this past week) noticed that the gcc I was using (v4.2.1) could compile at -O2 without taking too much RAM. I think -O3 is pushing it. I may have to revert to -O1 as a default if people are having problems with -O2.
If only I could find a good heuristic for the configure script to choose the "right" optimization level for the user's development environment.
Marc
On 2012-02-15, at 6:06 PM, Álvaro Castro-Castilla wrote:
Maybe just activating O2 if gcc >= 4.7 (if the patch Alex was telling about works);
That's too brittle. I know that -O2 was *not* OK with the gcc that was current a few years ago, and -O2 is OK with gcc 4.2.1, yet -O2 is *not* OK with gcc 4.5.3, yet it is OK with gcc 4.7. There's really no evidence that gcc's algorithms will not get worse after gcc 4.7 (and in fact the past history of the evolution of gcc points to chaotic changes in the algorithmic complexity).
then O3 if more than 8gb ram available and gcc >= 4.7.
I don't know how to test for this portably.
Marc
What about a configure option for overriding the optimization level, keeping O2 as default (maybe there is one already? but I just commented out some lines in the configure.ac) gcc-4.5.3 is the current stable in Gentoo, I'll check tomorrow in Ubuntu.
2012/2/16 Marc Feeley feeley@iro.umontreal.ca
On 2012-02-15, at 6:06 PM, Álvaro Castro-Castilla wrote:
Maybe just activating O2 if gcc >= 4.7 (if the patch Alex was telling
about works);
That's too brittle. I know that -O2 was *not* OK with the gcc that was current a few years ago, and -O2 is OK with gcc 4.2.1, yet -O2 is *not* OK with gcc 4.5.3, yet it is OK with gcc 4.7. There's really no evidence that gcc's algorithms will not get worse after gcc 4.7 (and in fact the past history of the evolution of gcc points to chaotic changes in the algorithmic complexity).
then O3 if more than 8gb ram available and gcc >= 4.7.
I don't know how to test for this portably.
Marc
I've suggested something with a bit more detail here:
http://www.iro.umontreal.ca/~gambit/bugzilla/show_bug.cgi?id=136
but I don't know how to do it myself.
Brad
On Feb 15, 2012, at 6:30 PM, Álvaro Castro-Castilla wrote:
What about a configure option for overriding the optimization level, keeping O2 as default (maybe there is one already? but I just commented out some lines in the configure.ac) gcc-4.5.3 is the current stable in Gentoo, I'll check tomorrow in Ubuntu.
2012/2/16 Marc Feeley feeley@iro.umontreal.ca
On 2012-02-15, at 6:06 PM, Álvaro Castro-Castilla wrote:
Maybe just activating O2 if gcc >= 4.7 (if the patch Alex was telling about works);
That's too brittle. I know that -O2 was *not* OK with the gcc that was current a few years ago, and -O2 is OK with gcc 4.2.1, yet -O2 is *not* OK with gcc 4.5.3, yet it is OK with gcc 4.7. There's really no evidence that gcc's algorithms will not get worse after gcc 4.7 (and in fact the past history of the evolution of gcc points to chaotic changes in the algorithmic complexity).
then O3 if more than 8gb ram available and gcc >= 4.7.
I don't know how to test for this portably.
Marc
Gambit-list mailing list Gambit-list@iro.umontreal.ca https://webmail.iro.umontreal.ca/mailman/listinfo/gambit-list
On 2012-02-15, at 8:13 PM, Bradley Lucier wrote:
I've suggested something with a bit more detail here:
http://www.iro.umontreal.ca/~gambit/bugzilla/show_bug.cgi?id=136
but I don't know how to do it myself.
How about this additional flag to the configure script:
--enable-opt="xxx"
Which would tell the configure script to use xxx as the C compiler options instead of -O1 -fschedule-insns2 etc
So the user could do something like:
./configure --enable-opt="-O3"
or
./configure --enable-opt="-O3 -fschedule-insns -march=native"
or
./configure --enable-opt="" CC="-O3 -fschedule-insns -march=native"
Marc
On Feb 15, 2012, at 8:42 PM, Marc Feeley wrote:
On 2012-02-15, at 8:13 PM, Bradley Lucier wrote:
I've suggested something with a bit more detail here:
http://www.iro.umontreal.ca/~gambit/bugzilla/show_bug.cgi?id=136
but I don't know how to do it myself.
How about this additional flag to the configure script:
--enable-opt="xxx"
I'm not sure what the name should be. Perhaps
--enable-optimization-options="xxx"
Would "-fomit-frame-pointer" be part of the optimization options?
BTW, I remember now that "-Wall -W" warns about unused labels, and gsc-generated code has a lot of those warnings, so we turned it off.
Brad
Marc,
With -O1 compilation is feasible, takes as long as it had with 4.6.3. I can't really tell you the time it takes with O2, since my computer can't handle it. Also can't compile with --enable-gcc-opts. gcc version 4.5.3
2012/2/15 Marc Feeley feeley@iro.umontreal.ca
On 2012-02-15, at 4:32 PM, Álvaro Castro-Castilla wrote:
Hi,
I'm trying gambit 4.6.4 under Ubuntu 32bits, 64 bits and Gentoo 64 bits.
It compiles fine in these systems. However:
- Ubuntu 32 bits: fails to compile blackhole, with an out of memory error
- Ubuntu 64 bits: compiles, but on a 16gb ram machine.
- Gentoo 64 bits: uses all 4gb of ram and takes forever using swap. I
didn't finish compiling, because taking that long makes it impossible to develop Blackhole.
I've read in the git commits that now the default flag is -O2, could
this be the reason?
It could. Please modify the configure script so that it uses -O1 and check if that works better. I would be interested in the time both ways, and the version of your gcc.
Marc