FUNC:Accessing the Cluster

From Center for Cognitive Neuroscience
Jump to navigation Jump to search

Logging In

If you have a mac, you can log in remotely using X11 and the command: ssh -Y username@server.psych.ucla.edu

Server names include: funcserv1, willis, dentate, striatum, dlpfc, gyrus, alf.

Once you log in it is worthwhile to run "checkloadings" to see how much CPU is free on the one you chose - if there is only 2% free on funcserv1, switch to another server that has more free.

If you are off-campus or outside of the lifescience network, you can use the lifescience VPN to log into FUNC remotely. To get access to the lifescience VPN you must email the helpdesk at: helpdesk@lifesci.ucla.edu. Once you are logged into the VPN you can use X11 to log in normally.

X11 is usually found under applications>utilities.


Accessing BMC

If you need to view files on the BMC servers, you can log in under Matt's account to view them at: ssh lieber@dns0.bmap.ucla.edu

To view all scans stored at dns0 use this path: /volumes/BMC1/dicom/Liebermangroup


Mount Func

To mount func volumes on your desktop:

1. Go to: http://code.google.com/p/macfuse/

2. Download MacFUSE-Core-0.4.0.dmg and sshfs-0.3.0.dmg

3. Say yes when it asks if you want to save a copy of sshfs-0.3.0.dmg in your applications folder

4. Click on sshfs in your applications

5. A dialog box appears, and type the following:

Server: funcserv1.psych.ucla.edu

Username: (your usual func user name)

Remote Directory: /space

password: (your usual func password)

6. If you are using OS 10.5 or later, you must enable a preference setting to view the volume on your desktop. Go to Finder, then Preferences --> General and check "Connected Servers"

Using NX to log in remotely

NX is a lot like using the VNC, but it is faster and displays your virtual session in a much more user-friendly way than the VNC. Also, you can copy and paste information from your own laptop into your virtual desktop, which can be really handy. Like the VNC, if you want to use it from home, you will need run the lifesciences VPN so that you can log in.

To use NX, the first thing is to get the client. You can download it from: http://www.nomachine.com/download.php

Once you have the client installed, login to funcserv1 and run "killvnc" (to make sure you don't have an open session). Then start the NX client.

The client should present a window with fields for Login, Password, and Session name. The Login and Password are the same as your username and password for ssh. You can use whatever name you like for the Session.

Then you need to click the Configure button. This should bring up a window for "General" options. For Host, put in "funcserv1.psych.ucla.edu". Under Desktop, select "Unix" and "KDE". Under Display, select the window size you want to use.

Then click the Key button, that will open a window for a "DSA Key". On funcserv1, enter "cat /var/lib/nxserver/client.id_dsa.key", that will print its DSA key. Copy and paste the key from funcserv1 into the NX window (replacing the default key).

Click Save for the DSA Key, then Save and Ok for the Configure window. Then click Login in the NX client window.

It should print some progress messages, then open a window with your funcserv1 desktop.

You close the client, by closing the window. It will present options for Suspend, which leaves your desktop running on funcserv1, and Terminate, which closes it.


Using the VNC

This information is largely borrowed from the Poldrack lab's excellent wiki section on the VNC. The VNC is extremely useful for 2 reasons: 1) it runs much faster than using X11 to login to func (even from home), and 2) it will continue to run jobs even if you are not logged in at the moment (ie you can set some analyses to run overnight, unplug your laptop, and return the next day to view the results).


What is VNC, and how can I use it?

VNC stands for "virtual network computer", and it provides a way for you to have graphics sessions that remain active even after you have logged out of a workstation. The reason that we encourage use of VNC is that is allows many more users to have ongoing jobs without tying up physical terminals. It is also much faster than using X-Windows over the network. You can find more information about VNC here. I would encourage all users to use VNC for analysis jobs instead of running them on a workstation terminal. However, because VNC does not take advantage of hardware OpenGL acceleration, some graphic programs may be rather slow or may not work at all on VNC, in which case you will need to use a workstation.

VNC has two parts. The VNC server is the program that runs on the analysis machine and that keeps your window session going regardless of whether you are actually logged in at the moment. You have to start the server on the machine that you want to use (e.g., funcserv1), as outlined below. The VNC client is a program that runs on whatever machine you are using to view the VNC window. VNC clients are available for linux, Mac OS 9/X, and Windoze. I like Chicken of the VNC, which you can download here: [1]

Every user has a unique VNC ID number that determines which VNC server you will log into; you don't need to know this number to start the server, but you will need it to use the client to view the window.

To start the server, log into the machine (or use X11 to log in) where you want to start it and type: startvnc

This will start a vnc server and will tell you which number to use - this number will always be the same, as it is based on your unix UID. The output should look something like this:

poldrack::willis:=>startvnc

Starting VNC Server :9

New 'X' desktop is willis:9

Starting applications specified in /space/raid/home/poldrack/.vnc/xstartup Log file is /space/raid/home/poldrack/.vnc/willis:9.log

In this case, your server would be started as #9. The first time you use VNC you will be asked for a VNC password - DO NOT use your login password, but use something else instead. Now, start your VNC client to log into the machine using server #9, and giving the password that you created for VNC (again, not your login password). Under 'connection' select 'new connection' which will ask for the host, display, and password information. For this example, because you are logged into willis and your server is #9, you would enter this:

Host: willis.psych.ucla.edu

Display: 9

Password: xxxxxxx

If you need to kill the server for some reason, run the script: killvnc

which will kill the appropriate server.

To find out which number your server is running on, type: whichvnc

The linux workstations in the FUNC have clients installed on them already; just type "vncviewer :x" at the command window, replacing "x" with your server number (don't forget the colon before the number).

If you log in remotely from home, you still need to connect using your VPN in order to login to FUNC using X11, then do everything else as specified above.

Compressing Files

Most of us have not made a habit of compressing our preprocessing files once we are done with them, and doing this would be a big help to saving space on FUNC.

I've included below Ajay's excellent instructions from the old SPM manual on how to do this:

File Compression. Image files are generally saved in a way that wastes space. Compression programs allow us to compress the data so that they take up the minimal amount of space on the disk. There are several programs that can do this, but gzip is a good all-purpose compression tool. In order to compress AR-01-BS-r1.t001.img , you would use the following command:

gzip AR-01-BS-r1.t001.img

this would create a new file called AR-01-BS-r1.t001.img.gz in place of the original. In order to uncompress the file, you would use the following command:

gunzip AR-01-BS-r1.t001.img.gz

which would recreate the original file with the original filename AR-01-BS-r1.t001.img.

If you have a large number of files in a directory tree to compress, you can use the find command to automate this. The find command looks for files in a particular location that match a particular search string, and then performs a particular command on those files. It works like this:

find <location> -name "<name expression>" <command>

For example, to search for all files beginning with "na" and ending with ".img" in a particular directory, you could go to that directory and type the following:

find . -name "na*.img" -print

This will simply print out the names of all the files matching that search string. If you want to go through and compress each of those files using gzip, you would use the following:

find . -name "na*.img" -exec gzip {} ;

The {} stands for the files that are matched, and the ";" tells the find command where the command ends. You can also use this command to remove large numbers of files. It's essential to note that find works recursively; it will traverse all directory trees within the search path looking for files that match the search string.