Conversation
|
Still a work in progress. I tried testing on my local machine, but building CMake 3.5.2 hangs with gcc 6.1 on OS X 10.10.5. I forget if this issue with CMake is known re: OS X. If it is new for Spack, I will add it to the GitHub issue tracker. |
|
Note to self: supposedly CMake 3.6.0 builds fine with gcc 6.1, so if there's been no progress on that when I pick this thread back up, upgrade the CMake package in spack. |
|
@tgamblin I just rebased this PR on the |
|
@adamjstewart I'd be happy to add that patch to Spack, if there's a high likelihood it would be accepted. I think I would modify it according to http://stackoverflow.com/a/28014302/1102947 so the code remains practically unchanged for clang. Upgrading macOS at LLNL would be more difficult, but possible. |
|
I would accept that patch to |
|
@tgamblin Having fought through most of the errors due to gcc incompatibility with Apple headers during CMake installation, I think the only hangup in this PR right now (aside from any flake8 noncompliance) is the hack to go through the mfem URL tracker. The strategy that worked for mfem 3.1 does not seem to work for mfem 3.2. Replacing the tracker URL with its redirected URL fixes this issue, and also makes the spack fetch/stage/build process much, much less fragile. @tzanio, how important is it to have spack fetch mfem tarballs through the Google redirect? I realize the redirect is valuable for user metrics, and Homebrew seems to cope with it just fine, but I'm having trouble making it work for spack, and the redirect issue is the major blocker for this pull request. |
|
@goxberry, thanks for adding these! The stats have been really useful for us, including in some pretty major proposals, so if possible we'll prefer to keep them. Is it clear what exactly the problem is? Maybe there is an easy way to fix that in spack? If the fix is not obvious, we can move on with the direct links. I imagine we are not the only project that is interested in tracking spack installations so maybe @tgamblin and team have a different solution? |
|
@tgamblin, did you get a chance to look at this? |
| 'METIS_LIB=%s' % metis_lib]) | ||
|
|
||
| if '+mpi' in spec: | ||
| if 'mpi' in spec: |
There was a problem hiding this comment.
This should be +mpi. Otherwise it will always run this block because +mpi and ~mpi both match mpi. Same for +parmetis and +metis above.
There was a problem hiding this comment.
This actually does work because it checks the presence of a dependency, not the value of the variant. if 'mpi' in spec will be True if any mpi provider is a dependency of this package. Since mfem``depends_on('mpi', when='+mpi'), it will depend on an MPI implementation when it's+mpi, and it won't when it is~mpi`. Same for the other two, as well.
There was a problem hiding this comment.
Perhaps an easier way to remember this is that foo in spec is the same as spec.satisifies('foo').
There was a problem hiding this comment.
Huh, never knew that. I wonder if we should do something to reduce the number of ways of specifying the same thing.
There was a problem hiding this comment.
@adamjstewart @tgamblin Given the discussion above, should I change this line back to if '+mpi' in spec:? I agree that starting to standardize style in packages would be helpful; frequently, I pattern-match idioms from other Spack packages when I write or modify a Spack package.
There was a problem hiding this comment.
@goxberry: I think this one's up to you.
RE: @adamjstewart: I don't really think these are two ways to do exactly the same thing. You could have a package with a variant for some build option that doesn't imply a dependency, and then you would need to test +option. You could have a package with two variants, each of which needed MPI, and then its easier to check for 'mpi' in spec instead of checking both variants, and you don't need to modify that code every time there's a variant that needs MPI. If you remove either of those capabilities from the spec, you're losing functionality, so I don't really see a need to reduce anything -- they're both fundamental parts of specs.
|
@tzanio I think part of the issue is that Spack will download archives and store them in a location that uses the base name of the URL; this base name is I'm speculating, but I wonder if there were an option to manually specify the download file (so I could call the 3.2 tarball, I fixed a gcc bug that was blocking builds of cmake from source, so now I think the main thing blocking updates of the mfem spack package is this PR, and solving the downloading issue. cc: @tgamblin |
|
@goxberry: I was about to write an explanation for this the other day, but I got more email. Sorry. 😢 We can actually get the name of the remote tarball when we download from the internet -- newer versions of However, that won't work because we not only need to be able to fetch from the internet, but also from mirrors, and Spack needs to be able to come up with the mirror name without talking to the redirect server, since it won't be there when we're not connected to the internet. Right now, we change mirror archive names to It turns out @scheibelp already thought of all this in #1758 w.r.t. #1757, and I didn't actually make the connection. I think I'll just merge that, and then we can make MFEM work more naturally. |
|
@tgamblin No worries! With all the activity on the Spack repo, I'm amazed you keep up with everything, and I continue to be impressed by Spack. There's a whole bunch of CMake stuff I need to do on my end to eventually be able to use the MFEM package, but my hope is that it'll go into a couple LLNL projects, and then when that happens, I'll forward you the details via e-mail for any reporting you need to do for Spack funding. I've put a reminder in my calendar for September 6th, 2017 to remind me before end of FY17, because it might take that long to do all the CMake stuff so I can use Spack's CMake interfacing capabilities. (Er, build toolchains can be hard, especially when converting someone else's to CMake...) If you have an earlier deadline after, say January/February 2017, let me know, I'll move the reminder to that date. |
|
@goxberry: I think @citibeth might be interested in the CMake stuff as well -- she wrote most of it, but it would be awesome to get some MFEM support in. See also #1926 if that is something you're thinking of... would like to replace some of the nextgen guys' env scripts with something like bundler. |
|
@goxberry If you're looking to conveniently develop a project with Spack+CMake, see the documentation section: Good luck, and don't hesitate to ping me if you run into something. |
Add tarball extension as a result of a feature added in PR#1926, which fixes earlier issues in this PR (PR#1202). Prior to adding this feature, Spack would not autodetect the extension of the tarball downloaded from the redirected, shorted Google URL, requiring a messy hack. This hack worked for mfem version 3.1, but led to errors when adding mfem version 3.2 because the files downloaded from Google did not contain the package name, version number, or extension. Adding the extension enables Spack to rename the tarball downloaded from Google to a sensible name that is compatible with its filename parsing algorithms so that Spack "does the right thing" (detects that the file is a GZipped tarball, decompresses it, runs GNU Make) in fetching and staging the package.
Add linkage to the KLU & BTF solvers, which are now enabled in MFEM for versions 3.2 and later.
Add linkage to SuperLU_DIST, which is a new linear solver interface for MFEM versions 3.2 and later.
Add NetCDF variant for MFEM versions 3.2 and later; installing the NetCDF interfaces enables CUBIT mesh support.
|
@tgamblin Yes, it works. I've done some commit cleanups so that every commit is executable (no syntax errors). |
|
cc: @tzanio I think this PR is close to mergeable, so mfem 3.2 will hopefully be in Spack soon. |
|
@citibeth I saw that, and I'm really impressed by the Spack + CMake support, so I am planning on trying it out on some LLNL projects I work on that have many developers. I'm hoping that a more automated install process will help new developers on these projects get up to speed faster, with less hassle, and also make the build toolchain more portable and maintainable. |
|
@goxberry Wow that's nice to hear; definitely shout out if you need help. Just one caveat... it will work best if each developer has their on Spack instance that they own. I'm just beginning to broach the issues of how this stuff works on a shared multi-user environment. |
|
@citibeth Yes, my goal is to make sure that everyone has their own Spack instance, and develops their own copy of the software we're working on. I will keep that advice in mind if someone pushes for multi-user environments. |
|
@tgamblin Should I squash these commits? |
|
@goxberry: no need. GitHub lets you choose to squash, merge, or rebase merge when you click the merge button. |
Note, however, nccl fails to build successfully with intel [1]. [1] ==> Installing nccl-2.23.4-1-tnr7mz4uqdsmnnbx7wwu6ihkghnr4d2e [8/8] ==> No binary for nccl-2.23.4-1-tnr7mz4uqdsmnnbx7wwu6ihkghnr4d2e found: installing from source ==> Fetching https://mirror.spack.io/_source-cache/archive/6b/6b946b70a9d2d01871842cbd15ec56488d358abe9a0f3767e372fddc3e241ba7.tar.gz ==> No patches needed for nccl ==> nccl: Executing phase: 'edit' ==> nccl: Executing phase: 'build' ==> Error: ProcessError: Command exited with status 2: 'make' '-j10' 'CUDA_HOME=/home/mkandes/software/spack/repos/sdsc/gpu/opt/spack/linux-rocky8-cascadelake/intel-2021.10.0/cuda-12.6.3-frf6lej72dpsgmgxm3nsmuouzepayze2' 'NVCC_GENCODE=--generate-code arch=compute_70,code=sm_70 --generate-code arch=compute_70,code=compute_70 --generate-code arch=compute_80,code=sm_80 --generate-code arch=compute_80,code=compute_80 --generate-code arch=compute_90,code=sm_90 --generate-code arch=compute_90,code=compute_90' 5 errors found in build log: 189 icpc: command line warning spack#10121: overriding '-march=cascadelake' with '-march=native' 190 Compiling transport/net_socket.cc > /scratch/mkandes/j ob_37145979/spack-stage/spack-stage/spack-stage-nccl-2.23.4-1-tnr7m z4uqdsmnnbx7wwu6ihkghnr4d2e/spack-src/build/obj/transport/net_socke t.o 191 icpc: remark spack#10441: The Intel(R) C++ Compiler Classic (ICC) is dep recated and will be removed from product release in the second half of 2023. The Intel(R) oneAPI DPC++/C++ Compiler (ICX) is the recom mended compiler moving forward. Please transition to use this compi ler. Use '-diag-disable=10441' to disable this message. 192 icpc: command line warning spack#10121: overriding '-march=cascadelake' with '-march=native' 193 transport/coll_net.cc"(926): warning spack#1202: illegal character l in asm operand constraint 194 >> 195 transport/coll_net.cc(926): catastrophic error: Cannot match asm op erand constraint 196 compilation aborted for transport/coll_net.cc (code 1) >> 197 make[1]: *** [Makefile:115: /scratch/mkandes/job_37145979/spack-sta ge/spack-stage/spack-stage-nccl-2.23.4-1-tnr7mz4uqdsmnnbx7wwu6ihkgh nr4d2e/spack-src/build/obj/transport/coll_net.o] Error 1 ...
Adds linkage to KLU & BTF in SuiteSparse variant. Adds SuperLU_Dist variant.