CISC5835: Accessing CIS Server (Erdos)

This document describes the basics on working on Python programs on erdos. More information about CIS servers can be found at the department website (especially this page about how to obtain a terminal/ssh).

1. Log on to the erdos.dsm.fordham.edu server:

Open a terminal program, and type the following command in order to log on to erdos.dsm.fordham.edu:

ssh -l yourAccount erdos.dsm.fordham.edu
equivalent, you can type:
ssh  yourAccount@erdos.dsm.fordham.edu
Note that the -l yourAccount is the dash followed by letter l, and then your storm account (which your advisor hand out to you). This is an option to the command ssh (a Unix command used to securely log in to a remote server. You will be prompted to enter your password, enter the password, and type return. If you have entered your account and password correctly, you will see a prompt message like the following, indicating that you have logged onto the erdos server:
[yourAccount@erdos ~]$
Now you can start to type commands into the terminal to get different things done.

How to change your password Type command yppasswd to change your password. You will be asked to enter your current password, and then enter your new password twice... (Note that the password you type in is not displayed on the terminal for security reason).

[xzhang@erdos ~]$ yppasswd
Changing NIS account information for xzhang on dsm.dsm.fordham.edu.
Please enter old password:
New password:
Retype new password:
passwd: all authentication tokens updated successfully.

When you are working from your own computer, you can follow the instruction given at here. http://storm.cis.fordham.edu/~zhang/cs2000/access.html.

2. Review Unix commands

Storm is a Unix system (a type of operating system) which is considerably different from Windows. In order to be more productive in this class, you need to learn some basics about how to get things done in Unix system. Below is a list of useful commands to remember. Note, you can take the following two tutorials, if you haven't done so before:

3. Configure your environment

Now that you have learnt some basic Unix commands, type in the following commands which will set up your account.

4. Using editor to type in a small program

There are several text editors to choose from: vi, emacs are my favorite and pico is easist to learn. Below are some info about emacs: Learn/Review Emacs

Please read the emacs tutorial, pay special attentions to: emacs keystroke conventions, most importantly, C- that you will see in the emacs reference card means pressing Control and chr key at the same time.

Here is a reference card for emacs, and make a note of how to:

Try to use emancs to type in the following simple python code, and save it as hello.py.

print ("hello world")

5. Run Python code

You can run your python program as follows:

python3 hello.py
If you don't include the python program when invoking python3, you will enter an interactive mode in which you can enter Python statement and the result will be displayed in the dialog:
xzhang@erdos ~]$ python3
Python 3.6.4 |Anaconda, Inc.| (default, Jan 16 2018, 18:10:19)
[GCC 7.2.0] on linux
Type "help", "copyright", "credits" or "license" for more information.
>>>print("Hello world")
Hello world
>>> a=2
>>> b=2*a
>>> print (b)
4
>>> 

6. Copy your program to erdos

If you have Python3 installed on your own laptop, you can work on your laptop. When you are ready to submit the code, copy the files to erdos, and then submit using submit script explained in next section. Here is how to copy files from your laptop to erdos:

7. Submit your program

The following submission method only works from erdos server.
To submit a file named sort.py as part of LAB1 assignment using command, you first need to go to the directory where file sort.py is located (using cd command), and then type the following command
	submit5835 LAB1 sort.py
If you have multiple files to submit for an assignment, you need to submit them one by one using above command. If you want to submit an updated version of your code, you can supplement the assignment code (LAB1) with a version number, as
	submit5835 LAB1_v2 sort.py
You can then run the command
	verify5835 LAB1 sort.py
To retrieve the file and verify that if the file has been submitted successfully. It should display the file you submitted back to you. Write to me (xzhang@fordham.edu) if you encounter any problem, including in your email the error message you received.