{"action":"created","issue":{"url":"https://api.github.com/repos/spack/spack/issues/7957","repository_url":"https://api.github.com/repos/spack/spack","labels_url":"https://api.github.com/repos/spack/spack/issues/7957/labels{/name}","comments_url":"https://api.github.com/repos/spack/spack/issues/7957/comments","events_url":"https://api.github.com/repos/spack/spack/issues/7957/events","html_url":"https://github.com/spack/spack/issues/7957","id":319290758,"number":7957,"title":"Failure to install dealii with external cuda","user":{"login":"aprokop","id":7297887,"avatar_url":"https://avatars1.githubusercontent.com/u/7297887?v=4","gravatar_id":"","url":"https://api.github.com/users/aprokop","html_url":"https://github.com/aprokop","followers_url":"https://api.github.com/users/aprokop/followers","following_url":"https://api.github.com/users/aprokop/following{/other_user}","gists_url":"https://api.github.com/users/aprokop/gists{/gist_id}","starred_url":"https://api.github.com/users/aprokop/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/aprokop/subscriptions","organizations_url":"https://api.github.com/users/aprokop/orgs","repos_url":"https://api.github.com/users/aprokop/repos","events_url":"https://api.github.com/users/aprokop/events{/privacy}","received_events_url":"https://api.github.com/users/aprokop/received_events","type":"User","site_admin":false},"labels":[{"id":446616547,"url":"https://api.github.com/repos/spack/spack/labels/build-error","name":"build-error","color":"ff3300","default":false}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":7,"created_at":"2018-05-01T18:56:57Z","updated_at":"2018-05-01T19:29:41Z","closed_at":null,"author_association":"COLLABORATOR","body":"@davydden \r\n\r\n### Expected Result\r\n\r\n`$ spack install dealii@develop` completes with the following `packages.yaml`:\r\n```python\r\npackages: \r\n    cuda: \r\n        paths: \r\n            cuda@9.1.85: /usr/local/cuda-9.1 \r\n        buildable: False \r\n    dealii: \r\n        variants: ~petsc ~slepc ~oce +mpi +trilinos +p4est +cuda \r\n    <snip>\r\n```\r\n\r\n### Actual Result\r\n\r\nConfigure fails with the following:\r\n```\r\n1 error found in build log:\r\n     267    -- Found CUDA\r\n     268    -- The CUDA compiler identification is NVIDIA 9.1.85\r\n     269    -- Check for working CUDA compiler: /usr/local/cuda-9.1/bin/nvcc\r\n     270    -- Check for working CUDA compiler: /usr/local/cuda-9.1/bin/nvcc -- works\r\n     271    -- Detecting CUDA compiler ABI info\r\n     272    -- Detecting CUDA compiler ABI info - done\r\n  >> 273    CMake Error at cmake/configure/configure_1_cuda.cmake:138 (STRING):\r\n     274      STRING begin index: 1 is out of range 0 - 0\r\n     275    Call Stack (most recent call first):\r\n     276      /tmp/xap/spack-stage/spack-stage-HqjNdi/dealii/spack-build/CMakeFiles/CMakeTmp/evaluate_expression.tmp:1 (FEATURE_CUDA_CONFIGURE_EXTERNAL)\r\n     277      cmake/macros/macro_evaluate_expression.cmake:30 (INCLUDE)\r\n     278      cmake/macros/macro_configure_feature.cmake:244 (EVALUATE_EXPRESSION)\r\n     279      cmake/configure/configure_1_cuda.cmake:151 (CONFIGURE_FEATURE)\r\n```\r\n\r\n### Information on your system\r\n\r\nUbuntu 16.04\r\n\r\n### More information\r\n\r\nThe problem seems to be with the following fragment in dealii's `package.py`:\r\n```python\r\n         # CUDA\r\n          if '+cuda' in spec:\r\n              options.append(\r\n                  '-DDEAL_II_WITH_CUDA=ON'\r\n              )\r\n              if not spec.satisfies('^cuda@9:'):\r\n                  options.append('-DDEAL_II_WITH_CXX14=OFF')\r\n              cuda_arch = spec.variants['cuda_arch'].value\r\n              if cuda_arch is not None:\r\n                  if len(cuda_arch) > 1:\r\n                      raise InstallError(\r\n                          'deal.II only supports compilation for a single GPU!'\r\n                      )\r\n                  flags = '-arch=sm_{0}'.format(cuda_arch[0])\r\n                  # FIXME: there are some compiler errors in dealii\r\n                  # with flags below. Stick with -arch=sm_xy for now.\r\n                  # flags = ' '.join(self.cuda_flags(cuda_arch))\r\n                  options.append(\r\n                      '-DDEAL_II_CUDA_FLAGS={0}'.format(flags)\r\n                  )\r\n```\r\nPrinting `cuda_arch` in this situation reports `('',)`, so it's not `None`. Trying to fix this by\r\n```diff\r\n-               if cuda_arch is not None:\r\n+               if cuda_arch is not None and cuda_arch[0] is not '':\r\n```\r\nmakes the configure pass, but fails the build with some Kokkos (what?) errors like this:\r\n```\r\n >> 1791    /home/xap/local/opt/spack/opt/spack/linux-ubuntu16.04-x86_64/gcc-5.4.0/trilinos-12.12.1-yosvheg3dyhiq3gbrbfnmzwe7rtgvdjo/include/impl/Kokkos_Err\r\n             or.hpp(76): error: namespace \"Kokkos::Impl\" has no member \"cuda_abort\"\r\n```\r\n\r\n### The full concretized spec\r\n```\r\n$ spack spec -Il dealii@develop\r\nInput spec\r\n--------------------------------\r\n     dealii@develop\r\n\r\nConcretized\r\n--------------------------------\r\n     t3bju7g  dealii@develop%gcc@5.4.0~adol-c+arpack~assimp build_type=DebugRelease +cuda cuda_arch= ~doc~gmsh+gsl+hdf5~int64+metis+mpi~nanoflann+netcdf~oce~optflags+p4est~petsc~python~scalapack~slepc~sundials+trilinos arch=linux-ubuntu16.04-x86_64 \r\n[+]  ff24xga      ^arpack-ng@3.5.0%gcc@5.4.0+mpi+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  bwnuoet          ^cmake@3.11.1%gcc@5.4.0~doc+ncurses+openssl+ownlibs~qt arch=linux-ubuntu16.04-x86_64 \r\n[+]  nxkp7ks              ^ncurses@6.0%gcc@5.4.0 patches=4110a40613b800da2b2888c352b64c75a82809d48341061e4de5861e8b28423f,f84b2708a42777aadcc7f502a261afe10ca5646a51c1ef8b5e60d2070d926b57 ~symlinks~termlib arch=linux-ubuntu16.04-x86_64 \r\n[+]  c5lf2hi                  ^pkgconf@1.4.0%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  w44ec2o              ^openssl@1.0.2n%gcc@5.4.0+systemcerts arch=linux-ubuntu16.04-x86_64 \r\n[+]  5nus6kn                  ^zlib@1.2.11%gcc@5.4.0+optimize+pic+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  poqkjoy          ^openblas@0.2.20%gcc@5.4.0 cpu_target= ~ilp64 patches=47cfa7a952ac7b2e4632c73ae199d69fb54490627b66a62c681e21019c4ddc9d +pic+shared threads=none ~virtual_machine arch=linux-ubuntu16.04-x86_64 \r\n[+]  cf6nsox          ^openmpi@3.0.1%gcc@5.4.0~cuda fabrics= ~java~memchecker~pmi schedulers= ~sqlite3~thread_multiple~ucx+vt arch=linux-ubuntu16.04-x86_64 \r\n[+]  z2yixst              ^hwloc@1.11.9%gcc@5.4.0~cairo~cuda+libxml2+pci+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  5urc6tc                  ^libpciaccess@0.13.5%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  o2pfwjf                      ^libtool@2.4.6%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  r5envx3                          ^m4@1.4.18%gcc@5.4.0 patches=3877ab548f88597ab2327a2230ee048d2d07ace1062efe81fc92e91b7f39cd00 +sigsegv arch=linux-ubuntu16.04-x86_64 \r\n[+]  fypapcp                              ^libsigsegv@2.11%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  milz7fm                      ^util-macros@1.19.1%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  sxk64lv                  ^libxml2@2.9.4%gcc@5.4.0~python arch=linux-ubuntu16.04-x86_64 \r\n[+]  htnq7wq                      ^xz@5.2.3%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  jbirn2e                  ^numactl@2.0.11%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  cpyyi6i                      ^autoconf@2.69%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  ojuball                          ^perl@5.24.1%gcc@5.4.0+cpanm+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  jbpld4y                              ^gdbm@1.14.1%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  gys53zd                                  ^readline@7.0%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  35ma3df                      ^automake@1.15.1%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  rp3owhs      ^boost@1.67.0.b1%gcc@5.4.0+atomic+chrono~clanglibcpp+date_time~debug+exception+filesystem~graph~icu+iostreams+locale+log+math+mpi+multithreaded patches=1367d8230e33f999731666c32804f4b54bd2a8e38a1b68c2c1df6234fad0e38d,2ab6c72d03dec6a4ae20220a9dfd5c8c572c5294252155b85c6874d97c323199 +program_options~python+random+regex+serialization+shared+signals~singlethreaded+system~taggedlayout+test+thread+timer~versionedlayout+wave arch=linux-ubuntu16.04-x86_64 \r\n[+]  ufczdvs          ^bzip2@1.0.6%gcc@5.4.0+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  fz6z2ya      ^cuda@9.1.85%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  wsrfrv6      ^gsl@2.4%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  pevzu4q      ^hdf5@1.10.1%gcc@5.4.0~cxx~debug~fortran+hl+mpi+pic+shared~szip~threadsafe arch=linux-ubuntu16.04-x86_64 \r\n[+]  syvxl6i      ^intel-tbb@2018.2%gcc@5.4.0 patches=5db0a2b0e7de21a33f4b6aebf53ef802f54a9ce0eead8afdcb49804cf4a7bb92 +shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  ooz6fpn      ^metis@5.1.0%gcc@5.4.0 build_type=Release ~gdb~int64 patches=4991da938c1d3a1d3dea78e49bbebecba00273f98df2a656e38b83d55b281da1 +real64+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  aoi2b4b      ^muparser@2.2.5%gcc@5.4.0 patches=68686ba5ec4df3691264f8ac04d1f1eb3e4585cc2dfefa1dc460c5ba2e096934 arch=linux-ubuntu16.04-x86_64 \r\n[+]  kby5jfe      ^netcdf@4.4.1.1%gcc@5.4.0~dap~hdf4 maxdims=1024 maxvars=8192 +mpi+parallel-netcdf+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  qw4zgbb          ^parallel-netcdf@1.8.0%gcc@5.4.0+cxx~fortran+pic arch=linux-ubuntu16.04-x86_64 \r\n[+]  bxx2cuz      ^netcdf-cxx@4.2%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  o5cm3af      ^p4est@2.0%gcc@5.4.0 arch=linux-ubuntu16.04-x86_64 \r\n[+]  sf4mvsg      ^suite-sparse@5.2.0%gcc@5.4.0~cuda~openmp+pic~tbb arch=linux-ubuntu16.04-x86_64 \r\n[+]  yosvheg      ^trilinos@12.12.1%gcc@5.4.0~alloptpkgs+amesos+amesos2+anasazi+aztec+belos+boost build_type=RelWithDebInfo ~cgns~dtk+epetra+epetraext+exodus+fortran~fortrilinos+gtest+hdf5+hypre+ifpack+ifpack2+instantiate~instantiate_cmplx~intrepid~intrepid2+metis+ml+muelu~mumps~nox~openmp~pnetcdf~python+rol+sacado~shards+shared~stk+suite-sparse~superlu~superlu-dist+teuchos+tpetra~x11~xsdkflags~zlib+zoltan+zoltan2 arch=linux-ubuntu16.04-x86_64 \r\n[+]  jnw622j          ^glm@0.9.7.1%gcc@5.4.0 build_type=RelWithDebInfo arch=linux-ubuntu16.04-x86_64 \r\n[+]  hayx2no          ^hypre@2.14.0%gcc@5.4.0~int64~internal-superlu+mpi+shared arch=linux-ubuntu16.04-x86_64 \r\n[+]  swtiruc          ^matio@1.5.9%gcc@5.4.0+hdf5+shared+zlib arch=linux-ubuntu16.04-x86_64 \r\n[+]  vvitpqh          ^parmetis@4.0.3%gcc@5.4.0 build_type=RelWithDebInfo ~gdb patches=4f892531eb0a807eb1b82e683a416d3e35154a455274cf9b162fb02054d11a5b,50ed2081bc939269689789942067c58b3e522c269269a430d5d34c00edbc5870,704b84f7c7444d4372cb59cca6e1209df4ef3b033bc4ee3cf50f369bce972a9d +shared arch=linux-ubuntu16.04-x86_64\r\n```"},"comment":{"url":"https://api.github.com/repos/spack/spack/issues/comments/385765294","html_url":"https://github.com/spack/spack/issues/7957#issuecomment-385765294","issue_url":"https://api.github.com/repos/spack/spack/issues/7957","id":385765294,"user":{"login":"davydden","id":8023934,"avatar_url":"https://avatars2.githubusercontent.com/u/8023934?v=4","gravatar_id":"","url":"https://api.github.com/users/davydden","html_url":"https://github.com/davydden","followers_url":"https://api.github.com/users/davydden/followers","following_url":"https://api.github.com/users/davydden/following{/other_user}","gists_url":"https://api.github.com/users/davydden/gists{/gist_id}","starred_url":"https://api.github.com/users/davydden/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/davydden/subscriptions","organizations_url":"https://api.github.com/users/davydden/orgs","repos_url":"https://api.github.com/users/davydden/repos","events_url":"https://api.github.com/users/davydden/events{/privacy}","received_events_url":"https://api.github.com/users/davydden/received_events","type":"User","site_admin":false},"created_at":"2018-05-01T19:29:41Z","updated_at":"2018-05-01T19:29:41Z","author_association":"MEMBER","body":"> What do you want me to do? CUDA in deal does not interact with Trilinos at all. There is no code in common and we don't reuse their flags.\r\n\r\nI know, I mean if you have Trilinos built with Tpetra, check if using this Trilinos in deal.II + cuda as of now leads to the same compiler error **in deal.II**. Although it's clearly not deal.II related."}}
{"actor":{"display_login":"davydden"}}