Page 1 of 2

Error of using standard modules during compilation

Posted: Mon Jul 31, 2017 7:38 pm
by rodion
Hello everyone,

I work on the simulation of electric arc in DC plasma torch with electrodes included into the domain. Before I have used Code_Saturne 4.2 and recently I've decided to switch to Code_Saturne 5.0 because I need internal coupling for electrodes simulation.
I compared user code examples for CS5.0 with my code files for CS4.2 and adapted my code files for CS5.0. But if I start compilation, I encounter 27 similar problems as following:

Code: Select all

 use numvar
    1
Error: ‘cs_user_initialization’ of module ‘numvar’, imported at (1), is also the name of the current program unit
/home/rodion/TransfArc/Case3_Argon/RESU/20170731-2002/src_saturne/cs_user_initialization.f90:89:4:

 use optcal
    1
Error: ‘cs_user_initialization’ of module ‘optcal’, imported at (1), is also the name of the current program unit
/home/rodion/TransfArc/Case3_Argon/RESU/20170731-2002/src_saturne/cs_user_initialization.f90:90:4:

 use cstphy
    1
Error: ‘cs_user_initialization’ of module ‘cstphy’, imported at (1), is also the name of the current program unit
/home/rodion/TransfArc/Case3_Argon/RESU/20170731-2002/src_saturne/cs_user_initialization.f90:92:4:
Please find compilation log attached.
I encounter this problem on Ubuntu with CS5.0 and on Windows with CS4.3.
Does somebody know how can I compile my code with using standard modules and start calculation with CS5.0?

Best regards,
Rodion

Re: Error of using standard modules during compilation

Posted: Mon Jul 31, 2017 8:58 pm
by Yvan Fournier
Hello,

Could you also post your user subroutines ?

Regards,

Yvan

Re: Error of using standard modules during compilation

Posted: Thu Aug 03, 2017 10:23 am
by rodion
Thank you for your answer, Yvan.

Please, find the files attached.

Best regards,
Rodion

Re: Error of using standard modules during compilation

Posted: Thu Aug 03, 2017 10:27 am
by rodion
Please, find three files more attached.

Best regards,
Rodion

Re: Error of using standard modules during compilation

Posted: Fri Aug 04, 2017 11:02 pm
by Yvan Fournier
Hello,

The profile of some subroutines has changed betwwen versions. Your update was not correct.

I attached some updated versions which compile now.

When updating, it is always safer to compare user functions with the ones in REFERENCE (using tools such as meld, or your favorite file comparison tool).

Best regards,

Yvan

Re: Error of using standard modules during compilation

Posted: Sun Sep 03, 2017 6:55 pm
by rodion
Thank you for your answer, Yvan.

The compilation is okay now. Thank you very much!
But the file cs_user_initialization.f90 is not active.
I can see its mentions in the compile.log (please find it attached), but it doesn't make initialization of enthalpy and doesn't output anything to the console or listing.
I have checked the same file in C (cs_user_initialization.c), it works.
Do you know what can be the reason of this problem with initialization in Fortran?

Best regards,
Rodion

Re: Error of using standard modules during compilation

Posted: Tue Sep 05, 2017 1:04 pm
by Yvan Fournier
Hello,

Are you using a packaged version of Code_Saturne on Ubuntu ? If this is the case, there is a known bug, referenced on this forum and submitter on the Ubuntu bug tracker (with no progress), realted to this. If not, what system/install method are you using ?

Best regards,

Yvan

Re: Error of using standard modules during compilation

Posted: Tue Sep 05, 2017 2:49 pm
by rodion
Thank you for your answer, Yvan.

I have tried CS5.0 on Windows 7 and Ubuntu 16. Initialization in Fortran doesn't work on both OS.
By the way, I have just found that cs_user_physical_properties.f90 doesn't work too, while the compilation is okay.
How can I make it work?

Best regards,
Rodion

Re: Error of using standard modules during compilation

Posted: Tue Sep 05, 2017 7:30 pm
by Yvan Fournier
Hello,

Could you post your setup, as per the forum usage recommandations ?

Regards,

Yvan

Re: Error of using standard modules during compilation

Posted: Tue Sep 05, 2017 10:45 pm
by rodion
Please find the files attached.
The mesh is too big for the message, so please find it by the following link:
https://drive.google.com/open?id=0BzeG5 ... UpqclFBSmM

Best regards,
Rodion