FAQ: Difference between revisions

From Center for Cognitive Neuroscience
Jump to navigation Jump to search
 
Line 188: Line 188:
** <b>FIX</b>: Either provide a unique name for different file formats (e.g. subj_series_nifti.nii.gz or sub_series_ana.img/hdr) or keep different file formats in different directories (e.g. my_study/my_subj/raw_data/nifti/{nii images} and my_study/my_subj/raw_data/analyze/{analyze images}
** <b>FIX</b>: Either provide a unique name for different file formats (e.g. subj_series_nifti.nii.gz or sub_series_ana.img/hdr) or keep different file formats in different directories (e.g. my_study/my_subj/raw_data/nifti/{nii images} and my_study/my_subj/raw_data/analyze/{analyze images}


==How do I properly transfer my data between two machines on the network?==
==How do I transfer my data between two machines?==
https://www.hoffman2.idre.ucla.edu/file-transfer/
https://www.hoffman2.idre.ucla.edu/file-transfer/
<!--==How do I properly transfer my data between two machines on the network?==
<!--==How do I properly transfer my data between two machines on the network?==

Latest revision as of 15:48, 8 July 2017

How do I get a Hoffman2 Account?

Please see our walk through for this process Getting a Hoffman2 Account

How do I get access to all the FMRI software?

To get access to CCN-supported software (AFNI, FSL, FreeSurfer, etc.) see our modules page.


What are quotas and how do I view them on Hoffman?

Hoffman has two different kinds of quota's. The first quota limits the maximum amount of data. The second is the maximum *number* of files.

Both of these are listed in the output of the quota command, using the group switch if you're in a lab that's purchased space:

quota -g

The output looks something like:

Filesystem  blocks   quota   limit   grace   files   quota   limit   grace
titan:/hoffman2_home9/foo
  1523786368       0       2147483648         6000000*      0  6000000        
titan:/hoffman2_home9/bar
  985470304         0       2147483648          125933       0    2000000   
  • The first column is the maximum amount of data you are allowed to store. (e.g. 1523786368)
  • The third column is the actual amount of data you are storing. (2147483648)
  • The fourth column is the actual number of files you have currently (6000000)
  • The sixth column is the maximum number of files allowed (6000000)

We can see in the above example that the foo group is at the file count maximum. A helpful * has been placed beside the number to accent this.

The size numbers are in kilobytes. If you wish to see what the number is in gigabytes or megabytes, the easiest method is to use the google converter. For example, to convert 1523786368 kilobytes into gigabytes you'd use the search term:

1523786368 kilobytes in gigabytes

The return result is 1 453.19592 gigabytes, or 1.45 Terabytes.


I've exceeded my quota, what do I do?

There are basically three things that can be done aside from purchasing more space:

  • Run the clean_me.py script. It is in your path if you've set up your profile for the fmri group as described in Setting Up Your BASH Profile. By default it runs on the current directory. The full path is: /u/home9/FMRI/apps/usr/bin/clean_me.py
  • For file count quotas, archive any data not currently being worked on or not actively used. Tar Tutorial
  • Remove data from the server completely.

How do I archive my data?

tar cvf mytararchivename.tar files /and/paths directories 


How do I install the Python numerical libraries?

Python provides a suite of utilities that allow for numerical processing including matlab like plotting abilities. Installing couldn't be easier. Just follow five easy steps:

  1. Install MacPorts following their walk through
  2. Install matplotlib
$ sudo port install py26-matplotlib +wxpython
  1. Install ipython with scientific support
$ sudo port install py26-ipython +scientific
  1. Start up the ipthon scientific shell
$ ipython2.6 -pylab

This will automatically load all the libraries you need to get started in a matlab like interactive shell.

You may also want to take a look at our New to the Lab section on Python for some references to get you started.

I forgot my password to miles/hoffman2/lab computers. What do I do?

Depending on which password you've forgotten, a different solution is required.

Lab Password

Please send a support request to [[1]] that provides the following information

  • Full Name
  • Username if you remember
  • State your problem, e.g., I forgot my password)

Hoffman2 Password

  1. Go to the ATS Computational Clusters page
  2. Click the link labeled Request Cluster Password Change
  3. Sign in using your BOL account id/password
  4. Fill out the provided form making sure you include the name of the cluster you wish to reset the password for.

How do I make a soft link?

From wikipedia:

In computing, a symbolic link (also symlink or soft link) is a special type of file that contains a reference to another 
file or directory in the form of an absolute or relative path and that affects pathname resolution.

To make a soft link to file Foo, execute the following:

$ ln -sf /path/too/Foo /path/to/the/link/name

How do I search and replace a string in a file?

This can be done in many different languages. Here's a few.

  • Ruby
$ ruby -p -i.bak -e 'gsub("replace me", "with me")
  • Sed
$ sed -i.bak -e 's/\/Volumes\/local\/bin/\/u\/home9\/mscohen/' design.fsf
  • Perl
$ perl -p -i.bak -e 's/oldstring/newstring/g'

Sun Grid Engine

How do I submit a program to the cluster?

You submit jobs to the SGE cluster using the qsub command. It's typical to write a small wrapper script for this purpose so you can customize a few options. That's what we'll do here. The first thing of note is that qsub has a special comment for parsing options from a job script, any line that starts with '#$' is seen as a qsub option. This'll be clearer through example. Let's say we want to make a job script that submits this command to the cluster:

sienax MPRage.nii.gz

Open a file called "my_job.sh" or whatever you'd like to name it, enter the following, then save it.

#!/bin/bash
#$ -V
#$ -cwd
#$ -j y
#$ -N my_log
sienax MPRage.nii.gz

Here's a run down of the options:

  • -V  : export all the current environment variables to the grid engine (this is almost always the right thing to do)
  • -cwd  : cd into the current working directory, e.g., the directory you executed the script from
  • -j y  : combine the error and standard out into one log file. this is a personal preference of mine, I find it tidier
  • -N my_log  : name the output log "my_log" this can, of course, be anything you want

After that you just put the command you want and execute the follwing command:

$ qsub my_job.sh

This works great as a "one shot" solution. But what if I want make a general script for doing this?

Ne'er fear, open a file called 'submit_sienax.sh', enter the following, and save it:

#!/bin/bash
qsub <<CMD
#!/bin/bash
#$ -V
#$ -cwd
#$ -j y
#$ -N my_log
sienax $1
CMD

To use this script to submit a file named mprage.nii.gz to the cluster do

$ ./submit_sienax.sh mprage.nii.gz

All done!

For a complete reference on all the options available to qsub (there are so many! oh my!), please see the qsub man page.

$ man qsub 

Or the Sun Grid Engine Online Man Pages.

If man pages are scary, see the Man Pages section of the New to the Lab page.

How do I delete a job that's hung or in an Error state?

To delete all the jobs submitted by user 'foo', execute the following command.

$ qdel -u foo

If you list all jobs for a specific user, the far left column of the output is for the Job-ID. To kill that specific job,

$ qdel $jobid

Where $jobid is a number. Below is an example of the qstat output for clarification

job-ID  prior   name       user         state submit/start at     queue                          slots ja-task-ID 
------------------------------------------------------------------------
 66180 0.56000 feat5_reg  foo       r     03/12/2009 14:54:54 all.q@fmri03                 1        
 66178 0.56000 feat3_film foo       r     03/12/2009 14:54:54 all.q@fmri04                 1        
 66174 0.56000 feat5_reg  foo       r     03/12/2009 14:55:39 all.q@fmri06                 1        
 66172 0.56000 feat3_film foo       r     03/12/2009 14:55:39 all.q@fmri09                 1        
 66173 0.00000 feat4_post foo       hqw   03/12/2009 14:43:02                                    1        
 66175 0.00000 feat4_post foo       hqw   03/12/2009 14:43:03                                    1        
 66176 0.00000 feat5_stop foo       hqw   03/12/2009 14:43:03                                    1        
 66179 0.00000 feat4_post foo       hqw   03/12/2009 14:43:53                                    1        
 66181 0.00000 feat4_post foo       hqw   03/12/2009 14:43:53                                    1        
 66182 0.00000 feat5_stop foo       hqw   03/12/2009 14:43:54                                    1   

In this case, the $jobid is 66172 - 66182

To check all jobs submitted by users in your group, you may wish to use the

$ mygroupjobs

command

fMRI & FSL

How do I switch between versions of FSL?

We've built a system for switching easily between FSL versions using the switch_fsl utility. Please see the associated help for details, including examples:

$ switch_fsl --help

Why won't my images work in FSL??

There are many reasons that this could occur, but this FAQ tries to cover the most common and their fixes.

  • Multiple image files
    • This is by far one of the most common reasons for problems with fsl and images. FSL uses the root name to determine which file to load. The root name is the name of the file without the extension. For example, both subj_series.nii.gz and subj_series.img/subj_series.hdr have "root names" of subj_series. A gotcha with this is that if you have multiple files of different formats, but with the same root name in the same folder FSL won't be able to tell which one to load.
    • FIX: Either provide a unique name for different file formats (e.g. subj_series_nifti.nii.gz or sub_series_ana.img/hdr) or keep different file formats in different directories (e.g. my_study/my_subj/raw_data/nifti/{nii images} and my_study/my_subj/raw_data/analyze/{analyze images}

How do I transfer my data between two machines?

https://www.hoffman2.idre.ucla.edu/file-transfer/

Matlab

How do I modify my matlab path?

Users can modify their individual matlab paths via the ~/matlab/startup.m file. For example, if one wished to add /u/home9/local/apps/spm/5 to their path they would open ~/matlab/startup.m in their favorite text editor and add the following:

addpath(genpath('/u/home9/local/apps/spm/5'))

If the ~/matlab directory or the startup.m file does not exist, simply create the file and/or directory.

For further information please see the built in matlab help for addpath and genpath.

> help addpath
> help genpath