Mars Server Reference Sheet for CSCI 316
Mars Connectivity
Account Information
- Server: mars.cs.qc.cuny.edu
- Username Format:
xxxxx_yyyy316xxxxx= Last name (lowercase, ≤5 chars) or first 5 letters if longeryyyy= First name (lowercase, ≤4 chars) or first 4 letters if longer
- Initial Password:
q+ last 7 digits of CUNYfirst ID - Required: Change password on first login
Connection Requirements
- From Off-Campus: QC VPN (GlobalProtect) must be connected
- From On-Campus: Connect to
qwifi-securedwireless network - Note: Must set up CUNY login MFA before installing GlobalProtect VPN client
Initial Setup
ssh xxxxx_yyyy316@mars.cs.qc.cuny.edu- (Enter initial password)
passwd(Change your password)- (Log off and log back in with new password)
source /home/faculty/ykong/316setup(Get 0.25 pt extra credit if by Sept 11)cl(Test that Clisp works)
Once logged in, run:
source /home/faculty/ykong/316setup
Benefits: Enables cl command (Clisp) and kawa command (Scheme); qualifies for 0.25 pt extra credit if completed by Thursday, September 11.
Quick Reference: Key Commands
| Task | Command | Location | Notes |
|---|---|---|---|
| Connect to Mars | ssh xxxxx_yyyy316@mars.cs.qc.cuny.edu |
Local: PowerShell/Terminal | First time: type yes to continue |
| Fix host key issue | ssh-keygen -R mars.cs.qc.cuny.edu |
Local: PowerShell/Terminal | Run if “REMOTE HOST IDENTIFICATION HAS CHANGED” |
| Start Clisp | cl |
Remote: Mars prompt | After running 316setup |
| Start Kawa Scheme | kawa |
Remote: Mars prompt | For Scheme solutions; requires 316setup |
| Copy file to Mars | scp local_file.ext xxxxx_yyyy316@mars.cs.qc.cuny.edu:destination/: |
Local: PowerShell/Terminal | Requires QC VPN or qwifi network |
| Copy file from Mars | scp xxxxx_yyyy316@mars.cs.qc.cuny.edu:remotefile.ext . |
Local: PowerShell/Terminal | Requires QC VPN or qwifi network |
| Change password | passwd |
Remote: Mars prompt | Run after first login |
Lisp Assignment Submission
Submission Process
- Place solution file in home directory on mars:
your-last-name-N.lsp(where N = assignment number) - At the
xxxxx_yyyy316@mars:~$prompt, enter:
submit_lisp_asn your-last-name N
Example: To submit Assignment 5, if your name is David Touretzky:
submit_lisp_asn touretzky 5
Check submitted assignment — Run on mars:
ckasn
At resulting Lisp > prompt:
(quickcheck 'last_name assignment_number)
Example:
(quickcheck 'touretzky 5)
TinyJ Assignment Submission
TinyJ Assignment 1 (Parser)
submit_TJ_asn1
File location: TJ1asn/Parser.java (home directory on mars)
TinyJ Assignment 2 (ParserAndTranslator)
submit_TJ_asn2
File location: TJasn/ParserAndTranslator.java (home directory on mars)
TinyJ Assignment 3 (Virtual Machine)
submit_TJ_asn3
File location: TJasn/virtualMachine (home directory on mars)
Checking Submission Status and Late Submissions
Check If Files Were Submitted
Run these commands at the xxxxx_yyyy316@mars:~$ prompt to check submission timestamps (ctimes):
ls -lLc submitted-Lisp-assignments # Lisp Assignments 2–5
ls -lLc submitted-TinyJ-assignments/TJ1asn/Parser.java # TinyJ Assignment 1
ls -lLc submitted-TinyJ-assignments/TJasn/ParserAndTranslator.java # TinyJ Assignment 2
ls -lLc submitted-TinyJ-assignments/TJasn/virtualMachine # TinyJ Assignment 3
Interpretation:
- “total 0” or “No such file or directory” = No submission found
- ctime after due date = Late submission
- ctime before due date = On-time submission
Late Submission Deadline
- General deadline: Noon on Wednesday, December 24, 2025
- Condition: Mars must be operating normally and accessible
- Important: If mars becomes inaccessible after 6 p.m. on the assignment’s due date, the deadline will NOT be extended
Text Editors on Mars
- nano: Easy for beginners
- vim: Powerful but steep learning curve
- emacs: Full-featured editor
- less: View-only file viewer
Available Resources on Mars
| Command | Purpose | Location | Example |
|---|---|---|---|
ls -l |
List files with details | Remote: Mars | ls -l TJ1asn/ |
cd |
Change directory | Remote: Mars | cd TJ1asn |
pwd |
Print working directory | Remote: Mars | pwd |
cat |
View file contents | Remote: Mars | cat CS316ex0.java |
less |
Page through file | Remote: Mars | less Parser.java.txt |
diff -c |
Compare files | Remote: Mars | diff -c 0.sol 0.out |
javac |
Compile Java | Remote: Mars | javac TJ1asn/Parser.java |
java |
Run Java | Remote: Mars | java TJasn.TJ ... |
cl |
Start Clisp | Remote: Mars | cl |
kawa |
Start Scheme | Remote: Mars | kawa |
Important Policies
Mars Downtime Policy
- If mars becomes inaccessible after 6 p.m. on the due date, the deadline will NOT be extended
- Late submissions accepted only if mars is operational
- Recommendation: Submit well before 6 p.m. on the due date, ideally by noon
Submission Requirements
- Files must be in correct location on mars
- Java code must compile without errors on mars
- Late submission penalty: -1 point per late submission if 4+ assignments are submitted late
- Submit early to avoid issues with mars availability
Copying Files
- Do not rely on copying files from PC/Mac as an excuse for late submission
- Test copying files from your PC/MAC to mars ahead of time before relying on it for assignment submission
- Problems with file copying will not be considered legitimate reasons for late submission
Common Setup Sequences
TinyJ Assignment 1 Setup
- SSH to mars
/home/faculty/ykong/TJ1setup(At mars prompt)ls -l TJ1asn/(Verify files exist)- Check assignment document for specific Parser.java placeholder locations
TinyJ Assignment 2 Setup
- SSH to mars
/home/faculty/ykong/TJ2setup- Download
TJasn.jarvia scp to local machine
TinyJ Assignment 3 Setup
- SSH to mars
/home/faculty/ykong/TJ3setup- Implement virtual machine instruction classes
Lisp-Specific Commands
| Task | Command | Location |
|---|---|---|
| Start Clisp | cl |
Remote: Mars prompt |
| Load file | (load "filename") |
Remote: Clisp > prompt |
| Test solution | (quickcheck 'last_name N) |
Remote: Clisp > prompt (after ckasn) |
| Exit Clisp | (quit) or Ctrl+D |
Remote: Clisp > prompt |
| View SDRAW | (sdraw expression) |
Remote: Clisp > prompt |
Troubleshooting
| Issue | Solution |
|---|---|
| Cannot connect to mars | Verify QC VPN is connected or on qwifi network |
| “REMOTE HOST IDENTIFICATION HAS CHANGED” | Run ssh-keygen -R mars.cs.qc.cuny.edu |
command not found for cl or kawa |
Run source /home/faculty/ykong/316setup |
| File copy fails | Ensure QC VPN is connected; try SFTP client as alternative |
| Compilation fails on mars | Check working directory is home (~) for TinyJ; check class paths |
| Clisp gives “Break …>” prompt | Syntax error in code. Fix with ctrl+D |
ls -lLc submitted-* shows “total 0” |
File not found in expected location; verify submission command |