Skip to content

New method to detect total available RAM on the building machine#1623

Merged
boegel merged 32 commits intoeasybuilders:developfrom
valtandor:availmem
Mar 31, 2016
Merged

New method to detect total available RAM on the building machine#1623
boegel merged 32 commits intoeasybuilders:developfrom
valtandor:availmem

Conversation

@valtandor
Copy link
Contributor

@hpcugentbot
Copy link

Automatic reply from Jenkins: Can I test this?

@boegel boegel added this to the v2.7.0 milestone Feb 18, 2016
Copy link
Member

Choose a reason for hiding this comment

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

start with None?

Copy link
Member

Choose a reason for hiding this comment

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

if memtotal is None?

@valtandor
Copy link
Contributor Author

@boegel: Done.

@boegel
Copy link
Member

boegel commented Feb 18, 2016

@valtandor: are you up for writing a simply unit test for this (in test/framework/systemtools.py)?

Just something that checks whether a non-zero memory size is returned on Linux, and raises the exception on Darwin?

If not, that's fine, I can help with that.

Where are you planning to use this?

Maybe also add it to get_system_info?

@valtandor
Copy link
Contributor Author

@boegel: This was used in the NWChem EasyBlock that I wrote. Part of the compilation involves trying to get the amount of available system memory. If get_system_info is a better place for it, I'm OK with that.

Where do the unit tests go?

@boegel
Copy link
Member

boegel commented Feb 18, 2016

In get_system_info, you would just add a call to the function you wrote here, the function itself looks perfect.

Unit tests for functions in systemtools.py go in https://github.com/hpcugent/easybuild-framework/blob/master/test/framework/systemtools.py .

Take a look at the test_glibc_version* tests, you could write a group of tests for your version in a very similar way.

@boegel
Copy link
Member

boegel commented Feb 18, 2016

Jenkins: ok to test

@hpcugentbot
Copy link

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2730/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2746/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2765/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member

boegel commented Feb 24, 2016

@valtandor: please take a look at valtandor#2, which updates this PR a bit (implement support for Darwin + enhances tests)

"""
Try to ascertain this node's total memory

@return: total memory as an integer, specifically a number of megabytes
Copy link
Contributor

Choose a reason for hiding this comment

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

If possible, it would be nice, if there was the ability to tune things from the outside about this, such as $BC_MEM_PER_NODE:
http://centers.hpc.mil/consolidated/bc/policies.php?choice=environment

The meaning of this is to be able to modify builds behavior dynamically, by adjusting such a variable.

Copy link
Member

Choose a reason for hiding this comment

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

If we do that, we should do it consistently (also for other system features), and it should be well documented which environment variables EB picks up on...

So, not in this PR.

@boegel
Copy link
Member

boegel commented Mar 9, 2016

@valtandor ping on merging valtandor#2 in here?

@boegel boegel modified the milestones: v2.7.0, v2.8.0 Mar 11, 2016
Benjamin Roberts and others added 2 commits March 14, 2016 12:13
split up tests for get_total_memory, fix implementation on Darwin
@hpcugentbot
Copy link

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2868/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@hpcugentbot
Copy link

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2869/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member

boegel commented Mar 30, 2016

Jenkins: test this please

@hpcugentbot
Copy link

EasyBuild framework unit test suite FAILed.

See https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2922/console for more details.

Please fix the reported issues by pushing additional commits to the branch corresponding with this pull request; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member

boegel commented Mar 30, 2016

@valtandor broken test is fixed by valtandor#3, let's get this merged...

fix mocking of 'sysctl -n hw.memsize' in systemtools tests
@hpcugentbot
Copy link

EasyBuild framework unit test suite PASSed (see https://jenkins1.ugent.be/job/easybuild-framework-pr-builder/2924/console for more details).

This pull request is now ready for review/testing.

Please try and find someone who can tackle this; contact @boegel if you're not sure what to do.

@boegel
Copy link
Member

boegel commented Mar 31, 2016

Going in, thanks @valtandor!

@boegel boegel merged commit 4254466 into easybuilders:develop Mar 31, 2016
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.

5 participants

Comments