You can do 

export PATH=$(spack location -i mpich)/bin:$PATH

to prepend the path of mpich to your PATH. This is not done automatically. 
Alternatively, you could also run, as root: 

cd /usr/local
spack view add . mpich

which aliases all mpi commands to /usr/local/bin

I usually do this in a custom docker image, derived from the official deal.II 
image, which I then upload to my personal docker hub, and use for my CI needs.

Best,
Luca.

---
FROM dealii/dealii:v9.1.1-gcc-mpi-fulldepsspack-debugrelease

MAINTAINER [email protected]

USER       root
RUN        spack install googletest ninja \
           && spack clean -a \
           && cd /usr/local && spack view add . googletest ninja mpich

RUN        chmod 777 /home/$USER

USER       $USER



> On 25 Oct 2019, at 4:02, Reza Rastak <[email protected]> wrote:
> 
> Hi,
> 
> I have a related issue regarding the docker image. I can see `mpich` when I 
> type `spack find`. However, I don't have access to executable programs 
> `mpirun` or `mpiexec`.
> 
> >> mpirun
> bash: mpirun: command not found
> 
> when I try to load the module I see the following error messages.
> 
> >> spack load mpich
> ==> This command requires spack's shell integration.
>   
>   To initialize spack's shell commands:
>   
>       # for bash and zsh
>       . /usr/local/share/spack/setup-env.sh
>   
>       # for csh and tcsh
>       setenv SPACK_ROOT /usr/local
>       source /usr/local/share/spack/setup-env.csh
>   
>   This exposes a 'spack' shell function, which you can use like
>       $ spack load package-foo
>   
>   Running the Spack executable directly (for example, invoking
>   ./bin/spack) will bypass the shell function and print this
>   placeholder message, even if you have sourced one of the above
>   shell integration scripts.
> 
> >> . /usr/local/share/spack/setup-env.sh
> >> spack load mpich
> bash: module: command not found
> 
> Does anyone know how I can access `mpirun`?
> 
> Thank you,
> 
> Reza
> 
> 
> 
> On Tuesday, October 22, 2019 at 5:18:22 AM UTC-7, Bruno Turcksin wrote:
> Doug,
> 
> You are using an image build using spack so everything is installed using 
> spack instead of the package manager. If you type `spack find` inside a 
> container, you will see that mpich is installed.
> 
> Best,
> 
> Bruno
> 
> On Monday, October 21, 2019 at 9:53:36 PM UTC-4, Doug Shi-Dong wrote:
> Hello everyone,
> 
> I would like to use Travis CI to test pull requests, and I am currently 
> following the steps described in 
> https://github.com/dealii/dealii/wiki/Docker-Images
> 
> Except I am using the following Docker image: 
> dealii/dealii:v9.1.1-gcc-mpi-fulldepsspack-debugrelease
> 
> It seems that this Docker imagine does not contain an MPI package in its 
> installation. Here is a log of my Travis CI build
> 
> https://travis-ci.org/dougshidong/PHiLiP/builds/600536273
> 
> The command apt search mpi shows that no packages such as openmpi or mpich is 
> available. However, oddly enough, DEAL_II_WITH_MPI is ON, when my CMake 
> checks for it.
> 
> If no MPI is available, how do I compile the code within this Docker 
> container?
> 
> Best regards,
> 
> Doug
> 
> -- 
> The deal.II project is located at http://www.dealii.org/
> For mailing list/forum options, see 
> https://groups.google.com/d/forum/dealii?hl=en
> --- 
> You received this message because you are subscribed to the Google Groups 
> "deal.II User Group" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to [email protected].
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/dealii/aa77f722-f3cb-4ae8-a46c-7c6e815e0338%40googlegroups.com.

-- 
The deal.II project is located at http://www.dealii.org/
For mailing list/forum options, see 
https://groups.google.com/d/forum/dealii?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"deal.II User Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/dealii/A6668905-DAC5-44B9-8D58-D577322C3166%40gmail.com.

Reply via email to