The following tutorial will show you how to test if your account
set up is ok by building an executable code in your working
directory. It will present the steps from how to login to a linux
machine in the Andrew cell to the execution of a compiled code
and plotting of the results. You will find here typical steps you
will be using to get your own code running.
You will only be able to complete this task if you have already
established a CS ID and set the Sundance and Trilinos environment
variables correctly (refer to the setup
and sundance pages for that).
-
telnet (or ssh) to a linux machine in Andrew:
%> telnet linux.andrew.cmu.edu
-
authenticate to the CS cell:
%> aklog cs.cmu.edu
-
verify that you have been authenticated (if not, try again):
%> klist
-
go to your working directory (let's say you are moby):
%> cd /afs/cs/project/taos-15/home/moby
-
copy the Makefile to your working directory:
%> cp ../../src/Makefile .
-
check that you did copy the Makefile by listing your directory
contents (if not there, try again):
%> ls
-
copy the file heat1D.cpp from the examples directory to your
working directory:
%> cp ../../src/Sundance/examples/Tests/heat1D.cpp .
-
check that the file has been copied:
%> ls
-
you should be ready now to build the executable heat1D.e:
%> make heat1D.e
-
if everything goes fine, run the compiled and liked code:
%> ./heat1D.e
you should have an output of the executable in your shell
similar to the one saw in class.
-
executing heat1D.e will create the file heat1D.dat, the results
of the problem, in your working directory; you can use Matlab
to plot the results. But first you need to copy the plot1D.m
file to your working directory:
%> cp ../../src/Sundance/examples/plot1D.m .
and since you are here, proceed the same way
and copy the other two plotting function files plot2D.m and
plot3D.m - you will likely need them later.
-
launch Matlab in the desktop mode and plot the results
(note: matlab -help is your friend):
%> matlab -nodesktop
and once you are in Matlab
>> plot1D heat1D.dat
you should obtain a plot similar to the one shown below:
If you get to this point and obtain a plot, you are ready
to start building your own executables.
|