|
Compiling code on MAC and Linux platforms
All the code we will be developing in the course can be compiled to run on your local MAC or Linux
machine. To do this you need to copy all files from the Upsilon cluster to your own machine. This
you can do very easily using the scp command. Whenever you are asked to use the command
cp
you simply replace it with
scp XXXX@login.cbs.dtu.dk:
where XXXX is you login for the Upsilon cluster.
That is, if you are asked to do the following command
cp -R /usr/opt/www/pub/CBS/courses/27625.algo/exercises/code/utils .
you simply type
scp -r XXXX@login.cbs.dtu.dk:/usr/opt/www/pub/CBS/courses/27625.algo/exercises/code/utils .
and for
cp /usr/opt/www/pub/CBS/courses/27625.algo/exercises/data/Cprog/* ./data/
you use
scp XXXX@login.cbs.dtu.dk:/usr/opt/www/pub/CBS/courses/27625.algo/exercises/data/Cprog/"*" ./data/
This will copy the directory /usr/opt/www/pub/CBS/courses/27625.algo/exercises/code/utils and its i
content to where you are now (".").
Note, that the -R used for the cp command to copy recursively is replaced with -r for the
scp command.
Next, you need to compile the utils library of C routine with a MAC/Linux specific Makefile. Such files are all ready
part of the utils directory. To compile type
cd
cd utils
make clean
make
cd
Remember to setup your local machine as described in the UNIX exervise of the course.
Once this is done, you should be independent of the Upsilon linux cluster system.
Both MAC and Linux operating system commands are 99% identical to unix, so once the files have be transferred, you can
work as if you were on a unix platform.
|