code_saturne with coprocessing

All questions about installation
Forum rules
Please read the forum usage recommendations before posting.
Post Reply
sirlb
Posts: 34
Joined: Mon Mar 17, 2014 11:54 am

code_saturne with coprocessing

Post by sirlb »

Hello,

Thanks to a previous post in the forum, i managed to enable coprocessing for cs v4.3.0 (very very nice feature !!).
Like mentionned in the post, i have to set the LD_PRELOAD variable in addition to the python / paraview variables.

Such that my lunch script has the following decalartions in preamble :

Code: Select all

export PARAVIEW_PREFIX=/home/applis/paraview/5.1.2_mesa
export PYTHONPATH=$PARAVIEW_PREFIX/site-packages/vtk:$PYTHONPATH
export PYTHONPATH=$PARAVIEW_PREFIX/lib/paraview-5.1/site-packages/paraview:$PYTHONPATH
export PYTHONPATH=$PARAVIEW_PREFIX/paraview-5.1/site-packages:$PYTHONPATH
export LD_LIBRARY_PATH=$PARAVIEW_PREFIX/lib/paraview-5.1:$LD_LIBRARY_PATH
export LD_PRELOAD=/usr/lib64/libpython2.7.so
to simplify the launch script i tried to put all the former declarations in the rc file as defined in the code_saturne.cfg file.

But this does not work. If i remove the exports from my launch script, the code fails as if the rc file has no effect.

Is this a normal behaviour ?
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: code_saturne with coprocessing

Post by Yvan Fournier »

Hello,

No, the .rc file should work. Did you check the path to the .rc file in the .cfg file ? At some point, I am thinking of adding the possibility of defining environment variables directly in the .cfg file (though to do it both simply and within the constraints of the .cfg file's syntax might not be so easy).

Regards,

Yvan
sirlb
Posts: 34
Joined: Mon Mar 17, 2014 11:54 am

Re: code_saturne with coprocessing

Post by sirlb »

Hello, Thanks for replying,

cfg file is as :

Code: Select all

[install]
### Select the batch system type and job template.
batch = SLURM
###
...
### Optional path to sourcable shell environment initialization file
### (similar to .profile or .bashrc, specific to Code_Saturne).
rcfile = /home/applis/code_saturne/4.3.0/etc/bashrc
and :

Code: Select all

# cat /home/applis/code_saturne/4.3.0/etc/bashrc

export PARAVIEW_PREFIX=/home/applis/paraview/5.1.2_mesa

export PYTHONPATH=$PARAVIEW_PREFIX/site-packages/vtk:$PYTHONPATH
export PYTHONPATH=$PARAVIEW_PREFIX/lib/paraview-5.1/site-packages/paraview:$PYTHONPATH
export PYTHONPATH=$PARAVIEW_PREFIX/paraview-5.1/site-packages:$PYTHONPATH

export LD_LIBRARY_PATH=$PARAVIEW_PREFIX/lib/paraview-5.1:$LD_LIBRARY_PATH

export LD_PRELOAD=/usr/lib64/libpython2.7.so
Yvan Fournier
Posts: 4070
Joined: Mon Feb 20, 2012 3:25 pm

Re: code_saturne with coprocessing

Post by Yvan Fournier »

Hello,

Most of this should work, but I have one question regarding LD_PRELOAD: do you need it for the general script, or just for the in-situ postprocessing (as the Python interpreter used for each may be different, depending on your installation).

The way you used it, it should work for in-situ postprocessing (or I really missed something).

Regards,

Yvan
sirlb
Posts: 34
Joined: Mon Mar 17, 2014 11:54 am

Re: code_saturne with coprocessing

Post by sirlb »

Hello,

I need the LD_PRELOAD in the runcase script otherwise the computation fails (with a python error message of the kind : could not import site).
I tried to dig a little further in this problem and noticed that it may not be related to CS but to paraview.

Indeed I have 2 installations of paraview :
- the basic install using binaries package for linux 64bits
- a custom compilation with mesa to compile code_saturne with coprocessing
each installation has a module file to set path and alias.

If i load the mesa compiled version of paraview, no problem. but if i load the binary version of paraview, then i have plenty of problems in my shell regarding python (could not import site).

I don't really understand what is happening but i feel there is a problem during compilation of cs regarding to modules and paraview (i have to check if binary paraview was loaded when i compiled cs). I don't really have much time now to deal with this but I will send updates if i manage to understand what is problem.

Best Regards.
Post Reply