General Topics FAQ

1. Getting Started

2. Batch

See CCS FAQ

3. Compilers and Libraries

4. Interlanguage

5. Cygnus

6. Software

7. Telnet and SSH

8. Terminal Emulators

9. More information

10. Other questions and answers

11. Linux

1. Getting Started

Question: How do I know which version of Windows is running?
Answer: From the command prompt, type "ver" which displays version information.
Within windows, select Start -> Run -> winver or type "winver" at a command prompt.

Question: How do I map the network drive?
Answer: In the document "Accessing CTC Machines", see the section Mapping the network drive H: in Windows.

Question: What should I do if I map H: to my desktop and cannot see my H:\Users\username files?
Answer: Make sure that you have the correct DNS Settings in your TCP/IP settings.

Question: How do I protect my files and directories?
Answer: See the document on Directory and File Permissions for Windows XP.

Question: How do I ftp to the login nodes?
Answer: Use sftp. After following the link, see the related information on SSH Clients, which contains instructions about obtaining SSH. Many of the clients come with sftp.

Question: How do you set PATH?
Answer: In Windows 2000, from the Start menu select Settings -> Control Panel -> System. Select Advanced, then click on Environment Variables. There you will find the User and System paths. You should be able to edit the User path. After making changes, be sure to click OK on all the windows before closing. Changes made to the path are in effect immediately, but currently running applications may not know about the changes.

If you are at a windows command prompt:

set path=%path%;(new paths to be appended)
This will affect the current session only. This means that once that session is closed, the new path setting is gone. In addition, if two Command prompt windows are open, setting new path in one prompt will not affect the other.

As for login node sessions, if path settings are set in a personal startup file such as userlogin.bat, .bashrc, .tcshrc, or another .bat file, the settings effect all the ssh sessions on all nodes under your account. The search of the path stops as soon as the command is found searching the path setting where the search starts from left to right from top to bottom. Userlogin.bat runs in command prompt windows on login nodes.

The system path and the user path are concatenated to form the search path. The system path comes first, followed by the individual path and it is searched in that order.

Pathnames are case sensitive.

Question: How can I tell how much disk space is being used by my files and directories?
Answer: dir /s gives all files with sizes, and for each folder a total number of files and bytes used.

Question: What is the Collaboratory?
Answer: See the document
"Collaboratory Availability".

Question: How do I delete a directory tree?
Answer: To delete the files in my_directory

del /Q T:<my_directory>

To delete my_directory and its subdirectories

rmdir /Q /S T:<my_directory>

Question: Why can't I see the security tab for my folder on the H drive?
Answer: Most likely the problem is that you are running a version of windows released prior to Windows 2000 on your desktop. The current configuration of the H drive requires all users to modify their permissions from a machine running Windows 2000 or else a more recent version of Windows. There are presently two solutions to this problem:
Login to one of the ctclogin nodes and change your permissions there. Upgrade the version of Windows on your machine.

Question:How can I see what processes are running from a command prompt?
Answer: pulist displays all processes running on a system by name and process ID (PID). pslist displays all processes in detail (in unix,think ps -aux)

Question: How can I kill processes from the command line?
Answer: Issue the command kill /? for usage info on the on the Windows kill command.
Issue the command pskill /? for information on the pskill utility.

Question: How can I tell what my account balance is?
Answer: Issue the command vbalance at the command prompt.

Question: Where can I find information about the CTC Password Policy?
Answer: See URL
http://www.tc.cornell.edu/Services/Policies/Pages/password.htm.

3. Compilers and Libraries

Question: Which compilers are available?
Answer: For full details, see

http://www.tc.cornell.edu/Services/Education/Topics/General/Compiling/Introduction.htm

Question: How do I make and use libraries?
Answer: For full details, see

http://www.tc.cornell.edu/Services/Education/Topics/General/Libraries/Introduction.htm.

Question: What is the Intel Math Kernel Library (MKL) ?
Answer: The Intel Math Kernel Library is a set of linear algebra and FFT routines optimized for the Intel architecture. MKL has been installed on the ctclogin nodes. To find out the current version see the
CTC Software List. The current version of MKL is thread-safe.

Question: How can I see the Dev Studio Help files on ctclogin nodes?
Answer: By adding the MSDN help file to Dev Studio, Fortran, C, C++ and even Java help files are available now. However users must go to the tools menu and choose "options", then scroll to the right to the "Help System" tab. There they will find which help set is being used. They can choose MSDN or Fortran and when they hit F1 or go to help they will see the expected help files.

Question: Suppose I need to reset my Visual Studio settings to the default values. How do I do this?
Answer:

Question:"What is the default option for the OPEN statement with Compaq Fortran?
And what option should be used for opening files to be read by more than one process?"
Answer: By default, files are opened in READWRITE mode. However, only 1 process can have write access at a time, so other processes will be denied access to the file, even though they are only doing a READ. On the OPEN statement, use ACTION='READ' for files that are read only.

As noted in the Compaq Visual Fortran description of ACTION:

... "However, if /fpscomp:general is specified on the command line and action is omitted, the system first attempts to open the file with 'READWRITE'. If this fails, the system tries to open the file again, first using 'READ', then using 'WRITE'." ...

Question: I'm trying to debug my mpi job. How can I see standard output/error from each process in my parallel job?
Answer: Create a .bat file that you execute with mpirun. For example, create a batch file 'run.bat' for program 'foo.exe' with contents
foo.exe 1> out_%MSTI_RANK%.log 2> err_%MSTI_RANK%.log
MSTI_RANK is the task number. Then run the program as
mpirun -np 10 run.bat

4. Interlanguage

Question: How can I get my combination of Fortran and C to link successfully?
Answer: (1) specify the linker option /FORCE:MULTIPLE (this forces resolution of multiple error lib definitions and
(2) list all the Fortran objects ahead of the C/C++ objects when feeding them to CL (necessary to make CL take the Fortran error lib ahead of the C one)

Question: How do I convert my binary data from the SP2 so I can read it on Velocity?
Answer: Creating a *generic* utility program for big/little endian file conversion is not a simple matter, because it is necessary to know ahead of time the numbers and types of all items in each file to be converted. Fortunately, it is no big deal to write a short and simple Fortran program customized to fit your own array storage patterns. This can be done in C as well, but not as conveniently, because your program has to do the byte-swapping explicitly.

Note that using using only the /convert compiler option will apply to all binary data.  Additional syntax is found within Developer's Studio for Digital/Compaq Fortran.  The most flexibility, without changing source code, is obtained by the command "set FORT_CONVERTnn=BIG_ENDIAN", where nn is the unit number.  The relevant section in Dev Studio is accessed through help-->index and then "converting unformatted numeric data".  With the "set" command, there should be no spaces before or after the "=".

5. Cygnus

Question: Where can I find more information about cygwin?
Answer: Here are some related links:

Using Cygwin on Velocity Cluster

http://www.cygwin.com/ that's the general cygwin pages

http://cygwin.com/faq.html cygwin faq

http://cygwin.com/ported.html List of ported software

http://www.xraylith.wisc.edu/~khan/software/gnu-win32/ some other useful stuff

Question: Is there uncompress for cygwin?
Answer: The gunzip utility is available under Cygwin, and gunzip can uncompress *.Z files. This should take care of decompression on a command line basis.

6. Software

Question:
What software is available on the login nodes
Answer: See the Software List , which lists all software available on all nodes.

Question: Is perl available on the cluster?
Answer: Yes, it can be found at: C:\perl\bin\perl.exe

Question: Is there a good, free FFT library?
Answer:
One possibility is FFTW (www.fftw.org), which was created by MIT's LCS. It has versions for Windows and other platforms. It is freely distributed under the GNU general public license. It supports parallelism in three forms: MPI, Posix-style threads and Cilk. A Python interface is also available.

FFTW is distributed in C source files, so it would require compiling with the proper optimizations and CPP directives.

FFTs are a major concern because many users rely on them, and ESSL is not available.

Commercial solutions include NAG, IMSL and CXML, which comes with Compaq Visual Fortran.

7. Telnet and SSH

Question: Why do some telnet clients interpret control-s as "stop output?" This makes it difficult to save files in emacs.
Answer:
You can remedy this by entering "set stop^P" (or any other desired control string) at the telnet prompt.

Question: I can't create a tunnel with SSH, but I can connect directly. What is the problem? 
Answer:
If you are outside the CTC_ITH domain, you must provide your user name to SSH. Add -l <user_name> to the SSH command.

8. Terminal Emulators

Question: What kind of client software should I have to emulate Windows console?
Answer: Remote Desktop Connection will provide a Windows environment in a separate window and is the preferred mode for connecting to the login nodes. Details are in
"Accessing CTC Machines".

If you want a UNIX-like interface, you can use Cygwin, a quasi-Unix environment. For details, see Using Cygwin on Velocity Cluster.

9. More information

Question: Are there any additional links for Windows 2000?
Answer: See CTC's Education Materials.

10. Other questions and answers

Question: What and where is machine.pl?
Answer: See the MachineMaker script.

Question: What is the best way to do screen dumps?
Answer: <alt><printscreen>will copy an image of the highlighted window to the clipboard. If you click on the "desktop" the whole screen will be captured. Then open Word or other apps and paste the image.

-OR-

snagit - shareware that is easy to use, very versatile and allows you to crop your images and capture menus.

Question: What program can be used to open an hpf file?
Answer: To look at it as a source file, use WordPad (generally a little better than Notepad), but to compile it, etc., you'll need to use the PGI compiler. Details are here.

Question: Is there any MPI documentation?
Answer:

CTC:

Education and Training Materials 

Software Page on MPI/Pro

Beyond CTC:

Verari Systems Home Page

11. Linux

Question: How can I change my password in Linux?
Answer: Type passwd. If you enter an illegal password, you will get the error message "passwd: Authentication token manipulation error". Your password must comply with CTC's password policy.  See
http://www.tc.cornell.edu/Services/Policies/Pages/password.htm

Question: How can I change my default shell to tcsh?
Answer: The default shell is bash.  As the last line in your file $HOME/.profile, put /bin/tcsh.

Question: How can I use customize .tcshrc both for Linux and cygwin?
Answer: Check the setting of the environment variable OSTYPE, as in the following skeleton.

if (${OSTYPE} == "posix")
echo "reading .tcshrc file for CYGWIN"
           [cygwin commands]
else if (${OSTYPE} == "linux") then
echo "reading .tcshrc file for linux"
           [linux commands]
endif

Question: For vsched, how can I echo the commands in the script specified in the <run> element?
Answer: In tcsh, begin the <run> element with /bin/tcsh -xv.

-x  Sets  the echo shell variable, so that commands are echoed immediately before execution.
-v  Sets the verbose shell variable, so that command input is echoed after history substitution.

Question: For vsched, how can I redirect stdout and stderr in the <run> element?
Answer: Usually the way to do this would be with >&.  However, the & breaks the xml parser, as do 4 other characters.  The way around this is to replace these characters with entity references, as described below.

As quoted from http://www.w3schools.com/xml/xml_cdata.asp,

"There are 5 predefined entity references in XML:

&lt;        <    less than
&gt;       >    greater than
&amp;    &    ampersand
&apos;    '     apostrophe
&quot;    "    quotation mark

Note: Only the characters "<" and "&" are strictly illegal in XML. Apostrophes, quotation marks and greater than signs are legal, but it is a good habit to replace them. [If &apos; does not work for apostrophe, use &#39;.]"

The following is an example of legal syntax.

<run>/bin/tcsh -vx $HOME/myshell.tcsh >&amp;$HOME/log.txt</run>

Question: How can I specify the name of a machine in a batch script?
Answer: The issue here is that you may not know the name of the environment variable that specifies the name of the machine. The following commands parse a name such as vii0003.tc.cornell.edu and return vii0003.

set myhost = `hostname | cut -f1 -d"."`
                   or

setenv myhost `hostname | cut -f1 -d"."`