default compiler

321 views
Skip to first unread message

James F Amundson

unread,
Jul 5, 2016, 6:15:48 PM7/5/16
to Spack
OK, I give up. How do I tell spack which compiler(+version) I want to get by default?

—Jim

------------------------
James Amundson
Head, Scientific Software Infrastructure Department
Scientific Computing Division, Fermilab
+1 (630) 840-2430



Gamblin, Todd

unread,
Jul 5, 2016, 6:31:36 PM7/5/16
to James F Amundson, Spack
Two ways:

1. In the package file, you can tell Spack what version is preferred by adding preferred=True in the version directive.
2. In packages.yaml, you can specify for some or all packages how concretization should happen. Examples here:

http://software.llnl.gov/spack/configuration.html#concretization-preferences
>--
>You received this message because you are subscribed to the Google Groups "Spack" group.
>To unsubscribe from this group and stop receiving emails from it, send an email to spack+un...@googlegroups.com.
>To post to this group, send email to sp...@googlegroups.com.
>Visit this group at https://groups.google.com/group/spack.
>For more options, visit https://groups.google.com/d/optout.

Elizabeth F

unread,
Jul 5, 2016, 6:34:45 PM7/5/16
to Gamblin, Todd, James F Amundson, Spack
James,

I'm curious to know, what resources did you look at / think of looking at before you gave up?  Did you look at the Spack manual?  If not, why not?

This will help improve Spack documentation and user manual.

Thank you,
-- Elizabeth

James F Amundson

unread,
Jul 6, 2016, 4:37:36 PM7/6/16
to Gamblin, Todd, Spack
Thanks! (2) was what I was looking for. It’s obvious in retrospect… (See reply to Elizabeth.)

—Jim
------------------------
James Amundson
Head, Scientific Software Infrastructure Department
Scientific Computing Division, Fermilab
+1 (630) 840-2430



James F Amundson

unread,
Jul 6, 2016, 4:55:51 PM7/6/16
to Elizabeth F, Gamblin, Todd, Spack
Elizabeth,

You ask good questions. I was looking in the section on compiler configuration:


I’ll try to put together a patch to the docs to refer to concretization preferences in the compiler configuration section.

I was also hoping that some variation on 
spack compiler info —default
or
spack compiler default
or something like that would give me the information I was looking for. Maybe I can put together a patch for that, too.

There was one gotcha, which was also related to the documentation. In my packages.yaml, I had:

    cmake:
        paths:
            cm...@3.4.3%cl...@3.5.0: /usr/local/bin/cmake
        buildable: False

That was a bad idea. I really wanted:

    cmake:
        paths:
            cm...@3.4.3: /usr/local/bin/cmake
        buildable: False

The former version effectively set my default compiler to cl...@3.5.0 for all cmake-based projects! I find that behavior to be pretty subtle, even though I understand it. It might be a good idea if one of the external package examples did not specify a compiler. I even think using the (latter) cmake example would be a good one for the manual. I’m sure it’s what many people would want.

—Jim
 
------------------------
James Amundson
Head, Scientific Software Infrastructure Department
Scientific Computing Division, Fermilab
+1 (630) 840-2430



Reply all
Reply to author
Forward
0 new messages