Page 2 of 2

Re: user_physical properties.f90

Posted: Fri Jun 03, 2016 11:38 am
by frpageot
Hello,

I works perfectly with only one proc. But with 900000 cells one iteration lasts 1 minute... would be great if I can have it working for 16 procs.

Re: user_physical properties.f90

Posted: Fri Jun 03, 2016 1:40 pm
by Yujinx
Hello,
I am a CS user. I have tried to use cs_user_physical_properties.f90 to define physical properties of gas/steam mixture. When the file has the line "call field_get_val_s(ibrom, bfpro_rom)", it has the error message like : "Fortran pointer of rank 1 requested for values of field "velocity", which have rank 2.". I just delete the line, and it can run well without obvious mistakes.
I think you needn't use parsom function in this file, and just delete them. The file cs_gas_mix_physical_properties.f90 is used to define the physical properties of some specific mixtures, and you can read it and treat it as an example in your cases.(it is in Saturne source files ~/src/base, not in the created study files)

Re: user_physical properties.f90

Posted: Fri Jun 03, 2016 2:43 pm
by frpageot
thanks, I was not aware of this file, it seems that I can use it to build my mix gases application.

About parsom, not sure I understand why in this case i can get rid of that, can you explain ?

Re: user_physical properties.f90

Posted: Sun Jun 05, 2016 1:55 pm
by Yvan Fournier
Hello,

I just checked you code, and the issue is the parsom should NEVER be called inside a loop on cells, in part for performance reasons, but mostly because you may have a different number of cells on diffferent procs, leading to interlock...

It seems the all values you use are local, so you can remove parsom.

If you need sums on all cells, then you need to split the loop in 2: first, a part to compute the local sums, then (outside the loop) calls to parsom, then, a loop which uses those sums in formulas.

Regards,

Yvan

Re: user_physical properties.f90

Posted: Tue Jun 07, 2016 8:11 am
by frpageot
Hello,

OK Yvan that's crystal clear. Sorry for bothering you with that, I will know now to handle this.

Many thanks...