Code:
BASE='-np 4 my_app --help'
The quoting here iis good and will make sure all space separated variables are combined as one string into the variable.
Code:
mpiexec "$BASE"
The quoting here is not good, because this too will combine the contents of the
$BASE variable as one string and pass the one string as one parameter to mpiexec. If you remove the double-quotes, the substitution will make sure all space separated content in
$BASE will be treated as separate arguments.
Just remove the double quotes and it should work.