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

override target: permits to override target setting an environment variable #59

Merged
merged 1 commit into from
Feb 13, 2017

Conversation

alalazo
Copy link
Collaborator

@alalazo alalazo commented Feb 10, 2017

The following:

$export SPACK_TARGET_TYPE=x86_E5v2_IntelIB

will override the default target of the architecture:

$ spack spec zlib
Input spec
--------------------------------
zlib

Normalized
--------------------------------
zlib

Concretized
--------------------------------
zlib@1.2.10%gcc@4.8+pic+shared arch=linux-ubuntu14-x86_E5v2_IntelIB 

$ spack spec hdf5
Input spec
--------------------------------
hdf5

Normalized
--------------------------------
hdf5
    ^zlib@1.1.2:

Concretized
--------------------------------
hdf5@1.10.0-patch1%gcc@4.8+cxx~debug+fortran+mpi+pic+shared~szip~threadsafe arch=linux-ubuntu14-x86_E5v2_IntelIB 
    ^openmpi@2.0.2%gcc@4.8~java~mxm~pmi~psm~psm2~slurm~sqlite3~thread_multiple~tm~verbs+vt arch=linux-ubuntu14-x86_E5v2_IntelIB 
        ^hwloc@1.11.5%gcc@4.8 arch=linux-ubuntu14-x86_E5v2_IntelIB 
            ^libpciaccess@0.13.4%gcc@4.8 arch=linux-ubuntu14-x86_E5v2_IntelIB 
                ^libtool@2.4.6%gcc@4.8 arch=linux-ubuntu14-x86_E5v2_IntelIB 
                    ^m4@1.4.18%gcc@4.8+sigsegv arch=linux-ubuntu14-x86_E5v2_IntelIB 
                        ^libsigsegv@2.10%gcc@4.8 arch=linux-ubuntu14-x86_E5v2_IntelIB 
                ^pkg-config@0.29.1%gcc@4.8+internal_glib arch=linux-ubuntu14-x86_E5v2_IntelIB 
                ^util-macros@1.19.1%gcc@4.8 arch=linux-ubuntu14-x86_E5v2_IntelIB 
    ^zlib@1.2.10%gcc@4.8+pic+shared arch=linux-ubuntu14-x86_E5v2_IntelIB 

@alalazo alalazo self-assigned this Feb 10, 2017
@alalazo alalazo force-pushed the features/custom_target_from_evironment branch from 236bc04 to 842c0a4 Compare February 10, 2017 15:29
@alalazo alalazo merged commit d58bfa2 into releases/cornalin Feb 13, 2017
@alalazo alalazo deleted the features/custom_target_from_evironment branch February 13, 2017 09:46
alalazo added a commit that referenced this pull request Apr 4, 2017
alalazo added a commit that referenced this pull request Apr 6, 2017
alalazo added a commit that referenced this pull request Apr 7, 2017
alalazo added a commit that referenced this pull request Apr 7, 2017
alalazo added a commit that referenced this pull request Apr 7, 2017
alalazo added a commit that referenced this pull request Apr 18, 2017
alalazo added a commit that referenced this pull request Apr 23, 2017
alalazo added a commit that referenced this pull request Apr 26, 2017
alalazo added a commit that referenced this pull request May 3, 2017
alalazo added a commit that referenced this pull request May 5, 2017
alalazo added a commit that referenced this pull request May 7, 2017
@becker33
Copy link

becker33 commented May 8, 2017

If I understand this correctly, adding specific targets (haswell, sandybridge, arm6, etc) would cover the first two portions of the your string, and adding the network into our architecture would cover the last portion. Would that completely cover your use case?

I don't like reintroducing site-generated targets like we had pre- spack#561. It prevents us from standardizing things. At the time of that PR we expected to need to add networks to the architecture spec eventually, now might be that time.

@alalazo
Copy link
Collaborator Author

alalazo commented May 8, 2017

If I understand this correctly, adding specific targets (haswell, sandybridge, arm6, etc) would cover the first two portions of the your string, and adding the network into our architecture would cover the last portion. Would that completely cover your use case?

@becker33 You're completely correct about my use case coverage. I don't mind if the PR is not merged, but I think it may be useful to fill the gap in the meanwhile. If you think it's distracting people, or fostering bad habits, feel free to close the PR on the LLNL repo.

That said, I see nothing wrong in having the possibility to customize the architecture with a site-dependent string. I understand that if we are going to distribute binary packages (and we are still pursuing that, right?) we can't expect a custom string to match, but I also believe that if somebody has custom needs he cannot expect a binary package.

@becker33
Copy link

becker33 commented May 8, 2017

In addition to binary installation, we also have plans to use the target to eventually inject compiler optimizations, like how gcc can take an -march=<target> argument (after we have more specific targets). We could always ignore strings that don't match a known target, but at that point it feels like giving the user rope with which to hang himself.

I think the crux of my concern is that I don't trust users to use caution with customization abilities that we provide them but that also conflict with other features. But that might be a philosophical difference that should be discussed more broadly on the upstream repo.

@alalazo
Copy link
Collaborator Author

alalazo commented May 8, 2017

We could always ignore strings that don't match a known target, but at that point it feels like giving the user rope with which to hang himself.

I would be fine if you warn me after you give me rope. I'll make sure I don't use it to hang myself 😄

But really, I don't have strong opinions on this. Honestly, if network and target detection were already in place and working correctly I don't know if I would have written these 10 lines.

alalazo added a commit that referenced this pull request May 9, 2017
alalazo added a commit that referenced this pull request May 10, 2017
alalazo added a commit that referenced this pull request Jan 11, 2018
alalazo added a commit that referenced this pull request Jan 23, 2018
alalazo added a commit that referenced this pull request Feb 27, 2018
rmsds pushed a commit that referenced this pull request Mar 5, 2018
alalazo added a commit that referenced this pull request Mar 6, 2018
alalazo added a commit that referenced this pull request Mar 14, 2018
alalazo added a commit that referenced this pull request Mar 15, 2018
alalazo added a commit that referenced this pull request Mar 19, 2018
alalazo added a commit that referenced this pull request Mar 21, 2018
alalazo added a commit that referenced this pull request Mar 23, 2018
alalazo added a commit that referenced this pull request Mar 29, 2018
alalazo added a commit that referenced this pull request Apr 5, 2018
alalazo added a commit that referenced this pull request Apr 13, 2018
alalazo added a commit that referenced this pull request Apr 13, 2018
alalazo added a commit that referenced this pull request Apr 24, 2018
alalazo added a commit that referenced this pull request Apr 26, 2018
alalazo added a commit that referenced this pull request May 3, 2018
alalazo added a commit that referenced this pull request May 3, 2018
alalazo added a commit that referenced this pull request May 31, 2019
alalazo added a commit that referenced this pull request Jun 4, 2019
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