-
How do I check which shell I'm using?"
To check your login shell, type the following command in a terminal:
echo $SHELL
-
How do I change my login shell?"
To change your shell on the CS machines, use the
ypchsh command.
You will be prompted for your password and the path to the new shell.
For the path, type /bin/tcsh
and press Enter.
After making this change, you will need to
logout and back in again.
-
When running my program, I get the message
"VisualSysInit(C): fail to
load visual system!"
This message is displayed by the
ThreadMentor
libraries when the visualization program cannot be loaded.
This usually means that you did not add the visualization system to
your execution path.
If your shell is bsh or bash, add the following to
.profile (in your home
directory)
export PATH=/usr/local.csl/ThreadMentor/fedora4/bin:$PATH
If your shell is csh or tcsh, or a variant, then include the following
line in the .cshrc file
(in your home directory):
setenv PATH /usr/local.csl/ThreadMentor/fedora4/bin:${PATH}
Note: tcsh seems to work best
in most cases and is the recommended shell.
-
When running my program, I get message
"Gtk-WARNING **: cannot open
display and no visualization"
This occurs because the visualization system uses Gtk and X to display
the windows, but the host you are on cannot contact an X server. This
usually occurs when you are using SSH or are running your Linux
workstation in text mode (no Gnome/KDE/Fluxbox/etc.). If you are
connecting to wopr.csl.mtu.edu,
you'll need to link with the NoVisual libraries, since X forwarding has
been disabled. If you need to use visualization, either come in to the
CS labs and use a Linux workstation, or install Visual Studio.NET 2005
and ThreadMentor
on your home PC. See here
and here for more details.
-
What is
LD_LIBRARY_PATH? Do I need to modify it?
This environment variable identifies directories to search
(before the standard Linux paths) when shared libraries
(i.e., lib*.so)
need to be loaded by a program.
ThreadMentor
itself is a static library, not a shared library, so you do not
need to modify LD_LIBRARY_PATH
for
ThreadMentor to work.
Adding the ThreadMentor
path to this environment variable may actually result in a small performance
decrease when using other applications, since a directory will
be searched when it doesn't need to be.
For more information about shared libraries, read this
this
page from the Linux Documentation Project.
-
How can I compile and test my ThreadMentor programs at home?
The best way to compile and test at home is using Microsoft Visual
Studio.NET 2005. This is available to all CS majors via MSDNAA (email
csmaint@mtu.edu
to request an account, and include your name, email
address, and expected graduation date). Nonmajors should contact their
department computing lab administrator to determine whether their
department has an MSDNAA agreement. (If MSDNAA access is not available,
Microsoft Visual C++ 2005 Express Edition, which is a free download, will
work too)
When installing Visual Studio, if you want to save disk space, you can
deselect the other languages such as C#, J#, and Visual Basic. You don't
need to install Crystal Reports or SQL Server either.
After installing Visual Studio, unzip the
ThreadMentor
distribution for VSNet2005 (see the
common directory) to a directory of your choice.
In the instructions below, the
ThreadMentor directory
is c:\threadmentor.
REMEMBER: The Visual C++ version of
ThreadMentor is
provided for your convenience. Because the grader will run your program on
the CS lab machines, be sure to thoroughly test your program in the lab
before submitting it.
|
-
How do I set up a Visual Studio 2005 project to
work with ThreadMentor?
When creating a new project, follow these steps:
- From the File
menu, selectNew,
then Project.
- From the list of templates, select
Win32 Console Application.
- Under Application Settings,
check Empty Project,
then click Finish.
- Add your source files to the project.
Before compiling, select Options
from the Project menu.
Set the following options under
Configuration Properties.
Note: you will need to have a C++
source file in your project already for some of these options to be
visible.
- Category: C/C++ / General
Option: Additional Include Directories
Value: c:\threadmentor\include
- Category: C/C++ / Preprocessor
Option: Preprocessor Definitions
Value: WIN32;_CONSOLE;VC_NET;WIN32_THREAD
- Category: C/C++ / Code Generation
Option: Runtime Library
Value: Multithreaded (/MT)
- Category: Linker / General
Option: Additional Library Directories
Value: c:\threadmentor\release\threadclass.visual
or c:\threadmentor\release\threadclass.novisual
(depending on whether you want the visualization system)
- Category: Linker / Input
Option: Additional Dependencies
Value: ThreadClass.lib
- Category: Debugging
Option: Environment
Value: PATH=C:\ThreadMentor\release\visualwin
- Category: Debugging
Option: Command Arguments
Value: (Any command-line arguments needed to run your program)