<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=Windows-1252">
<meta name="Generator" content="Microsoft Exchange Server">
<!-- converted from text --><style><!-- .EmailQuote { margin-left: 1pt; padding-left: 4pt; border-left: #800000 2px solid; } --></style>
</head>
<body>
<meta content="text/html; charset=UTF-8">
<style type="text/css" style="">
<!--
p
        {margin-top:0;
        margin-bottom:0}
-->
</style>
<div dir="ltr">
<div id="x_divtagdefaultwrapper" dir="ltr" style="font-size:12pt; color:#000000; font-family:Calibri,Helvetica,sans-serif">
<p>Hi,</p>
<p><br>
</p>
<p>Thanks so much for your great help! Now I have fixed it!</p>
<p><br>
</p>
<p>I added "<span style="color:rgb(33,33,33); font-family:wf_segoe-ui_normal,"Segoe UI","Segoe WP",Tahoma,Arial,sans-serif,serif,EmojiFont; font-size:13.3333px">source /cluster/bin/jobsetup</span>"
<span style="font-family:Calibri,Helvetica,sans-serif,EmojiFont,"Apple Color Emoji","Segoe UI Emoji",NotoColorEmoji,"Segoe UI Symbol","Android Emoji",EmojiSymbols; font-size:16px">
and chkfile command </span>into the script. The most important change is: I replaced "-gpu_rank 1" with "-gpuid 0". This is more related to using OpenNMT. </p>
<p><br>
</p>
<p>Have a nice weekend!</p>
<p><br>
</p>
<p>Best,</p>
<p>Gongbo</p>
</div>
<hr tabindex="-1" style="display:inline-block; width:98%">
<div id="x_divRplyFwdMsg" dir="ltr"><font face="Calibri, sans-serif" color="#000000" style="font-size:11pt"><b>From:</b> rt-user@ulrik.uio.no <rt-user@ulrik.uio.no> on behalf of Thomas Röblitz via RT <hpc-drift@usit.uio.no><br>
<b>Sent:</b> Saturday, September 28, 2019 8:32:16 AM<br>
<b>To:</b> Gongbo Tang<br>
<b>Cc:</b> infrastructure@nlpl.eu; oe@ifi.uio.no<br>
<b>Subject:</b> Re: [rt.uio.no #3588329] Re: [NLPL Task Force (A)] Jobs' output</font>
<div> </div>
</div>
</div>
<font size="2"><span style="font-size:10pt;">
<div class="PlainText">Hei guys,<br>
<br>
a few quick comments.<br>
<br>
First, the job script lacks the ‘source /cluster/bin/jobsetup’, which is the reason for not having access to commands such as chkfile and cleanup. Also not sourcing it means you don’t get a header and footer in your output file. These tell you a number of important
 stats on your job (start, end, resource usage). If you scroll up a bit on the URL you had in your email, you see an example job script which shows this ‘source’.<br>
<br>
Second, contrary to what Stephan writes working on $HOME is discouraged. Even if YOUR job is not I/O intensive.<br>
<br>
I hope that users under NLPL are teached otherwise or I would be a bit worried ;)<br>
<br>
BTW the simple job example on the URL above also shows a standard pattern for setting up the job input data on $SCRATCH and then copying results back to the submission dir.<br>
<br>
Also if you run ‘sacct’ it shows that your job completed successfully.<br>
<br>
# sacct -j 28250251 -o jobid,jobname,partition,user,account,alloccpus,state,exitcode,timelimit,elapsed<br>
       JobID    JobName  Partition      User    Account  AllocCPUS      State ExitCode  Timelimit    Elapsed
<br>
------------ ---------- ---------- --------- ---------- ---------- ---------- -------- ---------- ----------
<br>
28250251           test      accel     gtang    nn9447k          4  COMPLETED      0:0   01:00:00   00:13:42
<br>
28250251.ba+      batch                         nn9447k          4  COMPLETED      0:0              00:13:42
<br>
<br>
Finally, at least now you seem to have sufficient space under your $HOME directory so copying back result from $SCRATCH should work unless you have more output data than ~ 500 GiB.<br>
<br>
The exact reason you’re not seeing the GPU not being used, I don’t know. However, it might be good to add a command like ‘nvidia-smi’ to your job script to check if you can see a GPU. Also, you might add ‘export ‘ in front of setting CUDA_VISIBLE_DEVICES or
 write this in front of the command you run (CUDA_VISIBLE_DEVICES=0 python ...). Also you might check if ‘-gpu_rank 1’ refers to the same GPU chosen with the environment variable (CUDA...).<br>
<br>
Have a nice weekend<br>
<br>
Thomas<br>
<br>
--<br>
Research Infrastructure Services, USIT<br>
University of Oslo, Norway<br>
<br>
> On 27. Sep 2019, at 23:39, gongbo.tang@lingfil.uu.se via RT <hpc-drift@usit.uio.no> wrote:<br>
> <br>
> <br>
> 2019-09-27 23:39:16: Request 3588329 was acted upon.<br>
> Transaction: Ticket created by gongbo.tang@lingfil.uu.se<br>
>      Queue: hpc-drift<br>
>    Subject: Re: [NLPL Task Force (A)] Jobs' output<br>
>      Owner: Nobody<br>
> Requestors: gongbo.tang@lingfil.uu.se<br>
>     Status: new<br>
> Ticket <URL: <a href="https://rt.uio.no/Ticket/Display.html?id=3588329">https://rt.uio.no/Ticket/Display.html?id=3588329</a> ><br>
> <br>
> <br>
> Hi Stephan,<br>
> <br>
> <br>
> Thanks for your quick help.<br>
> <br>
> <br>
> Yes, I mean the model files generated by OpenNMT. Actually, the job has finished and the slurm log file has all the log information.<br>
> <br>
> <br>
> I just tried to run the job on the log-node (cpu), the OpenNMT could generate models successfully. I think the problem happens when using GPUs. The log file should have a log like this:<br>
> <br>
> <br>
> "[2019-09-27 21:24:57,888 INFO] Saving checkpoint /usit/abel/u1/gtang/model_word_step_200.pt"<br>
> <br>
> <br>
> However, there is no such log in the slurm file. I guess that OpenNMT does not save models at all. (have no access?)<br>
> <br>
> <br>
> Best,<br>
> <br>
> Gongbo<br>
> <br>
> ________________________________<br>
> From: Stephan Oepen <oe@ifi.uio.no><br>
> Sent: Friday, September 27, 2019 10:21:29 PM<br>
> To: Gongbo Tang<br>
> Cc: hpc@usit.uio.no; infrastructure<br>
> Subject: Re: [NLPL Task Force (A)] Jobs' output<br>
> <br>
> hi gonbo,<br>
> <br>
> i cannot say that i have used OpenNMT much myself, but more generally:<br>
> unless i run something that is very i/o-intensive, i do not take the<br>
> trouble of copying input and output data back and forth between the<br>
> $SCRATCH filesystem, i.e. i doubt you need to worry about chkfile and<br>
> friends.  i would just work out of your home directory, i.e. read and<br>
> write data there.<br>
> <br>
> the SLURM log file you sent does not look as if the job actually has<br>
> completed?  i assume by 'output files' you mean files generated during<br>
> the OpenNMT run, i.e. the actual model file?  i might guess that the<br>
> model is only serialized to disk upon completion of the training, so<br>
> could it be the case that your job actually had not gotten to that<br>
> point?<br>
> <br>
> a general piece of advice: to debug it might help to reduce the<br>
> problem to a tiny training file, possibly even something that can<br>
> complete in a matter of a few minutes on a cpu node.  that should<br>
> allow you to find out where the output file(s) end up, and once you<br>
> have a working set-up, you can submit larger jobs (to the gpu nodes).<br>
> <br>
> best wishes, oe<br>
> <br>
>> On Fri, Sep 27, 2019 at 10:09 PM Gongbo Tang <gongbo.tang@lingfil.uu.se> wrote:<br>
>> <br>
>> Hi,<br>
>> <br>
>> <br>
>> I met a problem. I cannot find any output files/models after running a job. Or the job did not generate any models during running.<br>
>> <br>
>> <br>
>> I am using Open-NMT 0.2.1, maintained by NLPL. I did not find any "Saving checkpoint ..." information from the log file which should be found. I attached the slurm file and the job script.<br>
>> <br>
>> <br>
>> I tried to use "chkfile" or "cleanup" command to save the outputs, following the guide here (<a href="https://www.uio.no/english/services/it/research/hpc/abel/help/user-guide/job-scripts.html#Work_Directory">https://www.uio.no/english/services/it/research/hpc/abel/help/user-guide/job-scripts.html#Work_Directory</a>),
 but I was told that "chkfile" and "cleanup" are not found.<br>
>> <br>
>> <br>
>> I also tried to set the output directory as the home directory(~, /usit/abel/u1/gtang). I still got nothing.<br>
>> <br>
>> <br>
>> Could you please tell me how can I get the job's outputs? Thanks a lot!<br>
>> <br>
>> <br>
>> Best,<br>
>> <br>
>> Gongbo<br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> <br>
>> När du har kontakt med oss på Uppsala universitet med e-post så innebär det att vi behandlar dina personuppgifter. För att läsa mer om hur vi gör det kan du läsa här:
<a href="http://www.uu.se/om-uu/dataskydd-personuppgifter/">http://www.uu.se/om-uu/dataskydd-personuppgifter/</a><br>
>> <br>
>> E-mailing Uppsala University means that we will process your personal data. For more information on how this is performed, please read here:
<a href="http://www.uu.se/en/about-uu/data-protection-policy">http://www.uu.se/en/about-uu/data-protection-policy</a><br>
<br>
</div>
</span></font>
</body>
</html>