Skip to content

create directory if it does not exists #1276

Closed Answered by cyrush
indra098124 asked this question in Q&A
Discussion options

You must be logged in to vote

@indra098124
We don't create intermediate directories, however one way to do this is using Ascent's shell command actions:

Here is an example:

- 
  action: "add_commands"
  commands: 
    c1: 
      params: 
        shell_command: "mkdir -p My_Dir"
        mpi_behavior: "root"

This will only run on MPI Task 0.

You can use a more complex shell command if you like (check for the dir and then only create)
Hope this helps,
-Cyrus

Replies: 1 comment

Comment options

You must be logged in to vote
0 replies
Answer selected by indra098124
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants