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

Disable parallel build by default #567

Merged
merged 1 commit into from
Aug 18, 2020
Merged

Disable parallel build by default #567

merged 1 commit into from
Aug 18, 2020

Conversation

fare
Copy link
Collaborator

@fare fare commented Aug 16, 2020

Disable the parallel build unless explicitly enabled, as it confuses some
newbies to no end as the compilation semi-deterministically dies out of
lack of memory as gerbil tries to spawn too many gcc's. In the future,
somehow find a good estimate of how many processes to spawn, or better,
learn to dynamically measure and calibrate.

Copy link
Collaborator

@vyzo vyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We probably want to do it in runtime/build.scm as well.

@vyzo
Copy link
Collaborator

vyzo commented Aug 16, 2020

Let's also add something to the build instructions in the guide.

Disable the parallel build unless explicitly enabled, as it confuses some
newbies to no end as the compilation semi-deterministically dies out of
lack of memory as gerbil tries to spawn too many gcc's. In the future,
somehow find a good estimate of how many processes to spawn, or better,
learn to dynamically measure and calibrate.
Copy link
Collaborator

@vyzo vyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM but runtime build is still parallel! (edit: no, it's not)

Copy link
Collaborator

@vyzo vyzo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

just a small nit about the cpu-count-spec test, otherwise LGTM.

;; Except we need to compute (available-memory) and calibrate (memory-per-compilation-cpu)...
;; Until then, we disable the parallel build as it confuses a lot of beginners.
(cond
((real? cpu-count-spec) cpu-count-spec)
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

probably fixnum? or integer? is a better test.

Copy link
Collaborator Author

@fare fare Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

All I do with the object is decrement and compare to zero, so as long as it's an archimedean ring... and actually, I suppose +inf.0 means no limit (or any real number greater than 2e53).

Copy link
Collaborator Author

@fare fare Aug 17, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

> (integer? 2e53)
#t
> (= (+ 1 2e53) 2e53)
#t

Or do you mean exact-integer? ? But why prevent no limit?

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

uhm, it would probably be a bad idea -- do we want to spawn a 1000 gccs?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So 2**53-1 as a fixnum is A-OK, but 2**53-1 as a float isn't? Not that either will make much of a difference, unless you have that many processes.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah well, I guess if the user wants to be silly and lock up their machine, it's up to them.

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

feel free to merge, this is not blocking :)

@fare fare merged commit 486d48e into master Aug 18, 2020
@vyzo vyzo deleted the build branch July 7, 2023 15:45
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants