-
Notifications
You must be signed in to change notification settings - Fork 101
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MPI: check presence of a runner command only with run
and test
apps
#937
Conversation
Thanks for fixing this issue!
Where After printing these warnings, it starts compiling. |
Good catch thank you @Carltoffel, the unnecessary messages should be gone now (only output on |
Another thing and sorry for the confusion I may have caused: I just updated the issue because |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @perazz , looks good to me.
Much better!
|
The current logic is to pass only additional arguments with the runner flag, like:
queue systems have rather convoluted syntax and there is no straightforward way to support them via |
I previously did it like this:
juwels.sh:
And it worked fine. Edit: |
Is it like that only when using MPI? In this case I would suggest using another option-name as it is inconsistent with how it worked before or without MPI. |
I need to check the code again and get back to you.
|
Just an idea, what do you think about a new fpm subcommand: |
Co-authored-by: Minh Dao <43783196+minhqdao@users.noreply.github.com>
…into mpi_runner_onrunonly
this%run_command = mpi_wrapper_query(mpilib,fort_wrapper,'runner',verbose,error) | ||
if (allocated(error)) return | ||
this%has_run_command = len_trim(this%run_command)>0 | ||
this%run_command = mpi_wrapper_query(mpilib,fort_wrapper,'runner',verbose,runner_error) | ||
this%has_run_command = (len_trim(this%run_command)>0) .and. .not.allocated(runner_error) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These lines before the change look pretty good to me. What speaks against them? We return early if there's an error and therefore do not need to care about the value of this%has_run_command
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
These were changed to account for your request @minhqdao. If you think the previous version was better, please revert, thank you.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, the question was what speaks against the lines 1008-1010 (before this PR)?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Confirm my previous answer
@Carltoffel I checked and can confirm that there is currently no way to pass flags other than via
In this way, |
I really like this idea! But then we should check if the argument of |
Thanks @Carltoffel, I think that would be implicitly taken care of: The rule would be,
I think this would be a pretty general approach? |
I'm not sure, if we should forbid passing arguments to the runner. At least we should print a warning, IMHO. Edit: Besides of this, I totally agree with you. |
If we look at the fpm help, it says:
I've tried to pass the
|
@Carltoffel like discussed, I've introduced the option to pass arguments to the runner (instead of to the app) via So for example, one can now pass arguments to the runner e.g.
(note heading space, needed by M_CLI2). @urbanjost I've tried to add a CI test but I keep failing writing "namelist language". If it is not too much of an issue, can I ask you to take a look at this PR? Thank you in advance. |
I believe the comments and concerns so far were addressed; so, if there are no further ones, I think the content of this PR is ready to merge soon |
missed this one. Not quite sure what the exact issue is; but there was an earlier version prototype proposed where you could control the position in the command of the filenames by using a special string like %% or {} or $FILE. If the special string (lets say it is %% is found is is replaced much like commands like xargs or find do. xargs is particular seems a good model, as the -I switch lets you specify a string to replace, and that triggers the replacement operation. Would that be a useful solution? There are several string replacement procedures available. |
no problem @urbanjost, the request is to be able to pass arguments to the runner command rather than the project executable. MPI is the example that triggered this need, as one has:
Now, to pass |
If there are no more comments, I think this can be merged soon. |
Address #935.
fpm run
ortest
--runner
option overrides mpiexec instead of appending it (backward compatibility)--runner-args
option so additional arguments can be passed to the runner command instead of to the app (e.g., "-np 123"@Carltoffel all CI tests work as there is always a runner command there.
Can I ask you to test this in the case you detailed in #935?
Thank you!