Skip to content

fpm can't find MPI runner on HPE Cray system #1140

@rouson

Description

@rouson

Description

> fpm new project
> cd project
> # edit fpm.toml
> cat fpm.toml
name = "project"

[dependencies]
mpi = "*" 

[fortran]
implicit-typing = true
implicit-external = true
> fpm test --compiler mpif90 --runner "srun -n 1"
 + which mpiexec
 + which mpirun
 + which mpiexec.exe
 + which mpirun.exe
<ERROR> *cmd_run* Model error: cannot find a valid mpi runner on the local host
STOP 1

Expected Behaviour

I expect fpm to find and use srun as the runner. On HPE Cray systems, srun replaces mpirun. A workaround is to create a script named mpirun with the following contents:

#!/bin/bash

srun "$@"

but it's likely that not every user would think of this and it took quite a bit of time to diagnose the problem and realize the solution.

Version of fpm

0.10.1

Platform and Architecture

Linux, HPE Cray (perlmutter.nersc.gov)

Additional Information

> mpif90 --version
GNU Fortran (SUSE Linux) 13.2.1 20240206 [revision 67ac78caf31f7cb3202177e6428a46d829b70f23]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions