Skip to content

Commit

Permalink
Merge branch 'feature/ga-sparse' of github.com:GlobalArrays/ga into f…
Browse files Browse the repository at this point in the history
…eature/ga-sparse

Conflicts:
	global/src/ga_sparse.array.h
	global/src/sparse.array.c
	global/testing/sprs_test.c
  • Loading branch information
Bruce J Palmer committed Dec 5, 2024
2 parents 5ec73e3 + 646bf5d commit 2a121b9
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 7 deletions.
2 changes: 1 addition & 1 deletion global/src/sparse.array.c
Original file line number Diff line number Diff line change
Expand Up @@ -2432,7 +2432,7 @@ void update_map(Integer **top, Integer **list, Integer **idx, Integer **jdx,
_type val_a = ((_type*)data_a)[_idxa[i-ilo_a]+k]; \
for (j=0; j<jcols; j++) { \
Integer jj = _jdxb[_idxb[kdx-ilo_b]+j]+1; \
/* _type val_b = ((_type*)data_b[jj-jlo_b]; */ \
/* _type val_b = ((_type*)data_b)[jj-jlo_b]; */ \
_type val_b = ((_type*)data_b)[_idxb[kdx-ilo_b]+j]; \
/* Check to see if c_ij already exists */ \
Integer ldx = ((i-1)*jdim+jj-1)%bufsize; \
Expand Down
15 changes: 9 additions & 6 deletions global/testing/sprs_test.c
Original file line number Diff line number Diff line change
Expand Up @@ -1668,7 +1668,7 @@ void matrix_test(int type)
for (i=0; i<2*dim*dim; i++) ((double*)cp)[i] = 0.0;
}
/* Compare results from regular matrix-matrix multiply with
* sparse-dense matrix-matrix multiply */
* dense-sparse matrix-matrix multiply */
ok = 1;
lo[0] = 0;
hi[0] = dim-1;
Expand Down Expand Up @@ -1941,6 +1941,7 @@ void matrix_test(int type)

int main(int argc, char **argv) {
int me,nproc;
int eight = 8;

/**
* Initialize GA
Expand All @@ -1952,15 +1953,16 @@ int main(int argc, char **argv) {

me = GA_Nodeid();
nproc = GA_Nnodes();
if (me == 0) {
printf("\nTesting sparse matrices of size %d x %d on %d processors\n\n",
NDIM,NDIM,nproc);
}
if (eight == SIZEOF_F77_INTEGER) {
if (me == 0) {
printf("\nTesting sparse matrices of size %d x %d on %d processors\n\n",
NDIM,NDIM,nproc);
}

if (sizeof(Integer) == 8) {
/**
* Test different data types
*/
#if 1
if (me == 0) {
printf("\nTesting matrices of type int\n");
}
Expand All @@ -1986,6 +1988,7 @@ int main(int argc, char **argv) {
}
matrix_test(C_DBL);

#endif
if (me == 0) {
printf("\nTesting matrices of type single complex\n");
}
Expand Down

0 comments on commit 2a121b9

Please sign in to comment.