Error of using standard modules during compilation

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Error of using standard modules during compilation

Post 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
Attachments
compile.log
(28.3 KiB) Downloaded 282 times
Yvan Fournier
Posts: 4251
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error of using standard modules during compilation

Post by Yvan Fournier »

Hello,

Could you also post your user subroutines ?

Regards,

Yvan
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Re: Error of using standard modules during compilation

Post by rodion »

Thank you for your answer, Yvan.

Please, find the files attached.

Best regards,
Rodion
Attachments
cs_user_initialization.f90
(8.67 KiB) Downloaded 288 times
cs_user_parameters.f90
(41.98 KiB) Downloaded 283 times
cs_user_boundary_conditions.f90
(29.37 KiB) Downloaded 281 times
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Re: Error of using standard modules during compilation

Post by rodion »

Please, find three files more attached.

Best regards,
Rodion
Attachments
usthht.f90
(12.99 KiB) Downloaded 293 times
cs_user_source_terms.f90
(39.7 KiB) Downloaded 286 times
cs_user_physical_properties.f90
(16.77 KiB) Downloaded 284 times
Yvan Fournier
Posts: 4251
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error of using standard modules during compilation

Post 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
Attachments
cs_user_boundary_conditions.f90
(44.08 KiB) Downloaded 302 times
cs_user_initialization.f90
(8.81 KiB) Downloaded 245 times
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Re: Error of using standard modules during compilation

Post 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
Attachments
compile.log
(25.97 KiB) Downloaded 262 times
Yvan Fournier
Posts: 4251
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error of using standard modules during compilation

Post 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
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Re: Error of using standard modules during compilation

Post 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
Yvan Fournier
Posts: 4251
Joined: Mon Feb 20, 2012 3:25 pm

Re: Error of using standard modules during compilation

Post by Yvan Fournier »

Hello,

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

Regards,

Yvan
rodion
Posts: 98
Joined: Wed Jan 11, 2017 4:13 pm

Re: Error of using standard modules during compilation

Post 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
Attachments
setup.xml
(7.54 KiB) Downloaded 235 times
performance.log
(24.36 KiB) Downloaded 271 times
preprocessor.log
(8.69 KiB) Downloaded 287 times
Post Reply