I am not familiar with the pyenv program, but it is clear that it works in
a similar way to Lmod. That is changes the environment variables and
probably adding aliases or shell functions. Obviously, it would be easier
to use Lmod to do everything rather than trying to mix the two tools. If
you want to use both then it looks like a fun project. The point is that
you'll want to run the pyenv command from inside a modulefile. You can do
this with the execute{} function. The drawback to this is that I don't
know if it possible to reverse what the pyenv command does. Also your
modulefiles are probably limited to being processed by shells and not by
perl, python, R, etc.
A Lua modulefile that calls pyenv might look like:
if (myShellType() == "sh" or myShellType() == "csh") then
execute{cmd="pyenv ...", modeA={"load"}} --> Used for loading this
module
execute{cmd="pyenv ...", modeA={"unload"}} --> Only use if pyenv
can be told to reverse its actions on unload.
end
Best,
Robert.
On Tue, Apr 28, 2020 at 7:12 AM Hongyi Zhao <hon...@gm...> wrote:
> Dear Dr. McLay,
>
> The python version for my case if compiled using gcc and manged by
> pyenv, while I want to install gpaw using intel parallel studio
> cluster version and the gcc-compiled python.
>
> The python virtualenv need to be loaded with pyenv command, and the
> intel toolchain need to be loaded with module load. This seems more
> cumbersome when I want to use the ultimate compiled gpaw. So I want
> to use the following scheme: prepare a modulefile for intel parallel
> sudio cluster version where I set rpath with LDFLAGS, and using this
> modulefile under the python virtualenv to compile the gpaw. In this
> way, so that I can use the gpaw only by activate the python virtualenv
> and without without using ` module load `.
>
> Is this method possible? Any considering that the toolchain settings
> included in parallel sudio cluster is very complex, which entries
> should I add to the modulefile for this purpose?
>
> Regards
> --
> Hongyi Zhao <hon...@gm...>
>
>
> _______________________________________________
> Lmod-users mailing list
> Lmo...@li...
> https://lists.sourceforge.net/lists/listinfo/lmod-users
> >> This message is from an external sender. Learn more about why this <<
> >> matters at https://links.utexas.edu/rtyclf. <<
>
>
--
Robert McLay, Ph.D.
Manager of Software Tools, HPC
mc...@ta...
|