Skip to content

spec['mpi'].mpicc doesn't work for MPI in intel-parallel-studio #3487

@weijianwen

Description

@weijianwen

I failed to build mdtest with Intel Parallel Studio due to "'Spec' object has no attribute 'mpicc'" issue. mdtest is an MPI program to test metadata performance on filesystem.

The command to reproduce this issue and the error message is listed below.

$ spack install mdtest %intel ^intel-parallel-studio+mpi 
==> Installing mdtest
==> intel-parallel-studio is externally installed in /lustre/spack/tools/linux-centos7-x86_64/gcc-4.8.5/intel-parallel-studio-cluster.2017.1-4uy7iwkuftkrg5wx2sg5zi6r5355rqbe
==> Using cached archive: /tmp/rpm/spack_source_cache/mdtest/mdtest-1.9.3.tar.gz
==> Warning: Fetching from mirror without a checksum!
  This package is normally checked out from a version control system, but it has been archived on a spack mirror.
This means we cannot know a checksum for the tarball in advance. Be sure that your connection to this mirror is secure!.
==> Already staged mdtest-1.9.3-zwdgfm4vkhmcmqxhla4xhagbywnz7eqm in /home/rpm/spack/var/spack/stage/mdtest-1.9.3-zwdgfm4vkhmcmqxhla4xhagbywnz7eqm
==> No patches needed for mdtest
==> Building mdtest [Package]
==> Executing phase : 'install'
==> Error: AttributeError: 'Spec' object has no attribute 'mpicc'
/home/rpm/spack/var/spack/repos/builtin/packages/mdtest/package.py:40, in install:
     39       def install(self, spec, prefix):
  >> 40           filter_file('$(CC.$(OS))', spec['mpi'].mpicc, 'Makefile', string=True)
     41           make('mdtest')
     42           mkdirp(prefix.bin)
     43           install('mdtest', prefix.bin)

See build log for details:
  /tmp/rpm/spack_stage/spack-stage/spack-stage-XbDO_t/mdtest/spack-build.out

mdtest's build process is organized in Makefiile shipped with it. What Spack does is to replace the "$(CC.$(OS))'" string with the selected MPI's mpicc specified in spec['mpi'].mpicc, then run make. The embarrassing thing is that I tested it under %gcc ^onmpi only when I submit simul package, leaving %intel ^intel-parallel-studio untested.

According to Spack's doc http://spack.readthedocs.io/en/latest/packaging_guide.html?highlight=mpic , spec['mpi'].mpicc should get the MPICC compiler for intel-parallel-studio. Please correct me if I use spec['mpi'] in the wrong way.

Link to mdtest package https://github.com/LLNL/spack/blob/develop/var/spack/repos/builtin/packages/mdtest/package.py .

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions