Skip to content

add support for determining system name and version#543

Merged
boegel merged 19 commits intoeasybuilders:developfrom
boegel:system_name_version
Mar 19, 2013
Merged

add support for determining system name and version#543
boegel merged 19 commits intoeasybuilders:developfrom
boegel:system_name_version

Conversation

@boegel
Copy link
Copy Markdown
Member

@boegel boegel commented Mar 18, 2013

This is based on the data collected in https://github.com/hpcugent/easybuild/wiki/OS_flavor_name_version, and is required to pick a CUDA package from the list of available packages, see https://developer.nvidia.com/cuda-downloads.

Not sure if I'm 100% happy with the code. It should probably be avoided to be used if possible, but sometimes we're forced to, e.g.:

An example of usage (excerpt from tested draft easyconfig file for CUDA, cfr. https://github.com/fgeorgatos/easybuild.experimental/tree/master/users/georgets/c/CUDA):

name = "CUDA"
version = "5.0.35"
versionsuffix = "-1"

# exhaustive list of all known versions
if SYSTEM_NAME == 'fedora' and SYSTEM_VERSION == '16':
    system = 'fedora16'
elif SYSTEM_NAME in ["RHEL", "centos", "redhat", "SL"]:
    system = 'rhel%s.x' % SYSTEM_VERSION.split('.')[0]
elif SYSTEM_NAME in ['debian', 'ubuntu']:
    if SYSTEM_VERSION in ['11.10', '10.04']:
        system = 'ubuntu%s' % SYSTEM_VERSION
    else:
        system = 'ubuntu11.10'
elif SYSTEM_NAME == "opensuse" and SYSTEM_VERSION == '12.1':
    system = 'suse12.1'
elif SYSTEM_NAME == "suse" and SYSTEM_VERSION.startswith('11_SP'):
    system = 'sles%s' % SYSTEM_VERSION.lower().replace('_', '')
else:
    system = 'UNKNOWN'

sources = ['%s_%s_linux_64_%s%s.run' % (name.lower(), version, system, versionsuffix)]

Comment thread easybuild/tools/build_log.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

leave the 2nd empty line

@boegel
Copy link
Copy Markdown
Member Author

boegel commented Mar 19, 2013

Fixed remarks, ready to go now?

Comment thread easybuild/tools/systemtools.py Outdated
Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

@boegel: suff assignment after break?

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

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

Crap, forgot to finish this part. Fixed, please recheck.

I'll ask the our Austrian friends to test this, since they have SLES systems.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants