You will be getting familiar with many of the lab systems offered by the EECS department as well as downloading/installing tools on your personal computer so you can complete your labs at home for when the lab rooms are not available.
The Tesla lab (recently renamed the IBM Analytics Lab) are EECS maintained computer systems that give you access to the tools needed for COSC102.
You will need to become familiar with the “console”, which is a text-based terminal where you type a sequence of commands to get the Tesla machine to accomplish something, such as compiling your C++ programs.
Step 1: Verify that your NetID and password work by entering them into the Tesla lab computer. This should log you into the Tesla machine you’re sitting at.
Step 2: Open a new Terminal window. This will open a “terminal emulator”, which gives you the look and feel of a console.
MobaXTerm: https://mobaxterm.mobatek.net/download.html
The tools for MAC are already under Application > Utilities > Terminal.
Remote Logging On To The Tesla Machines
The Tesla Machines use something called “secure shell” or SSH. MobaXTerm and PuTTY allow you to connect using an SSH connection for a Windows-based machine, and MAC OSX has the “ssh” command that allows you to connect to the Tesla lab machines.
On the Macs in the Terminal window, type: ssh netid@teslaXX.eecs.utk.edu
XX is a number between 0 and 30 (there are 31 Tesla machines). You should be asked for your password, in which you’ll type your NetID password. You should now be logged onto the Tesla lab machine from your personal laptop.
You will be getting familiar with console based text-editing tools, such as vi or nano. Clara Nguyen has put together an excellent tutorial: http://utk.claranguyen.me/guide.php?id=terminal_intro (Links to an external site.)
Ethan Rickert’s guide for installing gcc on windows and mac (you can skip the homebrew step for mac): https://ethan0429.github.io/COSC102-Lab-Writeups/labs/info.html
Create a new file called “lab1.cpp”. All this program will do is ask the user for their name and output “Hello, XXX” Here is some sample interaction:
What is your name? Stephen
Hello, Stephen
Your TA will guide you through editing and writing this C++ program.
You will compile your C++ program by typing the following command:
teslaX: ~/cosc102> g++ -std=c++11 -o lab1 lab1.cpp
teslaX: ~/cosc102> ./lab1
What is your name? Johnny
Hello, Johnny
teslaX: ~/cosc102>
Please remember that labs are an individual effort. Please review the plagiarism policy on the course syllabus.
Submit your lab1.cpp file.
WARNING: If your .cpp file does not compile using the command line above, it will NOT be graded, and you will receive a 0 for the lab, without regard to any partial credit. PLEASE ensure your file compiles before submitting!
Do NOT copy and paste your .cpp file from the terminal into a separate file. This will cause artifacts to appear in your submission, and the changes are likely that it will not compile. Instead, download your submission from the Tesla lab using SFTP in MobaXterm or scp in MacOSX.