CCV Development Guide
The YURT
The YURT Ultimate Reality Theatre (a recursive acronym) is a large virtual reality room situated in the Center for Computational Vision (CCV) building at 180 George St. The walls, floor, and most of the ceiling are screens upon which projectors display a graphical program. Head-tracking and stereo vision complete the package for a fully immersive virtual reality experience.
CCV Filesystem
The Center for Computational Vision has its own Linux filesystem. This system is entirely independent of the CS Department's filesystem. Many applications and development tools CS students usually expect to have access to are not present, and there are a few important differences in the way programs and files are organized.
Modules
The CCV system is a monolithic repository for a large number of different programs and projects, many of which require particular versions of dependencies. Between the accumulated legacy software and limited resources for ongoing development, attempting to synchronize dependencies (such as Python or gcc versions) is infeasible. Rather than attempt to enforce a single standard version for any given dependency, the filesystem employs a \textit{modules} system.
The way the modules system works is simple. Dependencies are installed in a common shared directory. Individual users create module files that point to which specific dependencies they would like to use. The modules system then sets the environment variables to include those dependencies.
Each user has a default .modules file in their home directory. If this is not the case, copy someone else's (such as Tom Sgouros's) module file. The modules listed in this file are loaded when you log into your account. Individual modules can be loaded or unloaded by using a simple command line interface. Use \texttt{module list} to see all the modules you currently have loaded, and \texttt{module load} and \texttt{module unload} to change them.
\subsubsection{Modules needed for developing YURT programs}
\begin{itemize} \item \texttt{centos-libs/6.7} These are the updated OS libs. Check to see that your version is not 6.5. \item \texttt{vprn} VRPN is the input server for tracking things like mouse and glasses movement. \item \texttt{cave/ccv} Has cave modules such as VRG3D and other important things. \item \texttt{cave/jnh} John Huffman's version of the former. May be more up to date. \end{itemize}
\subsection{Qt}
The CCV system has a working version of Qmake installed. Unfortunately, the CCV system does not have a working version of QtCreator installed. Furthermore, Qt5 does not work with the filesystem (QtCreator 3 simply segfaults). As of this writing, it is unclear why Qt5 does not work. The solution in the meantime is to download and install backversions of QtCreator and Qt4.
\subsubsection{Qt and C++11}
Qt4 for some reasons seems unable to recognize C++11 compiler flags, even though the gcc version it's using is supposed to support it. This is a problem worth solving for anyone coming from the CS Department, which uses C++11 as a standard.
\subsubsection{Qt .pro Files and Qmake}
QtCreator provides a tremendous productivity boost over makefiles, the traditional form of project coordination for a number of YURT applications. However, compiling and linking programs with QtCreator with VRG3D is not straightforward. The .pro file requires special attention:
\begin{itemize} \item The best way to start a new Qt project is to build off of a previous .pro file. \texttt{mjm9}'s home directory is open, and the project contained in \texttt{~yurt/yurtcraft/project} provides an example of how to properly set up a Qt .pro file in order to compile and link on development machines. \item There are a large number of libraries required for VRG3D. These must be enclosed using \texttt{-Xlinker --start-group} and \texttt{-Xlinker --end-group}. This is slightly different from makefile templates, which include \texttt{-Xlinker} before every linked library in the list. \item The \texttt{G} and \texttt{GARCH} environment variables must be set before opening QtCreator from the command line, as they are referenced from within the Qt .pro file. \item To add a library to your project, right-click the .pro file in the text-editing pane (not the file icon in the file viewer). Go through the steps of adding the external library as usual, and Qt will automatically add three chunks of text to the .pro file. You must \textbf{delete} the last chunk. The chunk in question is commented out in \texttt{mjm9}'s .pro file as an example. \end{itemize}
\section{Compiling and Running}
Compiling for a typical computer typically only requires an IDE or simple command line makefile system. Compiling for the YURT is a bit more involved.
\subsection{Development Computers}
There are a number of development computers in the CCV building, and many are configurely somewhat differently from one another. You must acquire a CCV account before you can use any of the machines.
\subsubsection{dev0*}
These are the regular desktop computers in the room to the right of the YURT. They do not have modern graphics cards, and their drivers date to roughly 2006. As such, testing modern graphics applications on them is impossible. However, programs compiled and linked on them should be runnable on the more up-to-date computers. These are the computer on which you will run QtCreator or other IDEs.
\subsubsection{cave0*}
There are 20 different Cave logins, and machines 1 through 19 run the YURT. Machine cave20 is a test machine. All cave logins are equipped with high-powered, modern graphics cards.
It is important to note that running the YURT-kill script from the YURT kiosk will kill everything running on the cave logins 1-19, so it is not a good idea to remotely test on them during the day.
\subsubsection{login001}
Login001 is what the kiosk runs on.
\subsubsection{Nonuniform disk images}
While all of the machines are on the same filesystem, at the time of this writing not all of the disk images on each of the machines is identical. Changes made to your home directory will persist across different logins (dev, cave, etc.) however dependencies may change. To ensure that your project can run in the YURT, make to compile and link it on \texttt{login001} to avoid any issues. You don't physically need to go to the kiosk - simply ssh in from a dev machine.
\subsection{Recommended Build Process for QtCreator users}
Building with Qt is a two-step process. The first step involves building from the IDE as usual. The second step involves running the makefile from login001.
\subsection{The Kiosk}
The YURT and the test wall each have a web ``kiosk that allows you to easily run programs from the browser. The most useful button for development is the kill-all button, which shuts down active user processes on each of the computers.
\subsection{The Test Wall}
The test wall in the common room is the best spot for developing and testing your programs. While its projectors have dead pixels and there is no curvature, it is still very easy to test whether your program is projecting everything correctly.
Useful facts:
\begin{itemize} \item The test wall has its own kiosk, which can be access from \texttt{172.20.8.9/wall} in the web browser. The kiosk can conveniently be run from any machine. \item In case your project continued running after you have hit the kill button, you will have to ssh into dev10 and kill the processes by hand. \item In order to run a project on the test wall, use the \texttt{run-wall} script, which should already be in your path, using your program name as an argument. \item The projectors are the same as those that run in the YURT. As such, it is best not to turn them on and off very much, for the heating and cooling process erodes the hardware. Try to work in fewer, longer chunks of time rather than more numerous and shorter chunks of time. \end{itemize}
\subsection{The YURT}
The YURT operates just like the wall, except it's way more awesome. Useful facts:
\begin{itemize} \item Gain access to the YURT calendar to see when it is free. You will most likely have some trouble developing on it during the day for longer periods of time, as tours are always coming through and other researchers are looking to schedule time as well. The YURT is usually much freer later in the evenings and at night. \item Use the \texttt{run-cave} script instead of the \texttt{run-wall} script. It works the same way. \item No shoes in the YURT! \end{itemize}