Page 1 of 1

Subroutine decreases computing efficiency

Posted: Fri Jul 04, 2014 10:44 am
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.

Re: Subroutine decreases computing efficiency

Posted: Fri Jul 04, 2014 9:19 pm
by Yvan Fournier
Hello,

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

Regards,

Yvan

Re: Subroutine decreases computing efficiency

Posted: Wed Jul 09, 2014 11:49 am
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

Re: Subroutine decreases computing efficiency

Posted: Wed Jul 09, 2014 2:25 pm
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

Re: Subroutine decreases computing efficiency

Posted: Mon Jul 14, 2014 1:14 pm
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

Re: Subroutine decreases computing efficiency

Posted: Mon Jul 14, 2014 2:16 pm
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