Where to find python library files in CS4.0 Windows

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
xwei
Posts: 2
Joined: Mon May 15, 2017 8:54 am

Where to find python library files in CS4.0 Windows

Post by xwei »

Hi,

I installed CS4.0 Window version, and I need to modify a little bit python library such as "cs_compile.py" for my simulation.
But I can't find the python script in C:\Program Files (x86)\Code_Saturne\4.0\bin , and there are only compiled python files in library.zip.

Could you tell me where to find those python files in Windows version ?
Thanks.

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

Re: Where to find python library files in CS4.0 Windows

Post by Yvan Fournier »

Hello,

Sorry, I don't know how to answer this question. This is one of the issues with the Windows build http://code-saturne.org/forum/viewtopic.php?f=4&t=2034.

Or actually, I'm afraid I know how to answer your question: we use cxfreeze for Python in the Windows build, so the Python code is probably frozen into a binary...

If you are on Windows 10 and can follow detailed step by step instructions, I would recommend trying the Linux subsystem for Windows (such as Ubuntu) and install the code like you would on Linux (from source). I tested i a while ago and it seems to work well. I did not test the GUI as this requires installing an X11 server, but a colleague tested it so I could get the info.

I would like to have a better answer, but as long as no one helps us improve our Windows build (see link above), I don't...

Best regards,

Yvan
xwei
Posts: 2
Joined: Mon May 15, 2017 8:54 am

Re: Where to find python library files in CS4.0 Windows

Post by xwei »

Hello,

Thank you for your advice.
I recently updated my system to Windos 10 and activated the Ubuntu subsystem.

Then, I installed code_saturne in Ubuntu by using the command: "sudo apt-get install code-saturne". It is the code_saturne version 4.2.0 that installed automatically.

However, I have some problems during the first simulation test. I got this error in listing:

@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ ATTENTION : PHYSIQUE PARTICULIERE
@ =========
@ LES CONDITIONS AUX LIMITES SONT INCOMPLETES OU ERRONEES
@
@ Le numero de zone associee a la face 1 doit etre
@ un entier strictement positif et inferieur ou egal a
@ NOZPPM = 2000
@ Ce numero (IZFPPP(IFAC)) vaut ici 0
@
@ Le calcul ne peut etre execute.
@
@ Verifier les conditions aux limites.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ ATTENTION : PHYSIQUE PARTICULIERE
@ =========
@ LES CONDITIONS AUX LIMITES SONT INCOMPLETES OU ERRONEES
@
@ Le numero de zone associee a la face 2 doit etre
@ un entier strictement positif et inferieur ou egal a
@ NOZPPM = 2000
@ Ce numero (IZFPPP(IFAC)) vaut ici 0
@
@ Le calcul ne peut etre execute.
@
@ Verifier les conditions aux limites.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@
@ @@ ATTENTION : PHYSIQUE PARTICULIERE
@ =========
@ LES CONDITIONS AUX LIMITES SONT INCOMPLETES OU ERRONEES
@
@ Le numero de zone associee a la face 3 doit etre
@ un entier strictement positif et inferieur ou egal a
@ NOZPPM = 2000
@ Ce numero (IZFPPP(IFAC)) vaut ici 0
@
@ Le calcul ne peut etre execute.
@
@ Verifier les conditions aux limites.
@
@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@@
@

etc...

It seems that the cs_user_boundary_conditions.f90 has not been considered. Becase when I define the boundary conditions directly in the .xml file, the simulation runs correctly.

I wonder if I shouldn't install the code_saturne by using apt. May be I should install from download sources on the website.

Best regards,
Xiao
Yvan Fournier
Posts: 4077
Joined: Mon Feb 20, 2012 3:25 pm

Re: Where to find python library files in CS4.0 Windows

Post by Yvan Fournier »

Hello,

Yes, this is a known bug with Ubuntu packages (you can find references to it searching on this forum, and I filed a bug with Ubuntu, e.g. https://bugs.launchpad.net/ubuntu/+sour ... ug/1672585, but have had no answer). The equivalent packages on Debian (which is similar) do not have this bug.

Installing the package, then uninstalling it my be useful to easily obtain the required prerequisites (use "apt-get remove", not "apt-get autoremove" here).

Then install from sources to avoid issues (and have a more recent version).

Best regards,

Yvan
Post Reply