How many servers do we have?

We have three servers, one CPU server (Cyrus), one GPU server (Nautilus), and one Rstudio server (RSTUDIO).

What is CYRUS?

CYRUS is a CPU computing server intended to serve my graduate students, named after Cyrus the great, who served humanity. This CentOS Linux server supports SSH and FTP services currently running over 32 parallel processors and a total of 64GB RAM. I adminstrate CYRUS with help of Benoit Forest, the computer technician of math department.

What is Nautilus?

Nautilus is the Capitan Nemo's submarine which goes deep in oceans. It is also our GPU computing server, intended to serve my graduate students in training deep neural networks. This Ubuntu Linux server supports SSH and FTP services currently running over 8 CPU that hosts a powerful Tesla K40 GPU server with 12 GB RAM and 2880 CUDA cores on one of its PCI 3.0 express slots. Khalid Laaziri adminstrates Nautilus. To have access first you must ssh using "ssh -x geraduser@ssh.gerad.ca" and then "ssh -x nautilus.gerad.lan"
You must "module load anaconda" and then "source activate keras-gpu" if you want to use keras with GPU acceleration, then run your python code using "python myfile.py". For more details contact Khalid. You may install what you like locally using "conda install".

What is RSTUDIO?

RSTUDIO is a server that I use also as my office desktop. RSTUDIO on our server is equipped with a web interface that mimics the common RStudio Desktop, except that the computations are sent to this server. This server makes RSTUDIO available on cell phones!

CYRUS Hardware


  • Motherboard Asus KGP(M)-D16.
  • Dual core AMD Opteron 6272, each core with 16 CPUs.
  • RAM 64 Giga octets.
  • Graphic Card CUDA Nvidia K420 (192 cores).
  • One hard disk SSD 120 Giga.
  • Two hard disks STATA 10K, one for data and home folders, another mirroring these folders.
  • One hard disk STATA 7.2K for regular backup.
  • Nautilus Hardware


  • Motherboard MB MSI x99s.
  • CPU Intel Core I7 5820 (6 core).
  • RAM 32G LPX DDR4.
  • Graphic Card CUDA Nvidia K420 (192 cores).
  • Tesla K40 GPU computing accelator (2880 cores).
  • One hard disk DDU Samsung SSD 256G.
  • RSTUDIO Hardware


  • Motherboard ASUS SABERTOOTH X58.
  • CPU Intel Core I7 (8 core).
  • RAM 32G.
  • Graphic Card ATI Radeon HD 6800 Series.
  • Two hard disks ATA Disk 128 Giga, one mirroring the other.
  • One removable USB hard disk for regular backup.
  • How can I have access?

    I must create you a username and send you a toy password. I strongly suggest to change your password as soon as you logged in the first time.

    How do I login?

    You can connect to the server using ssh command. If you work on Microsoft Windows, you need to install Putty. Below I describe some basic hints supposing that the server is CYRUS. For Mac or Linux users the following command can be run directly from your terminal
    LOCAL$ ssh username@cyrus.mathappl.polymtl.ca  
    

    How to change password?

    After you login on the server
    CYRUS$ passwd username  
    
    then follow the messages.

    How to copy files?

    If you need to copy files from your computer to the server, or back from the server to your computer, you can use ftp. Install the ftp interface called fireftp on your mozilla firefox browser. The ftp server is cyrus.mathappl.polymtl.ca, see below for more details

    How to use R on CYRUS?

    R is installed on the server. If you need some libraries, you have to install the libraries locally on your space on the server. First make a directory to install your local libraries in.
     CYRUS$ cd /home/username  
     CYRUS$ mkdir Rlibs  
    
    Then launch R and install a library in Rlibs
     CYRUS$ R  
     R> install.packages( "mylibrary", lib = "/home/username/Rlibs" )  
    
    You have to read the library from the Rlibs location that you specified. Call your library after the installation is complete using
     R> library( "mylibrary", lib.loc = "/home/username/Rlibs/" )  
    

    How to write parallel R codes?

    There are two ways.

    1- Call processors using "parallel" or "snow" package in R and associate a function to each processor. For a gentle introduction read this r-bloggers post on parallel computing in R.
    2- Let the operating system distribute your code.

    If you are a first timer I suggest you the second approach (explained below).
    Suppose you want to run two codes in parallel. For instance you want to sum the integer numbers from 1 to 20 000 000. One code sums from 1 to 10 000 000 and saves the result in 01.RData, another code sums from 10 000 001 to 20 000 000 and saves the result in 02.RData. Then you will aggregate the result.

    First I suggest to make a folder for your saved data, call this folder "parallelresult", and another folder for your codes, call this folder "parallelcode".
     CYRUS$ mkdir parallelcode  
     CYRUS$ mkdir parallelresult  
    
    The code 01.R that sums from 1 to 10 000 000 is something like
     R> remove( list = ls() )  
     R> s <- 0  
     R> for( i in 1:10^6 )  
     R> {  
     R> s = s + i  
     R> print( i )   
     R> }  
     R> save( list = ls(), file = "/home/username/parallelresult/01.RData" )  
    
    and code 02.R sums from 10 000 001 to 20 000 000 is something like
     R> remove( list = ls() )  
     R> s <- 0  
     R> for( i in 10000001:20^6 )  
     R> {  
     R> s = s + i
     R> print( i )   
     R> }  
     R> save( list = ls(), file="/home/username/parallelresult/02.RData" )  
    


    1- Make sure that you do not write on the same .RData file!
    2- Make sure that you print something which shows how much of your computation is left.


    Copy these two files to /home/username/parallelcode/ using fireftp. Then run these two files one after another on CYRUS using the following command.
     CYRUS$ nohup Rscript /home/username/parallelcode/01.R &  
     CYRUS$ nohup Rscript /home/username/parallelcode/02.R &  
    
    Do not forget "&", it will return you commandline after you press enter. There is "nohup.out", a text file, now created that writes the Rconsole output. If you want to check how much of your computation is left check this file out. This file is specially helpful if your code exits with some error. The R error and warnings are written in this file.
     CYRUS$ nano nohup.out  
    
    Just to be sure that there are two jobs now running on the server
     CYRUS$ top  
    
    and press "q" to exit the "top" interface, press "k" to kill a job. The "nohup" command keeps your job running even if you disconnect from the server, or logout from the server. When your jobs are executed you have to read the results from the saved files and aggregate them to produce the final result. Call this file "final.R". You can transfer the files on your local computer and run final.R on your computer if the .RData files are not big. If your R.Data files are big you need to run "final.R" on the CYRUS, aggregate result in "final.RData" transfer this file to your local computer.
     R> remove( list = ls() )  
     R> total <- 0  
     R> load( file = "/home/username/parallelresult/01.RData" )  
     R> total<- s  
     R> load( file = "/home/username/parallelresult/02.RData" )  
     R> total <- total + s  
     R> save( list = "total", file = "/home/username/parallelresult/final.RData" )  
    

    Important tips

  • Save all data that you use in your codes "save( list = ls(),...)" since you may need some of your variables later. Summarize the result in a small file "final.RData" and only save what you need. Only transfer this "final.RData" file to your local computer.
  • Compress your transfering data in one file using the "zip" or "unzip" terminal commands insalled on Cyrus.
  • Cyrus does not have a graophical card, if you need to plot something, you must write your plot using "postscript" or "pdf" commands in R. I suggest that you always save the data that you need, tansfer them to your computer, and make the graph on your local computer.
  • If you need other software to be installed, just let me know by dropping an email.
  • Learn some basic linux terminal commands from here.
  • Write your R codes on you own machine and run it on the server. Do not touch your R codes on the server. If you really needed to see you R codes use "nano" linux command.
  • Check if there is a free node using "top" command before running jobs.
  • Do not run more than 10 parallel jobs on this server. If you need to run more than 10 parallel jobs, ask me.
  • The memory of the server is shared between processors. Do not run demanding memory codes. It will crash the server and quites all jobs.
  • You need to re-insall your libraries if I update R. Check the R version before using your libraries.
  • If you run parallel in C, use MPI.