This repository synthesizes the projects of the Concurrent Programming (SSC0143) course in the second semester of 2015 on the University of São Paulo (USP) Brazil.
The result analysis can be found under [project folder]/doc/report.pdf
The code in here uses TAB character and assumes your editor uses 4 spaces for such characters.
Objective of this project is to execute the Jacobi Method for linear equation systems and compare sequential and concurrent executions.
Input files require the following format:
size-of-the-system # Number of equations in the system
row-test # The row to be used to verify the result
error # The precision we are aiming for
max-iterations # Maximum number of iterations. after this the program will exit
a00 a01 a02 ... a0n # First line of the coefficients matrix
a10 a11 a12 ... a1n # and so on
...
an0 an1 an2 ... ann
b0 # First line of the constants matrix
b1 # and so on
...
bn
Example input files can be found in ./project1/doc/inputs/
To compile run:
make
or
gcc -o ./bin/prog -I ./lib/ -lm -pthread -lrt ./src/*.c
To execute run:
./bin/prog input-file-name [ number-of-threads [ number-of-times-to-execute [ output-file-name ] ] ]
Defalut values are:
number-of-threads 1
number-of-times-to-execute 1
output-file-name none