Page 1 of 1

Subroutine migration from version 4 to version 5

Posted: Mon Nov 05, 2018 2:58 pm
by kunalck
Hello,

I have been working with version 4 for a particular simulation and now I have decided to migrate to version 5 of Code_Saturne. The simulation is running smoothly with v4. I tried running subroutines from v4 on v5 and encountered few errors. I have tried correcting errors one by one, reading from compile.log file. I would like to know if there is any other way to migrate the subroutines from v4 to v5. All the suggestions are welcome.

Re: Subroutine migration from version 4 to version 5

Posted: Tue Nov 06, 2018 10:38 am
by Yvan Fournier
Hello,

There is no automatic solution, though some routines remain compatible. The usual procedure is to:
- create a new v5.0 case
- add user files for the required subroutines from SRC/REFERENCE to SRC
- use a diff/merge tool (such as "meld") to merge the subroutines from your v4.0 case to th matching v5.0 case, making sure you do not modify function signatures.
- check compilation and fix iteratively.

Using the Doxygen documentation can help.

Also, modini.f90 is not a "user" subroutine, so you are on your own for that one (it is not recommended using non-user subroutines in SRC, except possibly when debugging, as those may be subject to change even during a a given release/bug-fix cycle).

Regards,

Yvan