Copy of unique XML file from DATA repository to RESU

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
andre.antolinos
Posts: 2
Joined: Fri Jan 06, 2017 4:32 pm

Copy of unique XML file from DATA repository to RESU

Post by andre.antolinos »

Dear all,

I'm currently facing a difficulty with the use of Code_Saturne on our HPC (not blocking).

I consider one of my case with multiple XML files in the DATA repository, for example for an initial run and a restart. When launching the computation with the desired XML file, all is allright except the fact that I get all the DATA/*.xml files into the RESU/id repository.

My question i then : is there an option/a way in Code_Saturne to only copy the targeted XML file into the RESU/id repository ?

Thanks a lot,

André
Yvan Fournier
Posts: 4209
Joined: Mon Feb 20, 2012 3:25 pm

Re: Copy of unique XML file from DATA repository to RESU

Post by Yvan Fournier »

Hello,

No, this is intentional. The recommended (i.e. "clean" approach is to create a new case, using the "--copy-from" option to "code_saturne create" command). Also, "setup.xml" is now the recommended name.

Older versions of the code copied only one xml file, but also required the user to provide the list of all other input files, which often led to missing files. The behavior was also not consistent with the one for the SRC directory, while copying everything in DATA (but not in DATA/<subdirectory>) is consistent with the behavior of user sources in SRC. It is also not possible to filter just the xml files, at least not simply by extension, because we do not want to risk missing an xml file related to some optional library which might also use (different) xml files...

To know which file was used, simply check the beginning of the "listing" file. Otherwise, if you really want to filter xml files and use a single "case" directory, you can use the advanced "domain_prepare_data_add" function in the cs_user_scripts.py for this (which probably no one uses, but was added just in case someone needed to add a special operation there).

Finally, if you are simply running restarts with the same option, you might want to check the "domain_auto_restart" function from cs_user_scripts.py which is called in the "domain_prepare_data_add" example (it basically sets the latest run for restarts, and uses a "control_file" to add a given number of time steps). Using this, you only need the base XML file.

Regards,

Yvan
andre.antolinos
Posts: 2
Joined: Fri Jan 06, 2017 4:32 pm

Re: Copy of unique XML file from DATA repository to RESU

Post by andre.antolinos »

Hello Yvan,

thanks for your fast answer, we will then use your best-practice. (approach and namings)

Regards,

André
Post Reply