From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexander Vorobiev Subject: Re: org mode R remote code evaluation Date: Mon, 23 Sep 2013 11:45:38 -0500 Message-ID: References: <87d2ownbtv.fsf@hornfels.zedat.fu-berlin.de> Mime-Version: 1.0 Content-Type: multipart/alternative; boundary=047d7b1630d137b69904e70fc144 Return-path: Received: from eggs.gnu.org ([2001:4830:134:3::10]:48929) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO9Gt-0005ks-Ul for emacs-orgmode@gnu.org; Mon, 23 Sep 2013 12:46:09 -0400 Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VO9Gr-0005a6-4Q for emacs-orgmode@gnu.org; Mon, 23 Sep 2013 12:46:03 -0400 Received: from mail-pb0-x22c.google.com ([2607:f8b0:400e:c01::22c]:36086) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VO9Gq-0005Zs-Nu for emacs-orgmode@gnu.org; Mon, 23 Sep 2013 12:46:01 -0400 Received: by mail-pb0-f44.google.com with SMTP id xa7so3433688pbc.31 for ; Mon, 23 Sep 2013 09:45:59 -0700 (PDT) In-Reply-To: List-Id: "General discussions about Org-mode." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org Sender: emacs-orgmode-bounces+geo-emacs-orgmode=m.gmane.org@gnu.org To: Johannes Rainer Cc: Loris Bennett , emacs-orgmode --047d7b1630d137b69904e70fc144 Content-Type: text/plain; charset=ISO-8859-1 The ":results output" doesn't help in my setup (I'm on Windows, the remote system is linux, access is via putty/plink) #+BEGIN_SRC sh :results output :dir /grid: ls #+END_SRC executing Sh code block... Tramp: Encoding region using function `base64-encode-region'...done Tramp: Decoding region into remote file /plinkx:grid:/Users/avorobi/AppData/Local/Temp/ob-input-6116fuY...done byte-code: Couldn't write region to `/plinkx:grid:/Users/avorobi/AppData/Local/Temp/ob-input-6116fuY', decode using `tramp_perl_decode_with_module >%s' failed The /Users directory obviously does not exist on linux. Tramp itself works in my configuration, I can open files, etc. I have the latest org-mode from elpa. Thanks, Alex On Thu, Aug 29, 2013 at 5:42 AM, Johannes Rainer < johannes.rainer@i-med.ac.at> wrote: > thanks! so the ":results output" does the trick. > > > > > On Thu, Aug 29, 2013 at 10:25 AM, Loris Bennett < > loris.bennett@fu-berlin.de> wrote: > >> Johannes Rainer writes: >> >> > dear all, >> > >> > I have some computation intense R-code that I want to run remotely on >> my server, >> > and, according to the org manual that should be possible with the ":dir" >> > parameter. so I went on and tried the following (user/server masked): >> > >> > #+BEGIN_SRC R :dir /xx@xxx: >> > system("hostname") >> > #+END_SRC >> > >> > when I execute it I get the error: >> > >> > Tramp: Encoding region using function `base64-encode-region'...done >> > Tramp: Decoding region into remote file >> > /ssh:xx@xxx >> :/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/R-46345BQs...done >> > byte-code: Couldn't write region to >> > `/ssh:xx@xxx >> :/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/R-46345BQs', >> > decode using `base64 -d -i >%s' failed >> > >> > apparently, this temp folder does not exist on the linux server, it is >> actually >> > the temp folder from my local machine. >> > >> > I get the same error when I try to execute remote shell code, so it's >> not R >> > related. >> > >> > I also tried to start a ssh session using "M-x ssh" and used the source >> block >> > >> > #+BEGIN_SRC R :exports both :session *ssh xxx* >> > system("hostname") >> > #+END_SRC >> > >> > on the server it executes the command but it can not write the results: >> > >> >> xxx >> >> Warning message: >> > In file.rename(tfile, transfer.file) : >> > cannot rename file '/tmp/RtmpsirjGl/file51c8f6ce4ec' to >> > >> '/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/babel-46345zSH/R-46345a4N', >> > reason 'No such file or directory' >> >> >> > >> > I am using emacs 24.3 and Org-mode version 8.0.7 >> (release_8.0.7-384-g6fdc23) >> > >> > I would be helpful for any suggestions how I could solve this problem. >> > >> > thanks in advance >> >> The following works for me: >> >> #+BEGIN_SRC R :results output :dir /xxx@xxxxx: >> system("hostname") >> #+END_SRC >> >> with Emacs 24.2.1 and 8.0.7 (8.0.7-6-g13cb28-elpaplus) >> >> Cheers, >> >> Loris >> >> -- >> This signature is currently under construction. >> >> >> > > > -- > Johannes Rainer, PhD > Applied Bioinformatics Group, > Division Molecular Pathophysiology, > Biocenter, Medical University Innsbruck, > Innrain 80/82 II, 6020 Innsbruck, Austria > and > Tyrolean Cancer Research Institute > Innrain 66, 6020 Innsbruck, Austria > > Tel.: +43 (0)512 9003 70961 > Email: johannes.rainer@i-med.ac.at > johannes.rainer@tcri.at > URL: http://bioinfo.i-med.ac.at > > > --047d7b1630d137b69904e70fc144 Content-Type: text/html; charset=ISO-8859-1 Content-Transfer-Encoding: quoted-printable
The ":results output" doesn't help in my set= up (I'm on Windows, the remote system is linux, access is via putty/pli= nk)

#+BEGIN_SRC sh :results output :dir /grid:
=A0 ls
#+END_SRC

executi= ng Sh code block...
Tramp: Encoding region using function `base64= -encode-region'...done
Tramp: Decoding region into remote fil= e /plinkx:grid:/Users/avorobi/AppData/Local/Temp/ob-input-6116fuY...done
byte-code: Couldn't write region to `/plinkx:grid:/Users/avorobi/A= ppData/Local/Temp/ob-input-6116fuY', decode using `tramp_perl_decode_wi= th_module >%s' failed

The /Users dire= ctory obviously does not exist on linux.

Tramp itself works in my configuration, I can open file= s, etc. I have the latest org-mode from elpa.

Than= ks,
Alex


On Thu, Aug 29, 2013 at 5:42 AM, Johannes Rainer <johannes.raine= r@i-med.ac.at> wrote:
thanks! so the ":results output" does = the trick.




On Thu, Aug 29, 2013 at 1= 0:25 AM, Loris Bennett <loris.bennett@fu-berlin.de>= wrote:
Johannes Rainer <johannes.rainer@gmail.com<= /a>> writes:

> dear all,
>
> I have some computation intense R-code that I want to run remotely on = my server,
> and, according to the org manual that should be possible with the &quo= t;:dir"
> parameter. so I went on and tried the following (user/server masked):<= br> >
> #+BEGIN_SRC R :dir /xx@xxx:
> =A0 system("hostname")
> #+END_SRC
>
> when I execute it I get the error:
>
> Tramp: Encoding region using function `base64-encode-region'...don= e
> Tramp: Decoding region into remote file
> /ssh:xx@xxx:/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/R-46345BQ= s...done
> byte-code: Couldn't write region to
> `/ssh:xx@xxx:/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/R-46345B= Qs',
> decode using `base64 -d -i >%s' failed
>
> apparently, this temp folder does not exist on the linux server, it is= actually
> the temp folder from my local machine.
>
> I get the same error when I try to execute remote shell code, so it= 9;s not R
> related.
>
> I also tried to start a ssh session using "M-x ssh" and used= the source block
>
> #+BEGIN_SRC R :exports both :session *ssh xxx*
> system("hostname")
> #+END_SRC
>
> on the server it executes the command but it can not write the results= :
>
>> xxx
>> Warning message:
> In file.rename(tfile, transfer.file) :
> =A0 cannot rename file '/tmp/RtmpsirjGl/file51c8f6ce4ec' to > '/var/folders/ny/6kbb36310wz2kww8y8ctry600000gn/T/babel-46345zSH/R= -46345a4N',
> reason 'No such file or directory'
>>
>
> I am using emacs 24.3 and Org-mode version 8.0.7 (release_8.0.7-384-g6= fdc23)
>
> I would be helpful for any suggestions how I could solve this problem.=
>
> thanks in advance

The following works for me:

#+BEGIN_SRC R :results output :dir /xxx@xxxxx:
system("hostname")
#+END_SRC

with Emacs 24.2.1 and 8.0.7 (8.0.7-6-g13cb28-elpaplus)

Cheers,

Loris

--
This signature is currently under construction.





-- <= br>Johannes Rainer, PhD
Applied Bioinformatics Group,
Division Molecu= lar Pathophysiology,
Biocenter, Medical University Innsbruck,
Innrain= 80/82 II, 6020 Innsbruck, Austria
and
Tyrolean Cancer Research Institute
Innrain 66, 6020 Innsbruck, Au= stria

Tel.:=A0 =A0=A0
+43 (0)512 9003 70961Email:=A0 johannes.rainer@i-med.ac.at
=A0 =A0 =A0 =A0 =A0 =A0 johannes.rainer@tcri.at
URL:=A0=A0 http://bioinfo.i-med.ac.at

<= br>

--047d7b1630d137b69904e70fc144--