{"action":"created","issue":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/2781","repository_url":"https://api.github.com/repos/trilinos/Trilinos","labels_url":"https://api.github.com/repos/trilinos/Trilinos/issues/2781/labels{/name}","comments_url":"https://api.github.com/repos/trilinos/Trilinos/issues/2781/comments","events_url":"https://api.github.com/repos/trilinos/Trilinos/issues/2781/events","html_url":"https://github.com/trilinos/Trilinos/issues/2781","id":324535651,"node_id":"MDU6SXNzdWUzMjQ1MzU2NTE=","number":2781,"title":"Tpetra: gemm C wrappers mangle to same names as Fortran when built with XL compiler","user":{"login":"djfitzgerald","id":38731008,"node_id":"MDQ6VXNlcjM4NzMxMDA4","avatar_url":"https://avatars2.githubusercontent.com/u/38731008?v=4","gravatar_id":"","url":"https://api.github.com/users/djfitzgerald","html_url":"https://github.com/djfitzgerald","followers_url":"https://api.github.com/users/djfitzgerald/followers","following_url":"https://api.github.com/users/djfitzgerald/following{/other_user}","gists_url":"https://api.github.com/users/djfitzgerald/gists{/gist_id}","starred_url":"https://api.github.com/users/djfitzgerald/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/djfitzgerald/subscriptions","organizations_url":"https://api.github.com/users/djfitzgerald/orgs","repos_url":"https://api.github.com/users/djfitzgerald/repos","events_url":"https://api.github.com/users/djfitzgerald/events{/privacy}","received_events_url":"https://api.github.com/users/djfitzgerald/received_events","type":"User","site_admin":false},"labels":[{"id":289606028,"node_id":"MDU6TGFiZWwyODk2MDYwMjg=","url":"https://api.github.com/repos/trilinos/Trilinos/labels/Tpetra","name":"Tpetra","color":"5319e7","default":false},{"id":287520103,"node_id":"MDU6TGFiZWwyODc1MjAxMDM=","url":"https://api.github.com/repos/trilinos/Trilinos/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":17,"created_at":"2018-05-18T20:04:23Z","updated_at":"2018-06-19T21:16:28Z","closed_at":null,"author_association":"NONE","body":"@trilinos/Tpetra\r\n\r\n<!---\r\nAssignees:  If you know anyone who should likely tackle this issue, select them\r\nfrom the Assignees drop-down on the right.\r\n-->\r\n\r\n<!---\r\nLables:  Choose any applicable package names from the Labels drop-down on the\r\nright.  Additionally, choose a label to indicate the type of issue, for\r\ninstance, bug, build, documentation, enhancement, etc.\r\n-->\r\n\r\n## Expectations\r\n<!---\r\nTell us what you think should happen, how you think things should work, what\r\nyou would like to see in the documentation, etc.\r\n-->\r\nAttempt to build `trilinos` with `tpetra` support using the IBM XL compiler succeeds.\r\n\r\n## Current Behavior\r\n\r\nUsing [Spack](https://spack.io/), I attempted to build and install `trilinos` with `tpetra` support using the IBM XL compiler.  The specific Spack command was: `spack install --test=root trilinos%xl_r ~pnetcdf ^netlib-lapack+external-blas ^netcdf%gcc ^m4%gcc`, which will attempt to build and install `trilinos` with the parallel IBM XL compiler, without `pnetcdf` support, with `netlib-lapack` support using an external BLAS provider (in my case, IBM ESSL), with `netcdf` and `m4` dependencies built with gcc, and then perform any `cmake` automated testing for the `trilinos` package.\r\n\r\nSpack produces the following error output:\r\n```\r\n==> Building trilinos [CMakePackage]\r\n==> Executing phase: 'cmake'\r\n==> Executing phase: 'build'\r\n==> Error: ProcessError: Command exited with status 2:\r\n    'make'\r\n\r\n6 errors found in build log:\r\n     [ ... ]\r\n     1864  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_iallreduce.cpp.o\r\n     1865  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_iallreduce.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_iallreduce.cpp\r\n     1866  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_isInterComm.cpp.o\r\n     1867  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_isInterComm.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_isInterComm.cpp\r\n     1868  [ 35%] Building CXX object packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o\r\n     1869  cd /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src && /projects/opt/ppc64le/openmpi/2.1.0-gcc_7.1.0/bin/mpic++  -Dtpetra_EXPORTS -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/kokkos_refactor -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/tsqr/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/tsqr/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/LinAlg -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/NodeAPI -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/classic/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/classic/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscomm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscomm/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/kokkoscompat/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/parameterlist/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/core/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/core/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/comm/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/remainder/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/teuchos/remainder/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/teuchos/numerics/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/epetra/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/epetra/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/impl -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos-kernels/src/stage/graph/utils -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/algorithms/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/algorithms/src -I/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/kokkos/containers/src -I/projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/kokkos/containers/src  -std=c++11 -O2 -g -DNDEBUG -fPIC   -o CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o -c /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp\r\n  >> 1870  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:148:3: error: no matching function for call to 'dgemm'\r\n     1871    TPETRACORE_DGEMM (&transA, &transB, &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);\r\n     1872    ^~~~~~~~~~~~~~~~\r\n     1873  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:70:53: note: expanded from macro 'TPETRACORE_DGEMM'\r\n     1874  #define TPETRACORE_DGEMM TPETRACORE_F77_BLAS_MANGLE(dgemm,DGEMM)\r\n     1875                                                      ^~~~~\r\n     1876  /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src/TpetraCore_config.h:171:49: note: expanded from macro 'TPETRACORE_F77_BLAS_MANGLE'\r\n     1877  #  define TPETRACORE_F77_BLAS_MANGLE(name,NAME) name\r\n     1878                                                  ^~~~\r\n     1879  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:134:1: note: candidate function not viable: no known conversion from 'const char *' to 'const char' for 1st argument; remove &\r\n     1880  dgemm (const char transA,\r\n     1881  ^\r\n  >> 1882  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:166:3: error: no matching function for call to 'sgemm'\r\n     1883    TPETRACORE_SGEMM (&transA, &transB, &m, &n, &k, &alpha, A, &lda, B, &ldb, &beta, C, &ldc);\r\n     1884    ^~~~~~~~~~~~~~~~\r\n     1885  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:80:53: note: expanded from macro 'TPETRACORE_SGEMM'\r\n     1886  #define TPETRACORE_SGEMM TPETRACORE_F77_BLAS_MANGLE(sgemm,SGEMM)\r\n     1887                                                      ^~~~~\r\n     1888  /tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build/packages/tpetra/core/src/TpetraCore_config.h:171:49: note: expanded from macro 'TPETRACORE_F77_BLAS_MANGLE'\r\n     1889  #  define TPETRACORE_F77_BLAS_MANGLE(name,NAME) name\r\n     1890                                                  ^~~~\r\n     1891  /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp:152:1: note: candidate function not viable: no known conversion from 'const char *' to 'const char' for 1st argument; remove &\r\n     1892  sgemm (const char transA,\r\n     1893  ^\r\n     1894  2 errors generated.\r\n  >> 1895  Error while processing /projects/draco/vendors/spack.power8-0.11.1/var/spack/stage/trilinos-12.12.1-rdm5vlkvnusztnxqsjmpd4tiaw4k7uxr/Trilinos-trilinos-release-12-12-1/packages/tpetra/core/src/Tpetra_Details_libGemm.cpp.\r\n  >> 1896  make[2]: *** [packages/tpetra/core/src/CMakeFiles/tpetra.dir/Tpetra_Details_libGemm.cpp.o] Error 1\r\n     1897  make[2]: Leaving directory `/ram/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build'\r\n  >> 1898  make[1]: *** [packages/tpetra/core/src/CMakeFiles/tpetra.dir/all] Error 2\r\n     1899  make[1]: Leaving directory `/ram/tmp/dantopa/spack-stage/spack-stage-Rv6nqz/Trilinos-trilinos-release-12-12-1/spack-build'\r\n  >> 1900  make: *** [all] Error 2\r\n```\r\n\r\n\r\n## Motivation and Context\r\nThis prevented my team from being able to compile and install the Trilinos package with Tpetra enabled on an IBM Power9 system using the IBM XL compiler suite.  Being able to do so was a hard requirement provided to us by our customer.  My team had to debug the problem and develop a patch which may or may not be the optimal solution for this defect.\r\n\r\n## Definition of Done\r\nCorrect mangling error in C/Fortran interface code (see \"Possible Solution\" section below).  Spack must be able to build and install Trilinos with Tpetra support using the IBM XL compiler, and must be able to run Trilinos' automated `cmake` verification tests.\r\n\r\n## Possible Solution\r\nThe cause of this problem is that `gfortran` appends '_' to external subroutine names in `*.o` files but `xlf` does not. `dgemm` is apparently a Fortran subroutine, and `Tpetra_Details_libGemm.cpp` was developed as a C wrapper to the *gemm interfaces.  Because Fortran is pass-by-reference and C/C++ pass-by-value, the wrappers in `Tpetra_Details_libGemm.cpp` allow C/C++ callers to call the *gemm functions with values, and invoke the actual Fortran *gemm functions with pointers to those values .  The wrapper function uses the `TPETRACORE_F77_BLAS_MANGLE` macro to determine the C-mangled name of the Fortran function.\r\n\r\n`TPETRACORE_F77_BLAS_MANGLE` is built during configure time when `cmake` presumably figures out how the Fortran compiler builds external function names in `*.o` files.  In the `gfortran` case, `TPETRACORE_DGEMM TPETRACORE_F77_BLAS_MANGLE(dgemm,DGEMM)` becomes `dgemm_`, and all goes well.  However, in the `xlf` case, this resolves to `dgemm` without the underbar, which happens to be the same name as the `dgemm` wrapper function defined in the `Tpetra_Details_libGemm.cpp` source file.  Also, since the `TPETRACORE_DGEMM` function prototype is declared in the scope of `extern \"C\"`, mangling rules don't apply for the local definition either. So now you have a prototype that takes pointer arguments and a function definition that takes value arguments, which causes the error that I observed.\r\n\r\nMy fix was to redefine the C/C++ wrapper function names as `*gemm_wrap`, eliminating the possibility that the wrapper names could collide with the actual Fortran function names.  This seems to get us past this problem, although I admit thorough testing has not been done as I am not intimately familiar with Trilinos and its' use cases.\r\n\r\n## Steps to Reproduce\r\n1. Install IBM XL 16.1 on a test system per product installation instructions.\r\n2. Extract Spack into your home directory on the test system by extracting the *.zip file attached to this issue.  Newer versions will include my patch for this problem, preventing recreation.\r\n3. From your home directory, run `. ~/spack/share/spack/setup-env.sh ; export PATH=$PATH:$HOME/spack`\r\n4. Issue `spack compilers` and verify that Spack has detected the IBM XL compilers and gcc > 4.9.0.  If your gcc is less than 4.9.0, do the following:\r\n4a. `spack install gcc@5.1.0`\r\n4b. When Spack has installed gcc 5.1.0, it will display a line of output indicating where it was installed to.  Copy that path.\r\n4c. `spack compiler add GCCPATH` where GCCPATH is the path you copied in step 4b.\r\n4d. Issue `spack compilers` and verify that Spack has detected gcc 5.1.0.\r\n5. Attempt to install Trilinos through Spack: `spack install trilinos%xl_r ~pnetcdf ^netlib-lapack+external-blas ^netcdf%gcc ^m4%gcc`\r\n\r\n## Your Environment  \r\n- Built using Trilinos 12.12.1 from git (SHA ecd4606fa332212433c98bf950a69cc7)\r\n- Operating system was RHEL 7.4 on an IBM Power9 system.\r\n- XL compiler was xl_r from IBM XL 16.1 compiler suite, gcc compiler was 5.1.0.\r\n\r\n## Related Issues\r\nThis was originally opened as [Spack issue 7247](https://github.com/spack/spack/issues/7247).\r\n\r\n## Additional Information\r\nMy patch to fix this problem is attached, as is a version of Spack without my fix.\r\n[xlf_tpetra.patch.txt](https://github.com/trilinos/Trilinos/files/2018444/xlf_tpetra.patch.txt)\r\n[spack-develop.zip](https://github.com/trilinos/Trilinos/files/2018445/spack-develop.zip)\r\n\r\n"},"comment":{"url":"https://api.github.com/repos/trilinos/Trilinos/issues/comments/398548853","html_url":"https://github.com/trilinos/Trilinos/issues/2781#issuecomment-398548853","issue_url":"https://api.github.com/repos/trilinos/Trilinos/issues/2781","id":398548853,"node_id":"MDEyOklzc3VlQ29tbWVudDM5ODU0ODg1Mw==","user":{"login":"kddevin","id":9597421,"node_id":"MDQ6VXNlcjk1OTc0MjE=","avatar_url":"https://avatars0.githubusercontent.com/u/9597421?v=4","gravatar_id":"","url":"https://api.github.com/users/kddevin","html_url":"https://github.com/kddevin","followers_url":"https://api.github.com/users/kddevin/followers","following_url":"https://api.github.com/users/kddevin/following{/other_user}","gists_url":"https://api.github.com/users/kddevin/gists{/gist_id}","starred_url":"https://api.github.com/users/kddevin/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/kddevin/subscriptions","organizations_url":"https://api.github.com/users/kddevin/orgs","repos_url":"https://api.github.com/users/kddevin/repos","events_url":"https://api.github.com/users/kddevin/events{/privacy}","received_events_url":"https://api.github.com/users/kddevin/received_events","type":"User","site_admin":false},"created_at":"2018-06-19T21:16:28Z","updated_at":"2018-06-19T21:16:28Z","author_association":"CONTRIBUTOR","body":"Can you try removing \"/bin\" from your MPI_BASE_DIR option when you compile?  \r\nThis may allow CMake to find mpi.h in $MPI_BASE_DIR/include.\r\n"}}
{"actor":{"display_login":"kddevin"}}