<div><div dir="auto">yes, i see.</div></div><div dir="auto"><br></div><div dir="auto">i actually had a go at my own glibc and PyTorch installations on Taito, but so far gpu support is evasive.  is my impression correct that ‘taito-gpu’ does not have gpu hardware itself, i.e. one still needs to srun an interactive shell onto an actual gpu node?</div><div dir="auto"><br></div><div dir="auto">oe</div><div dir="auto"> </div><div><br><div class="gmail_quote"><div dir="ltr">On Wed, 26 Sep 2018 at 20:41 Scherrer, Yves <<a href="mailto:yves.scherrer@helsinki.fi">yves.scherrer@helsinki.fi</a>> wrote:<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">Further validating your installation, I am currently training a model, and once I found that I need to use $CUDA_VISIBLE_DEVICES it also seems to be training on GPU :)<br>
<br>
I’ll see if I can easily modify my test to use data from the NLPL repository (the data is certainly not the problem, but there might be some preprocessing steps for which scripts are not (yet) available).<br>
<br>
Regarding virtualenv on CSC, it’s hit or miss:<br>
- python-env/intelpython3.6-2018.3, which Martin mentioned lately and which contains PyTorch, doesn’t have virtualenv<br>
- python-env/3.5.3 has virtualenv, as you correctly observed<br>
- python-env/3.4.0, which is the default version on taito-shell, doesn’t have virtualenv<br>
<br>
I’ll have to test if it’s easier to build on the intelpython or the “normal” gnu one…<br>
<br>
Yves<br>
<br>
> On 26 Sep 2018, at 15:57, Stephan Oepen <<a href="mailto:oe@ifi.uio.no" target="_blank">oe@ifi.uio.no</a>> wrote:<br>
> <br>
> many thanks for validating (to some degree at least :-) my OpenNMT-py<br>
> installation on Abel.  i have now added it to the software catalogue<br>
> and created minimal documentation on the NLPL wiki:<br>
> <br>
> <a href="http://wiki.nlpl.eu/index.php/Infrastructure/software/catalogue" rel="noreferrer" target="_blank">http://wiki.nlpl.eu/index.php/Infrastructure/software/catalogue</a><br>
> <a href="http://wiki.nlpl.eu/index.php/Translation/opennmt-py" rel="noreferrer" target="_blank">http://wiki.nlpl.eu/index.php/Translation/opennmt-py</a><br>
> <br>
> —could you suggest a minimal example workflow, demonstrating how to<br>
> train and decode with OpenNMT, ideally using files from our own<br>
> ‘/proj/nlpl/data/translation/’?  speaking of which, should i start<br>
> replicating that directory from Taito to Abel, i.e. remove what you<br>
> had installed manually on Abel and instead turn on automated<br>
> replication once a day?<br>
> <br>
> in principle, we should now produce a parallel installation of<br>
> OpenNMT-py on Taito, of course—which presupposes that we get something<br>
> parallel worked out for PyTorch.<br>
> <br>
> yves, why do you say that CSC does not include ‘virtualenv’ in their<br>
> python installation?  is there something principled that i am missing?<br>
> <br>
> [oe@taito-login3 ~]$ module add python-env/3.5.3<br>
> Loading application python-3.5.3 environment with needed modules<br>
>  Switching compiler gcc to gcc/5.4.0<br>
>  Switching MPI version intelmpi to intelmpi/5.1.3<br>
> <br>
> The following have been reloaded with a version change:<br>
>  1) gcc/4.8.2 => gcc/5.4.0  2) intelmpi/4.1.3 => intelmpi/5.1.3  3)<br>
> mkl/11.3.0 => mkl/11.3.2  4) python-env/3.4.0 => python-env/3.5.3  5)<br>
> python/3.4.0 => python/3.5.3<br>
> <br>
> [oe@taito-login3 ~]$ type -all python<br>
> python is /appl/opt/python/3.5.3-gnu540/bin/python<br>
> [oe@taito-login3 ~]$ type -all virtualenv<br>
> virtualenv is /appl/opt/python/3.5.3-gnu540/bin/virtualenv<br>
> <br>
> so, i am guessing we could presumably attempt an NLPL-maintained<br>
> installation of PyTorch into a 3.5 virtual environment, which would<br>
> likely require a custom glibc installation too (and the same kind of<br>
> dynamic linking ‘gymnastics’).<br>
> <br>
> i feel i still need to learn more about the CSC environment.  are the<br>
> modules available on taito-gpu the same as on the cpu nodes?  in other<br>
> words, do both types of nodes see the same file system?<br>
> <br>
> cheers, oe<br>
> <br>
> <br>
> On Wed, Sep 26, 2018 at 9:59 AM, Scherrer, Yves<br>
> <<a href="mailto:yves.scherrer@helsinki.fi" target="_blank">yves.scherrer@helsinki.fi</a>> wrote:<br>
>> Hi,<br>
>> <br>
>> <br>
>> <br>
>> I’ve had a quick look at Stephan’s OpenNMT-py on Abel. The onmt module seems<br>
>> to work, but one generally uses the scripts “preprocess.py”, “train.py” and<br>
>> “translate.py” (at the root directory of the Github repo), and these scripts<br>
>> seem to be missing from the module. Would it be possible to copy these three<br>
>> scripts (there is a fourth one, “server.py”, but this one might not be<br>
>> relevant for common usage) somewhere inside the virtual environment, so that<br>
>> they can be found and called easily?<br>
>> <br>
>> <br>
>> <br>
>> I have to say that I find these stacked virtual environments quite elegant.<br>
>> Too bad that CSC doesn’t even include the virtualenv command in their<br>
>> python-env modules…<br>
>> <br>
>> <br>
>> <br>
>> Best,<br>
>> <br>
>> Yves<br>
>> <br>
>> <br>
>> <br>
>> ________________________________<br>
>> From: Stephan Oepen <<a href="mailto:oe@ifi.uio.no" target="_blank">oe@ifi.uio.no</a>><br>
>> Sent: Thursday, September 20, 2018 12:31:58 AM<br>
>> To: Scherrer, Yves<br>
>> Cc: Martin Matthiesen; infrastructure<br>
>> <br>
>> Subject: Re: [NLPL Task Force (A)] OpenNMT installation for NLPL (on Abel)<br>
>> <br>
>> dear all,<br>
>> <br>
>> yes, chaining virtual environments appears to work as one would<br>
>> expect.  i might in fact have managed to install OpenNMT-py on Abel,<br>
>> using my new PyTorch 0.4.1 virtual environment, essentially:<br>
>> <br>
>> module load nlpl-pytorch<br>
>> /projects/nlpl/software/opennmt-py/<br>
>> virtualenv /projects/nlpl/software/opennmt-py/0.2.1<br>
>> <br>
>> at this point, i had to manually change the ‘python’, ‘python3’, and<br>
>> ‘python3.5’ files in the new ‘bin/’ directory, to avail themselves of<br>
>> the custom glibc; see<br>
>> ‘<a href="http://wiki.nlpl.eu/index.php/Infrastructure/software/glibc" rel="noreferrer" target="_blank">http://wiki.nlpl.eu/index.php/Infrastructure/software/glibc</a>’.<br>
>> <br>
>> cd /projects/nlpl/software/modulefiles<br>
>> mkdir nlpl-opennmt-py<br>
>> cp nlpl-pytorch/0.4.1 nlpl-opennmt-py/0.2.1<br>
>> vi nlpl-opennmt-py/0.2.1<br>
>> <br>
>> cd ~/src/nlpl<br>
>> module purge<br>
>> module load nlpl-opennmt-py<br>
>> wget <a href="https://github.com/OpenNMT/OpenNMT-py/archive/0.2.1.tar.gz" rel="noreferrer" target="_blank">https://github.com/OpenNMT/OpenNMT-py/archive/0.2.1.tar.gz</a><br>
>> tar zpSxvf 0.2.1.tar.gz<br>
>> cd OpenNMT-py-0.2.1<br>
>> python setup.py install<br>
>> <br>
>> so far, my testing is limited to<br>
>> <br>
>> python -c "import torch; import onmt; print(onmt.__version__);"<br>
>> <br>
>> yves, would you maybe have a chance next week to see whether this<br>
>> installation appears healthy to you?<br>
>> <br>
>> cheers, oe<br>
>> <br>
>> <br>
>> On Wed, Sep 19, 2018 at 1:12 PM, Scherrer, Yves<br>
>> <<a href="mailto:yves.scherrer@helsinki.fi" target="_blank">yves.scherrer@helsinki.fi</a>> wrote:<br>
>>> Hi Stephan, Martin,<br>
>>> <br>
>>> <br>
>>> <br>
>>> I’m catching up on this thread… A few questions from my side:<br>
>>> <br>
>>> <br>
>>> <br>
>>> Regarding Martin’s latest suggestion: that seems indeed to work fine,<br>
>>> although with the exact same commands I get a different version of<br>
>>> PyTorch:<br>
>>> <br>
>>>>>> import torch<br>
>>> <br>
>>>>>> torch.__file__<br>
>>> <br>
>>> <br>
>>> '/appl/opt/python/intelpython36-2018.3/intelpython3/lib/python3.6/site-packages/torch/__init__.py'<br>
>>> <br>
>>>>>> torch.__version__<br>
>>> <br>
>>> '0.4.0a0+3749c58'<br>
>>> <br>
>>> <br>
>>> <br>
>>> In any case, if PyTorch is already installed in some Python distribution,<br>
>>> that would make setting up a specific OpenNMT module rather easy. If not,<br>
>>> virtual environments should work as well (the tricky thing is mainly to<br>
>>> figure out which python versions play well with CUDA…)<br>
>>> <br>
>>> <br>
>>> <br>
>>> Regarding Stephan’s suggestion of virtual environments: do you know if<br>
>>> virtual environments can be “stacked”, i.e. whether I could create an<br>
>>> OpenNMT virtual environment that lies on top of your PyTorch environment?<br>
>>> Or<br>
>>> would I have to re-install another instance of PyTorch in the OpenNMT<br>
>>> virtualenv?<br>
>>> <br>
>>> <br>
>>> <br>
>>> I’ll be travelling for the rest of the week, but will try to have a closer<br>
>>> look at these options next week.<br>
>>> <br>
>>> <br>
>>> <br>
>>> Best,<br>
>>> <br>
>>> Yves<br>
>>> <br>
>>> <br>
>>> <br>
>>> ________________________________<br>
>>> From: Martin Matthiesen <<a href="mailto:martin.matthiesen@csc.fi" target="_blank">martin.matthiesen@csc.fi</a>><br>
>>> Sent: Wednesday, September 19, 2018 1:29:35 PM<br>
>>> To: Stephan Oepen<br>
>>> Cc: infrastructure; Scherrer, Yves<br>
>>> <br>
>>> Subject: Re: [NLPL Task Force (A)] OpenNMT installation for NLPL (on Abel)<br>
>>> <br>
>>> Hello Stephan,<br>
>>> <br>
>>> ----- Original Message -----<br>
>>>> From: "Stephan Oepen" <<a href="mailto:oe@ifi.uio.no" target="_blank">oe@ifi.uio.no</a>><br>
>>>> To: "Martin Matthiesen" <<a href="mailto:martin.matthiesen@csc.fi" target="_blank">martin.matthiesen@csc.fi</a>><br>
>>>> Cc: "infrastructure" <<a href="mailto:infrastructure@nlpl.eu" target="_blank">infrastructure@nlpl.eu</a>>, "Yves Scherrer"<br>
>>>> <<a href="mailto:yves.scherrer@helsinki.fi" target="_blank">yves.scherrer@helsinki.fi</a>><br>
>>>> Sent: Tuesday, 18 September, 2018 14:13:53<br>
>>>> Subject: Re: [NLPL Task Force (A)] OpenNMT installation for NLPL (on<br>
>>>> Abel)<br>
>>> <br>
>>>> sorry, i was the one who had introduced the confusion about mailing<br>
>>>> lists.  there is no ‘<a href="mailto:translation@nlpl.eu" target="_blank">translation@nlpl.eu</a>’ currently, and upon<br>
>>>> consultation with joerg there appears not to be a great need for it<br>
>>>> either (once i get around to documenting the task force structure on<br>
>>>> the project wiki, i might want to create that list nevertheless).<br>
>>>> <br>
>>>> i am adding yves to thread now, so he at least has a chance of knowing<br>
>>>> what we are talking about :-).<br>
>>> <br>
>>> Ok!<br>
>>>> <br>
>>>> martin, i doubt that an installation of OpenNMT that requires everyone<br>
>>>> to ‘pip install --user’ into their home directory will be a good<br>
>>>> solution.  that way, the getting started instructions will be more<br>
>>>> complex, and we lack control over which version of PyTorch gets<br>
>>>> installed at the time the user actually runs the command.  my<br>
>>>> immediate reaction at least is that NLPL-supported software should be<br>
>>>> ‘self-contained’, in the sense of not depending on software components<br>
>>>> maintained by the user.<br>
>>> <br>
>>> Ok, I understand.<br>
>>>> <br>
>>>> what i am doing increasingly on abel is deriving virtual environments;<br>
>>>> e.g. my PyTorch installation (for NLPL) straightforwardly builds on<br>
>>>> the USIT-maintained python 3.5.  i suppose we should be able to do the<br>
>>>> same thing on taito, i.e. create ‘nlpl-pytorch’ as a virtual<br>
>>>> environment that includes the precompiled PyTorch wheel from your CSC<br>
>>>> colleagues?<br>
>>> <br>
>>> Yes, I guess that is the only sensible solution to not lose track<br>
>>> completely. In the meantime, how would this work for you all:<br>
>>> <br>
>>> [GPU-Env ~]$ module load python-env/intelpython3.6-2018.3<br>
>>> Loading application Intel Distribution for Python 2018 update 3<br>
>>> [GPU-Env ~]$ module list<br>
>>> <br>
>>> Currently Loaded Modules:<br>
>>>  1) gcc/4.9.3   2) cuda/7.5   3) StdEnv   4) git/2.17.1   5)<br>
>>> python-env/intelpython3.6-2018.3<br>
>>> <br>
>>> [GPU-Env ~]$ python3<br>
>>> Python 3.6.3 |Intel Corporation| (default, May  4 2018, 04:22:28)<br>
>>> [GCC 4.8.2 20140120 (Red Hat 4.8.2-15)] on linux<br>
>>> Type "help", "copyright", "credits" or "license" for more information.<br>
>>> Intel(R) Distribution for Python is brought to you by Intel Corporation.<br>
>>> Please check out: <a href="https://software.intel.com/en-us/python-distribution" rel="noreferrer" target="_blank">https://software.intel.com/en-us/python-distribution</a><br>
>>>>>> import torch<br>
>>>>>> torch.__version__<br>
>>> '0.4.1'<br>
>>> <br>
>>> Kudos to my colleagues Markus and Jarmo here.<br>
>>> <br>
>>> Martin<br>
>>> <br>
>>>> <br>
>>>> oe<br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> <br>
>>>> On Mon, Sep 17, 2018 at 5:06 PM, Martin Matthiesen<br>
>>>> <<a href="mailto:martin.matthiesen@csc.fi" target="_blank">martin.matthiesen@csc.fi</a>> wrote:<br>
>>>>> Hello,<br>
>>>>> <br>
>>>>> We already have a way to use pytorch 0.4.1 on Taito-GPU:<br>
>>>>> <br>
>>>>> module load python-env/intelpython3.6-2018.3<br>
>>>>> [GPU-Env ~]$ pip install -v --user<br>
>>>>> /appl/opt/pytorch/0.4.1/cu90/torch-0.4.1-cp36-cp36m-linux_x86_64.whl<br>
>>>>> <br>
>>>>> One of my colleagues has compiled the module. Note that the module needs<br>
>>>>> python<br>
>>>>> 3.6 to work, the highest available on Taito-GPU.<br>
>>>>> <br>
>>>>> Before I investigate CPU-support or support for other compilers, would<br>
>>>>> this<br>
>>>>> pip-approach work for you?<br>
>>>>> <br>
>>>>> Regards,<br>
>>>>> Martin<br>
>>>>> <br>
>>>>> ----- Original Message -----<br>
>>>>>> From: "Stephan Oepen" <<a href="mailto:oe@ifi.uio.no" target="_blank">oe@ifi.uio.no</a>><br>
>>>>>> To: <a href="mailto:translation@nlpl.eu" target="_blank">translation@nlpl.eu</a><br>
>>>>>> Cc: "infrastructure" <<a href="mailto:infrastructure@nlpl.eu" target="_blank">infrastructure@nlpl.eu</a>><br>
>>>>>> Sent: Saturday, 15 September, 2018 18:59:29<br>
>>>>>> Subject: [NLPL Task Force (A)] OpenNMT installation for NLPL (on Abel)<br>
>>>>> <br>
>>>>>> colleagues,<br>
>>>>>> <br>
>>>>>> joerg, martin, and i talked about getting the new release version of<br>
>>>>>> OpenNMT installed for NLPL.  it appears it requires the most recent<br>
>>>>>> version of PyTorch, which currently is not available on Taito.  martin<br>
>>>>>> will ask for it to be installed by CSC.<br>
>>>>>> <br>
>>>>>> in parallel, i believe i managed to put an NLPL-owned installation of<br>
>>>>>> the right PyTorch version onto Abel, please see:<br>
>>>>>> <br>
>>>>>> <a href="http://wiki.nlpl.eu/index.php/Infrastructure/software/pytorch" rel="noreferrer" target="_blank">http://wiki.nlpl.eu/index.php/Infrastructure/software/pytorch</a><br>
>>>>>> <br>
>>>>>> before announcing this more widely, i would be grateful for some<br>
>>>>>> testing, in particular for both cpu and gpu usage.  would anyone we<br>
>>>>>> readily set up to give this a shot on Abel?<br>
>>>>>> <br>
>>>>>> assuming our PyTorch is healthy, would someone from the helsinki team<br>
>>>>>> have the time to try and install OpenNMT onto Abel, e.g. as<br>
>>>>>> <br>
>>>>>> /projects/nlpl/software/opennmt-py/0.2.1<br>
>>>>>> <br>
>>>>>> there have been two relatively recent requests for OpenNMT in oslo<br>
>>>>>> (one of them for seq2seq dependency parsing :-), so i believe it would<br>
>>>>>> now be warranted to provide it on both systems.<br>
>>>>>> <br>
>>>>>> best wishes, oe<br>
<br>
</blockquote></div></div>