Summary
This lecture is a practical introduction to the tools you will need to develop, build, and run parallel programs. A summary of Unix, its history and philosophy, the shell and basic shell commands, the file system, permissions, bash, shell variables, text editors (esp. emacs), Make, and Subversion.
Slides for this lecture: 02_unix.pdf
Videos
Code Examples
1 2 |
/* header1.h */ int f(int x); |
1 2 |
/* header2.h */ int g(int x); |
1 2 3 4 5 6 |
/* source1.c */ #include "header1.h" int f(int x) { return x+10; } |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 |
/* source2.c */ #include<stdio.h> #include "header1.h" #include "header2.h" int g(int x) { return 20*x; } int main (int argc, char *argv[]) { printf("Hello, world.\n"); printf("f(5)=%d\n", f(5)); printf("g(5)=%d\n", g(5)); fflush(stdout); return 0; } |
1 2 3 4 5 6 7 8 9 10 11 |
app: source1.o source2.o cc -o app source1.o source2.o source1.o: source1.c header1.h cc -c source1.c source2.o: source2.c header1.h header2.h cc -c source2.c clean: rm -f app *.o *~ |