0% found this document useful (0 votes)
8 views

Directives on Code Compilation and Dedicated Server

The document outlines the use of a dedicated course server (cs3400.cs.uwindsor.ca) for developing and testing code, accessible via SSH after connecting to the University of Windsor's network using Global Protect VPN. It provides detailed instructions for accessing the server from various operating systems and compiling code with specific GCC and Clang commands. Users are advised to ensure their code compiles and runs on the course server before submission.

Uploaded by

subah468
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views

Directives on Code Compilation and Dedicated Server

The document outlines the use of a dedicated course server (cs3400.cs.uwindsor.ca) for developing and testing code, accessible via SSH after connecting to the University of Windsor's network using Global Protect VPN. It provides detailed instructions for accessing the server from various operating systems and compiling code with specific GCC and Clang commands. Users are advised to ensure their code compiles and runs on the course server before submission.

Uploaded by

subah468
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 2

Overview

In as much as we all like to use our own computers, it is best to have a single official course machine that everyone can log in to in
order to develop, test, etc. all submitted course work on. The machine for this is cs3400.cs.uwindsor.ca which is accessible to
everyone using SSH. This page provides additional details.

Note that you can use the terminal on your CS Server (i.e. Delta) as well to compile your code if the course dedicated server is
unavailable.

Accessing cs3400.cs.uwindsor.ca Using SSH

The cs3400.cs.uwindsor.ca machine is accessible using any modern Secure SHell (SSH) client. The SSH client is realdy installed in
Windows 11, MacOS, and Linux:

Under Windows:
SSH can be used by opening a PowerShell prompt and running "ssh [email protected]". (Replace
your-uwinid with your UWinID.)
If you want to use SSH from within a Windows Subsystem for Linux session, then run "ssh your-
[email protected]" at a command prompt within that session. (Replace your-uwinid with your UWinID.)
You can also download the freeware MobaXTerm, which is an SSH client, to access SSH servers such
as cs3400.cs.uwindsor.ca as well. (This is likely necessary if you are using an older version of Windows as SSH is
not with PowerShell and Windows Subsystem for Linux may not be available with an older version of Windows.)
Under MacOS:
MacOS is BSD Unix under the hood. Open up a terminal window and at the command prompt run "ssh your-
[email protected]". (Replace your-uwinid with your UWinID.)
Under Linux:
Open on a terminal window and at its command prompt run "ssh [email protected]". (Replace
your-uwinid with your UWinID.)

Global Protect VPN

Typically to access cs3400.cs.uwindsor.ca you will FIRST need to sign in to the University of Windsor's network using Global Protect
VPN before connecting with SSH will work. The Global Protect VPN client is available from the following locations:

Installing Global Protect Under Windows11


NOTE: In the GUI connect to securelogin.uwindsor.ca.
Installing Global Protect Under MacOS
NOTE: In the GUI connect to securelogin.uwindsor.ca.
Installing Global Protect Under Linux
It is not straight-forward to download this client. Be sure to log in to the UWindsor web site (notice the "Sign in" link at
the top-right) and then you will see download links, etc. on the right-hand side of the page that can be used to
download the image and the "UI" image packages that can be installed. The "UI" package is needed for GUI support.
When this client is run if nothing happens other than the button graying out when one clicks the connect button then it
is working. Confirm such by looking at the routing table, e.g., run "netstat" at the command line and look for a default
router to 137.207.x.y (i.e., the University of Windsor.
In the GUI connect to securelogin.uwindsor.ca.
Jan. 23 update: I tried out the latest version of the proprietary GP Linux program today and found after class it had
consumed ~600 GB of hard drive space in useless logging, etc. Besides disk space it it not a very user-friendly
application and it insists on running, etc. when one logs in. I removed it --back to the open source version (see next
bullet).
(Unofficial) Global Protect Client for Linux (OpenConnect)
Use at your own risk, etc.
In the past at times, the official Global Protect client for Linux had problems under some Linuxes. This Github site has
a working client that works well (and is more configurable than the official Global Protect client).
The reason Linux' OpenConnect cannot be used is that Global Protect redirects the web browser to web pages and
the open source OpenConnect drivers do not recognize the protocol tricks that is being used to show web pages.
This Githib client does do this.
In the GUI connect to securelogin.uwindsor.ca.
Jan 23 update: Apparently the GUI portion of the v2 of this application now has a 14d trial period.
Jan 24 update: The work-around of the trial period for the GUI application is to use the 1.x branch and compile from
source:
git clone https://github.com/yuezk/GlobalProtect-openconnect.git
cd GlobalProtect-openconnect
git checkout -b 1.x remotes/origin/1.x
mkdir build
cd build
cmake ..
NOTE: For cmake and the make to work properly you may need to install some additional
development packages on your system, e.g., I had to install apt install libqt5websockets5-dev
qtwebengine5-dev qtwebengine5-dev-tols qtkeychain-qt5-dev under Ubuntu.
make
sudo make install
By default this installs system-wide without a package. If you install the software to a different location
be sure to notice the systemd files that are installed --those will need to be activated manually for
things to work.
NOTE: The client program is called gpclient if you want to run it directly.

If the UWindsor links above are not sufficient then search uwindsor.ca for more help and/or go to the ITS helpdesk seeking more
help. The information is provided here for your convenience only.

Developing Code on cs3400.cs.uwindsor.ca

Sample commands to compile code in cs3400.cs.uwindsor.ca are:

With GCC C++20: g++ -std=c++20 -Wall -Wextra -Wold-style-cast -Werror -pedantic -O3 -march=native program.cxx -
latomic -ltbb
With GCC C++23: g++ -std=c++23 -Wall -Wextra -Wold-style-cast -Werror -pedantic -O3 -march=native program.cxx -
latomic -ltbb
With Clang C++20: clang++ -std=c++20 -Wall -Wextra -Wold-style-cast -Werror -pedantic -O3 -march=native program.cxx -
latomic -ltbb
etc.

where:

-std=c++20 tells the compiler to compile the C++ code using the C++20 standard
-std=c++23 tells the compiler to compile the C++ code using the (not yet released) C++23 standard
-Wall -Wextra turns on all warnings
-Wold-style-cast warns about using "old (C) style casts" --which are prohibited to be used in this course unless explicit
instructions are given permitting the use of such
-Werror treats all warnings as errors (expect marks to be deducted if your code when compiled emits any warnings)
-pedantic is strict about conforming to ISO C++ syntax (e.g., GCC extensions will not be enabled)
-O3 turns on maximum optimizations
-march=native tells the compiler to compile the code using machine code for the hardware the compiler is running on
-pthread might be needed when compiling code using threads
program.cxx is the program name
-latomic is needed when linking to libatomic.so is needed (e.g., in certain cases when using atomics)
-ltbb is needed when using C++ parallel algorithms since GCC uses the Threaded Building Block (TBB) library to implement
C++ parallel algorithms
-lpthread may be needed when linking code using threads

If you need to compile with other settings such as debug (e.g., -g) then add those arguments. See the g++ man page for more detail.

The compiler to be used in this course is GCC installed on cs3400.cs.uwindsor.ca, i.e., the version that is installed with Debian
testing (i.e., GCC 13.2.0), unless otherwise explicitly stated in a specific assessment/activity/context and only for such. If you choose
to use your own computer that is your choice and is at your own risk. Ensure you check that your code properly compiles and runs
on cs3400.cs.uwindsor.ca before submitting it.

You might also like