CAC can handle 2400-14400 baud automatically at 5-6666, and 28800 baud at 5-7777
I still don't quite understand how to logon to a Workstation computer in Hammond from someplace like Ridefer Computer Lab.
I don't know what equipment is in that lab. On Macs, look for a folder called "Apps". In that folder look for a program called "BYU/NCSA Telnet". Double click on the icon, and when the menu bar changes, click on the first bar item (File or Connect, I can't remember), then find the item to connect to a machine. Type in something like: "h26.ptph.psu.edu".
On IBM PC's click the Internet Access group, and double click the Telnet icon. When it asks for a host type: "h26.ptph.psu.edu".
Can I work from my room if I have cactwin?
Yes, but use the basic Telnet terminal program (mine is EWAN, but I don't think that's in the default package). Don't use the 3270 terminal program. Connect to one of the ECSEL machines such as avenger.ecsel.psu.edu. For our purposes you may find that the older cacslip package provides a better terminal emulation.
Can I do the stuff I've seen in class from the PowerMacs?
Yes, as long as you can find a Telnet program.
How can I converse interactively with another user?
On most Unix machines you can do this with a utility called "talk" ( use man for more information).
Why is it hard for me to use the arrow keys from my machine off campus?
Two possibilities. Make sure you try the command to Unix "set term=vt100". If that doesn't fix the problem you have a poor terminal emulator or need to fix something called the "keyboard map" associated with your terminal software. The biggest use for arrow keys are in vi. Run through the tutor.vi exercise and learn how to use letter commands to handle most of this work.
Why can't you backspace on the Sun's?
Sun and IBM disagree on the control character (special key) that is appropriate for a backspace. Generally if the Backspace key is working for the IBM's (ECSEL) the Delete key or Control-Backspace) will work for Sun. On many campus terminals it's the other way around, a simple backspace key working for Sun and the Control-Backspace working for IBM. If all else fails try the following procedure. At the Unix prompt type "stty erase" followed by a space, followed by hitting the key that you want to work as the backspace, followed by hitting the RETURN (ENTER) key.
How do your get mail while in a telnet session.
The Hammond machines were not setup to do a serious job of taking care of mail. They are configured to run a program called "pine". Type "pine" at the prompt, and follow instructions to work with mail or get help. Your best bet is to shrink the window by clicking one of the buttons in the upper right of the window. Then find and click on the Eudora program to do your mail work.
How does a person run your examples from a CAC lab?
On a PC open the Internet access group and click on the Telnet icon. If the software doesn't ask immediately for a host name, select the Connect item from the File menu and enter one the Hammond machine names (e.g. h23.ptph.psu.edu). On a Mac look for BYU/NCSA Telnet. Once connected to the Hammond machine copy files that you need from my 201 directory to whatever your current directory is on the Hammond Workstation. If it is a simple example ending with ".f", compile it then execute. For example the recent example aorder.f can be copied with the command:
cp ~jhm/201/aorder.f .
Don't forget that final period telling "cp" to dump the copy into the current directory. Look at the file with "vi" or "view", and compile it with the command:
Execute the program by typing "a.out".
My more recent examples are coming with shell scripts to cover compilation and execution, and at times copy files that they need. To use my latest examples make a subdirectory called leastsq ("mkdir leastsq"), change into the directory ("cd leastsq"), and then copy all of my files from my sample subdirectory:
cp ~jhm/201/leastsq/* .
Check for files beginning with "run", here you will find "runlin1" and "runlsq". Type "runlin1" and see what happens. If you get a messages complaining about privileges try typing "source runlin1". Take the time to inspect all ".f" and "run" files, along with any input files
My question, since we haven't really started anything yet, is do we need to get a special disk for the computers we will be using in the Hammond labs or can the disk I use in Macintosh work in the computer science labs as well?
The floppy drives on the Hammond Workstations take DOS formatted floppies, not Mac formatted ones. Best bet is to sit down at a real Mac, and use FTP to pull files from the Hammond machine hard disk to the Mac floppy. You could do the same thing on a regular PC, if you want to save files on a DOS formatted disk.
How do I use ftp?
Here is an example connecting to a PC (probably the one you are using as a terminal).
%ftp 128.118.771.81 Use ftp to pick up a spreadsheet
Connected to 128.118.771.81 file from a floppy on the lab PC
220 128.118.771.81 FTP server (SunOS 4.1) ready.
331 No Password required for ajb123.
230 User ajb123 logged in.
ftp> cd a: This connects to the floppy drive
250 CWD command successful.
ftp> get spread.data This file must be in Text format
200 PORT command successful.
150 ASCII data connection for swiss (188.8.131.52,1135) (55292 bytes).
226 ASCII Transfer complete.
56107 bytes received in 0.4001 seconds (136.9 Kbytes/s)
Here is an example of working between the CAC Sun's and the Ecsel machines. I start from farman.cac with the intention of bringing in a file from avenger.ecsel. Note that I must login as myself on avenger, giving someone else's user ID requires also giving their password. If I want to pick up a file from user abj123, I login as myself, then issue the command "cd ~abj123" to change to abj123's home directory. If the file I need has read access privileges I can get it. If the file is in a subdirectory, I can get there with another cd command.
curtiss.101> ftp avenger.ecsel.psu.edu Connected to avenger.ecsel.psu.edu. 220 avenger.ecsel.psu.edu FTP server (Version wu-2.4(2) Sat Feb 11 12:38:13 EST 1995) ready. Name (avenger.ecsel.psu.edu:jhm): 331 Password required for jhm. Password: 230 User jhm logged in. ftp> ls -FC Look at files on avenger 200 PORT command successful. 150 Opening ASCII mode data connection for /bin/ls. bin/ hw8/ newton1.f questions.wp trig.output cannon.wp iftests.f o.cshrc tedi.ini* trig3.f factorial.f inter1.f o.forward test/ tutor.vi homework/ inter2.f old.cshrc test.f hw3-in/ mbox outline trig.f 226 Transfer complete. ftp> get newton1.f Bring the file "newton1.f onto farman 200 PORT command successful. 150 Opening ASCII mode data connection for newton1.f (1160 bytes). 226 Transfer complete. local: newton1.f remote: newton1.f 1205 bytes received in 0.062 seconds (19 Kbytes/s) ftp> cd test Change to subdirectory "test" on avenger 250 CWD command successful. ftp> put good.f Copy the file "good.f" from the current directory of farman into the "test" directory of avenger. 200 PORT command successful. 150 Opening ASCII mode data connection for good.f. 226 Transfer complete. local: good.f remote: good.f 610 bytes sent in 0.033 seconds (18 Kbytes/s) ftp> quit
You should also know the ftp commands: "?" for help; "mget" to put multiple files using the "*" wildcard; and "mput" to put multiple files. "mget *.f" gets all files having names ending with ".f".
When I telnet from my home computer, I sometimes have a problem copying files from your directory, like trig.f. What is the correct procedure?
Use the "cd" command to put you in the directory (on the Hammond machine) where you want my file then type:
cp ~jhm/201/trig.f .
Don't forget that last period, or the space before the period. Sometimes, I screw-up and don't set the right protections on such files. If you get a message about wrong protections or privileges, send me mail. Note that if you want to copy such files to your own PC, the "cp" command is of no use. The easiest thing you can do is to open the file through Netscape then use the "Save as" option from the "File" menu.
How actually do we download the LINPACK subroutines after we see them? Should we be doing it on a Workstation?
On the NETSCAPE "File" menu you should find a "Save as" item. Click it, and select a name and subdirectory for your file. You will get the job done quicker if you do this on a Workstation. If you do it on a PC, you will then have to use FTP to move the file (be sure to click the ASCII button on the FTP transfer window).
The first thing to do is check the items on the HELP menu. One or two of them are usually pretty good self help tutorials for the SpreadSheet (the items usually contain words like "Introducing" or "Learning"). Sit down at a spread sheet, use the mouse to point at the cell (box) in the upper right corner (column A, row 1) and type in a number followed by a return. This cell is named "A1". Do the same thing in the cell below (A2). Now point to A3 and type "=A1+A2", followed by a return. What happens? Beginning your entry with "=" signals the spread sheet that you are entering a formula to be evaluated. In cell A4 try entering "=sum(A1:A2)". Use the help, play for a while, and stop by my office if you have questions. If you want to try something tricky with EXCEL, I may be able to help, or can guide you to the right information in my manual set.
I still don't understand how you can Design a program to use pipelining.
The full answer to that question takes another 2 or 3 courses. The starting point is to group calculations so that the same thing is done for a large group of array elements with no dependence on the results of any other calculations in the group. In this grouping you want to minimize the number of IF tests. Too many of these, and a compiler will give up trying to vectorize. As you get more experience in problem solving with computers, you will discover that this is not always easy, and at times you have to rule out one solution method in favor of another less elegant one to get best computational speed. I'm not trying to turn you into a pipelining expert, just trying to show you where to start looking for extra speed.
What is Mathematica?
It is a mix of computer language, expert system, and symbolic algebra. Languages like Fortran, C, and Pascal really only deal with numbers and simple character manipulations in any easy way. Getting Fortran to solve the equation Ax3+Bx2+Cx+D=0 for x in terms of the symbols A, B, C, and D (no numbers assigned to A, B, C, or D) is a major programming effort. Mathematica does the job with a single command:
Solve(A*x^3+B*x^2+C*x+D==0,x). A similar situation exists for factoring the expression x2+x-12, and a large number of other related problems that have been inflicted on you over the years in math and science. Although people rarely explain it to you, such problems continue to crop up throughout your professional life, and programs like Mathematica are useful tools for speeding your manipulation of equations, and double-checking hand done algebra and calculus.
I have Mathcad on my PC. Can I use it instead of Mathematica?
Yes. It will probably be best for you to just give me a copy of the Mathcad printout.
Why do Mathematica commands start with a capital letter?
That way if you stick to all lower case letters on the variables you define within Mathematica you won't trip over Mathematica commands or internal Mathematica variables and functions.
How do you wrap around long equations in Mathematica?
Pick a point where the equation is obviously not complete (right after a +, - *, ^, or before all parentheses are balanced), hit the RETURN (ENTER) key and keep going. Mathematica will figure out what you are doing. The other method is to just type a "\" before the RETURN (ENTER) key.
Yes, NETLIB is one of hundreds of public repositories for computer programs. It happens to be the best maintained and most relevant to our disciplines, but you should not restrict your searches there. I'll leave it to you to learn how to use the Web (Mosaic, Netscape, etc) search engines. They are relatively simple and self-documented. I will introduce you to an older site searcher called "archie" that may also by useful and can be used from any dumb terminal.
How do you know what all of the Programs do on Netlib? Would you teach us more about it?
Simple answer is that I don't know what they all do. There are so many, and many have very specialized methods that take a while to appreciate. You need to go to Netlib with an application in mind, then use the search function to see what you can find. Also, if you look in the section opened when you click on "browse", you will find a highlighted phrase that lets you get more description of items like "linpack", "minpack", "itpack". I'll try to do some more with Netlib when we start solving differential equations.
Basically. You point to the background, hold down the right mouse button, and drag down to select the quit (exit?) item from the menu that has appeared. You will be asked to confirm this decision before it actually lets you off.
Is my work saved when I log off of the Hammond workstations?
.How Do I paste between windows.
Basically the same way you copy and paste in a Word Processor. Highlight the portion of one window that you want to copy by holding down the left mouse button while you drag the mouse cursor. If you are connected through Telnet, select the copy item from the Edit menu of your terminal session. If you are using an Xterm do nothing more in that window. In the other window you must have the file, where want to paste, open with an editor (for now vi) and in text insertion mode with the cursor at the position where you want the text. Click on the destination window. If you are connected through Telnet, select the paste item from the Edit menu of your terminal session. If you are using an Xterm click the center button of the mouse. The copied text should appear in the second window.
How exactly do you get two screens?
I assume you are working from a PC. The way to do it is to open two separate Telnet sessions. After you start the first, point at the bottom line of the window with the mouse hold down the left mouse button, and push the bottom up to shrink the window to about half the height of your full computer screen. Point at the title bar at the top of the Telnet window, hold down the left mouse button and push the Telnet window up or down until you can see the Telnet icon again in the Internet Access group. Double click the icon to start the second session, perhaps logging into a different Hammond machine. Repeat the resize operation and move the windows until they are both visible.
Maintained by John Mahaffy : email@example.com