Editing CommunityData:Advanced Hyak

From CommunityData

Warning: You are not logged in. Your IP address will be publicly visible if you make any edits. If you log in or create an account, your edits will be attributed to your username, along with other benefits.

The edit can be undone. Please check the comparison below to verify that this is what you want to do, and then publish the changes below to finish undoing the edit.

Latest revision Your text
Line 43: Line 43:

8. In your local browser, localhost:'''$PORT'''
8. In your local browser, localhost:'''$PORT'''
== Working on Hyak from a local emacs client ==
Some of us (like Nate) rely heavily on the Emacs text editor. [http://ess.r-project.org/| Emacs speaks statistics] is a powerful emacs mode for
programming in R and doing data analysis.  There are a few options for using Emacs on hyak. If you open emacs on an interactive node with X-forwarding enabled then you will get a nice graphical emacs window and plots you make will be displayed on your screen. But if you disconnect from Hyak you will lose your R session.  This makes running emacs the normal way on an interactive node unsuitable for fitting models.  Another  disadvantage is that your will be working with an x-forwarded emacs and so will not look as nice or be as responsive as your local emacs.
Alternatively, you might run emacs in console mode in tmux. Then Hyak will keep running your R process even when you log out. The downsides here is that you can't view plots on your display (you could save them as a pdf, and then open the pdf on your local machine) and that some emacs key chords will collide with tmux key bindings and configuring tmux to fix this is a pain.
A better way is to run emacs server on a compute node on hyak and then open a local emacs client that connects to that server. 
=== Instructions For ESS ===
''Unfortunately, this requires running emacsserver on a login node and viewing plots does not work. These problems should go away if hyak let us forward X from a compute node and tunnel it through a login node. This doesn't seem to work as ssh -X n0649 doesn't seem to forward X.''
1. Open tmux on a ''login node'' and start emacsserver.
  $ tmux
  $ emacs --daemon
2. Still in tmux, start an interactive session
  $ any_machine
3. In a new terminal (not tmux) ssh into the login node and start an emacs client (-c means in a new window).
  $ emacsclient -c
4. In this emacsclient open a shell, ssh to the compute node, and start an R process.
  M-x shell
  $ ssh n0649
5. With focus on the R process buffer in emacs, connect ESS to the R process.
  M-x ess-remote
Please note that all contributions to CommunityData are considered to be released under the Attribution-Share Alike 3.0 Unported (see CommunityData:Copyrights for details). If you do not want your writing to be edited mercilessly and redistributed at will, then do not submit it here.
You are also promising us that you wrote this yourself, or copied it from a public domain or similar free resource. Do not submit copyrighted work without permission!

To protect the wiki against automated edit spam, we kindly ask you to solve the following CAPTCHA:

Cancel Editing help (opens in new window)