Execute program with mpirun

I have found how to run extuable with arguments.

However, I need to use external program to run the excutable, for example:

    mpirun my_excutable -np 5

If I set the program arguments in configuration, I can only get

    ./my_excutable -np 5

How can I run an excutable with mpirun?

2 comments
Comment actions Permalink

Hi!

You can specify different executable in " Run | Edit configurations” dialog via “Executable” field and pass your executable as a parameter via “Program arguments” field. Please find out more information in our web help: https://www.jetbrains.com/clion/help/run-debug-configurations.html Does that help?

1
Comment actions Permalink

I know this is an old question, but we had a similar problem and found how to solve it, based on Anna Filippova's answer.

Under Run | Edit configurations you can set your executable to mpirun. With the program arguments you can then call your own original executable with: "-np 4 ./my_executable". Be sure to set your working directory to where your executable is positioned (usually cmake-build-debug/src/...) or otherwise your own executable won't be found.

4

Please sign in to leave a comment.