Subroutine decreases computing efficiency

Questions and remarks about code_saturne usage
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Subroutine decreases computing efficiency

Post by MartianDuan »

I just did some test on the Code_Saturne 3.0.1.

Compared to the case set by using '.xml', the computing efficient greatly suffered when the subroutine was used to set the parameters.

Did anyone come across such problem before.

Thanks in advance.
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Subroutine decreases computing efficiency

Post by Yvan Fournier »

Hello,

This may strongly depend on the subroutine (level of detail yours).

Regards,

Yvan
MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Subroutine decreases computing efficiency

Post by MartianDuan »

Hi Yvan,

Thanks for you reply.

I just used the cs_user_boundary_conditions.f90 and cs_user_parameters.f90 to run the test case.

But the computing effiecent suffered, It is just a third of the case set by .xml.

I did another test, slimming the sub_routine files, which was deleting the unusage lines. However, the computing effiececy wasn't improved.

Do you have any comments?

Thanks in advance,

Yu.
Yvan Fournier wrote:Hello,

This may strongly depend on the subroutine (level of detail yours).

Regards,

Yvan
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Subroutine decreases computing efficiency

Post by Yvan Fournier »

Hello,

The routines should not be slower, unless the coding of cs_user_boundary_conditions.f90 is bad. Could you attach it here ?

I have also once seen a case (with Code_Saturne 2.0) where simply linking with user subroutines degraded performance, due to an inconsistent environment between installation and compilation / link with user subroutine, where multiple versions of the Intel compiler were installed, and a slight mix between the 2 did not cause any crash, but slowed performance by a factor of 3.

Regards,

Yvan
MartianDuan
Posts: 74
Joined: Fri Aug 02, 2013 4:26 pm

Re: Subroutine decreases computing efficiency

Post by MartianDuan »

Hello Yvan,

Thanks for your reply. I did not realize the boundary condition sub routine can be a problem on the efficiency.

Please have a look at it, in attachment.

Thanks very much,

Yu.
Yvan Fournier wrote:Hello,

The routines should not be slower, unless the coding of cs_user_boundary_conditions.f90 is bad. Could you attach it here ?

I have also once seen a case (with Code_Saturne 2.0) where simply linking with user subroutines degraded performance, due to an inconsistent environment between installation and compilation / link with user subroutine, where multiple versions of the Intel compiler were installed, and a slight mix between the 2 did not cause any crash, but slowed performance by a factor of 3.

Regards,

Yvan
Attachments
cs_user_boundary_conditions.f90
(12.31 KiB) Downloaded 186 times
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: Subroutine decreases computing efficiency

Post by Yvan Fournier »

Hello,

Your cs_user_boundary_conditions.f90 file seems quite simple and "standard", so I do not see any obvious reason why using it should make the code slower, except for possible install issues as described in my previous post.

To help check if there is another subtle reason, could you post the "listing" and "performance.log" files for both variants (GUI and user subroutine) ?

Regards,

Yvan
Post Reply