Skip to content

Commit 6256a73

Browse files
committed
AOCC compilation error for array initialisation fixed
Array initialisation was giving error with clang++ ,fixed Loop counts in get_matrix_*.sh scripts corrected to eliminate error Readme.md formatting corrected for proper display in gerrit. Change-Id: I86ba9f30e09ab1600dc6d6c55bd69d76354fad33 Signed-off-by: Chithra Sankar <[email protected]>
1 parent ad48d33 commit 6256a73

File tree

8 files changed

+23
-89
lines changed

8 files changed

+23
-89
lines changed

README.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -13,11 +13,11 @@ Optional:
1313
#### CMake
1414
All compiler specifications are determined automatically.
1515

16-
# After cloning aocl-sparse source to aocl-sparse directory.
17-
# Go to aocl-sparse directory, create and go to the build directory
18-
cd aocl-sparse
19-
mkdir -p build/release
20-
cd build/release
16+
After cloning aocl-sparse, Go to aocl-sparse directory, create and go to the build directory
17+
```
18+
cd aocl-sparse;
19+
mkdir -p build/release;
20+
cd build/release;
2121
2222
# Configure aocl-sparse
2323
# Build options:
@@ -26,8 +26,7 @@ cd build/release
2626
# BUILD_SHARED_LIBS - build aocl-sparse as a shared library (ON)
2727
2828
# Build shared library (default)
29-
# if CMAKE_INSTALL_PREFIX is not provided then /opt/aoclsparse/ is the default location
30-
# which contains lib/ and include/ directory files.
29+
if CMAKE_INSTALL_PREFIX is not provided then /opt/aoclsparse/ is the default location which contains lib/ and include/ directory files.
3130
cmake ../.. -DCMAKE_INSTALL_PREFIX="<Directory_path>"
3231
3332
# Build
@@ -36,26 +35,30 @@ make
3635
# Install
3736
[sudo] make install
3837
39-
# Build static library as well
38+
# Build static library
4039
cmake -DBUILD_SHARED_LIBS=OFF ../../
4140
make install
41+
```
4242

43-
## Benchmarks
43+
#### Benchmarks
4444
To run benchmarks, aocl-sparse has to be built with option -DBUILD_CLIENTS_BENCHMARKS=ON.
4545

4646
cmake -DBUILD_CLIENTS_BENCHMARKS=ON ../../
4747
make install
4848

49-
# Go to aocl-sparse build directory
49+
#### Simple Test
50+
Test the installation by running CSR-SPMV on scircuit.mtx file, e.g.
51+
```
5052
cd aocl-sparse/build/release
51-
52-
# Test the installation by running CSR-SPMV on scircuit.mtx file, e.g.
5353
wget https://sparse.tamu.edu/MM/Hamm/scircuit.tar.gz
5454
tar xf scircuit.tar.gz; mv scircuit ./scircuit.mtx && rm -rf scircuit.tar.gz scircuit
5555
./tests/staging/aoclsparse-bench -f csrmv --precision d --alpha 1 --beta 0 --iters 1000 --mtx ./scircuit.mtx/scircuit.mtx
56+
```
5657

57-
# Test the installation by running CSR-SPMV on randomly generated matrix, e.g.
58+
Test the installation by running CSR-SPMV on randomly generated matrix, e.g.
59+
```
5860
./tests/staging/aoclsparse-bench -f csrmv --precision d -m 1000 -n 1000 -z 4000 -v 1
61+
```
5962

6063
## License
6164
The [license file][LICENSE.md] can be found in the main repository.

tests/benchmarks/ellmv.sh

Lines changed: 0 additions & 70 deletions
This file was deleted.

tests/benchmarks/matrices/get_matrices_1.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ url=(https://sparse.tamu.edu/MM/Williams
2323
https://sparse.tamu.edu/MM/Hamm
2424
)
2525

26-
for i in {0..9}; do
26+
for i in {0..8}; do
2727
m=${matrices[${i}]}
2828
u=${url[${i}]}
2929
if [ ! -f ${m}.csr ]; then

tests/benchmarks/matrices/get_matrices_2.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ url=(https://sparse.tamu.edu/MM/Williams
2121
https://sparse.tamu.edu/MM/PARSEC
2222
)
2323

24-
for i in {0..8}; do
24+
for i in {0..7}; do
2525
m=${matrices[${i}]}
2626
u=${url[${i}]}
2727
if [ ! -f ${m}.csr ]; then

tests/benchmarks/matrices/get_matrices_3.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ url=(https://sparse.tamu.edu/MM/GHS_psdef
2121
https://sparse.tamu.edu/MM/Muite
2222
)
2323

24-
for i in {0..8}; do
24+
for i in {0..7}; do
2525
m=${matrices[${i}]}
2626
u=${url[${i}]}
2727
if [ ! -f ${m}.csr ]; then

tests/benchmarks/matrices/get_matrices_4.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ url=(https://sparse.tamu.edu/MM/FEMLAB
2121
https://sparse.tamu.edu/MM/GHS_psdef
2222
)
2323

24-
for i in {0..8}; do
24+
for i in {0..7}; do
2525
m=${matrices[${i}]}
2626
u=${url[${i}]}
2727
if [ ! -f ${m}.csr ]; then

tests/benchmarks/matrices/get_matrices_5.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ url=(https://sparse.tamu.edu/MM/GHS_indef
2121
https://sparse.tamu.edu/MM/PARSEC
2222
)
2323

24-
for i in {0..8}; do
24+
for i in {0..7}; do
2525
m=${matrices[${i}]}
2626
u=${url[${i}]}
2727
if [ ! -f ${m}.csr ]; then

tests/include/aoclsparse_init.hpp

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -208,7 +208,8 @@ inline void aoclsparse_init_coo_matrix(std::vector<aoclsparse_int>& row_ind,
208208
}
209209

210210
// Uniform distributed row indices
211-
aoclsparse_int occ_row_ind[M] ={0}, rand_row_ind;
211+
aoclsparse_int rand_row_ind;
212+
std::vector<aoclsparse_int> occ_row_ind(M, 0);
212213
for(; i < nnz; ++i)
213214
{
214215
do

0 commit comments

Comments
 (0)