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

Have target/host triples "arch-vendor-os" as in autotools #326

Merged
merged 3 commits into from
May 9, 2016

Conversation

tammoippen
Copy link
Contributor

Many internal functions, e.g. memory_thisjob, require the target triples "arch-vendor-os" as they were supplied with autotools. The file GetTriple.cmake adds functions for retrieving these. The rest of this PR sets the appropriate defines in config.h.in.

I propose @jakobj and @jougs as reviewers.

Many internal functions, e.g. memory_thisjob, require the target triples "arch-vendor-os" as they were supplied with autotools. The file GetTriple.cmake adds functions for retrieving these. The rest of this commit sets the appropriate defines in config.h.in

# Get os.
if ( "${CMAKE_HOST_SYSTEM_NAME}" STREQUAL "Windows" )
set( os "win32" )
Copy link
Contributor

Choose a reason for hiding this comment

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

Wouldn't just "win" be more correct on current versions of that OS?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I am not so sure how relevant this actually is, given that NEST is not officially supported on Windows ("we do not tests this regularly [building on Windows] and do not support NEST under Cygwin at present"), but the lines are only relevant, if the host system name is Windows, then this will default to win32. In other cases, the CMAKE_HOST_SYSTEM_NAME will just be cast to lower case. Maybe on a 64bit Windows this will default to win64 - I have not tested this - or on MinGW this will default to mingw32 (as the autoconf counterpart).

@jougs
Copy link
Contributor

jougs commented Apr 30, 2016

This seems like a useful addition to me. See my comments above. 👍 once they are addressed.

@jakobj
Copy link
Contributor

jakobj commented May 1, 2016

I can confirm that this works nicely with my machine (Debian 8), and our cluster (CentOS 7.1). I can't really comment on the code, so 👍 from me. :)

if ( "${CMAKE_SYSTEM_NAME}" MATCHES "^Darwin.*")
set( vendor "apple" )
else ()
set( vendor "pc" )
Copy link
Contributor

Choose a reason for hiding this comment

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

Would this set vendor to pc also for BlueGene and K?

@jakobj
Copy link
Contributor

jakobj commented May 2, 2016

@heplesser on juqueen this creates the following triples:

Host triple: ppc64-pc-linux
Target triple: -pc-bluegeneq_base

target triple looks a bit broken to me?!

@jakobj
Copy link
Contributor

jakobj commented May 2, 2016

and on K:

Host triple: x86_64-pc-linux
Target triple: s64fx-pc-linux

this looks fine to me.

@heplesser
Copy link
Contributor

@jakobj That target triple for BG/Q looks a bit strange since the first component is empty and the last part quite long.

But all these triples label BG/Q and K as pc, which doesn't cause any harm, I believe, but is a bit bit misleading ...

@tammoippen
Copy link
Contributor Author

For NEST the relevant triple is the target triple, which is only different from the host triplet in the case of cross compiling. The target triplet for BG/Q is now:

-- Target triple: ppc64-ibm-linux

For the K computer it is:

-- Target triple: s64fx-fujitsu-linux

@heplesser heplesser merged commit 7d421b7 into nest:master May 9, 2016
@tammoippen tammoippen deleted the hostos branch May 18, 2016 11:44
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.

4 participants