Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions experimental/algorithm/LAGr_MaxFlow.c
Original file line number Diff line number Diff line change
Expand Up @@ -723,7 +723,9 @@ int LAGr_MaxFlow
GrB_Vector invariant = NULL ;
GrB_BinaryOp CheckInvariant = NULL ;
GrB_Scalar check = NULL ;
#ifdef DBG
bool check_raw;
#endif

// descriptor for matrix building
GrB_Descriptor desc = NULL ;
Expand Down
3 changes: 0 additions & 3 deletions experimental/benchmark/FastAssign_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -50,10 +50,7 @@ int main (int argc, char **argv)
GrB_Index *rand_a = NULL;
GrB_Scalar bool1 = NULL;
bool *set_a = NULL;
GrB_Index r_size = 0, ramp_size = 0, junk_size = 0;
bool iso = false;

bool *val_of_P = NULL;
double t = LAGraph_WallClockTime ( ) ;
GrB_Index size = (argc > 1) ? atoll(argv [1]) : 1000 ;
int shift_e = 63 - (int) floor (log2 ((double) size)) ;
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/Incidence_Matrix_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/SwapEdges_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -57,7 +57,7 @@ int main (int argc, char **argv)

double t = LAGraph_WallClockTime ( ) ;
GrB_Index swaps = (argc > 2) ? atoi(argv [2]): 100;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
FILE *f = (argc > 3) ? fopen (argv[3], "w"): NULL;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
Expand Down
1 change: 0 additions & 1 deletion experimental/benchmark/apply_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ int main(int argc, char **argv)
{
char msg [LAGRAPH_MSG_LEN] ;

LAGraph_Graph G = NULL ;
GrB_Matrix A = NULL ;
GrB_Matrix Res = NULL ;
GrB_Scalar s = NULL ;
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/build_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
1 change: 0 additions & 1 deletion experimental/benchmark/coarsen_matching_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -150,7 +150,6 @@ int main(int argc, char **argv)

for (int trial = 0 ; trial < ntrials ; trial++)
{
int64_t seed = trial * n + 1 ;
double tt = LAGraph_WallClockTime ( ) ;

LG_TRY (LAGraph_Coarsen_Matching (&coarsened, &parent_result, &newlabel_result, &inv_newlabel_result, G, LAGraph_Matching_heavy, 0, 1, DEFAULT_SEED, msg)) ;
Expand Down
4 changes: 2 additions & 2 deletions experimental/benchmark/coloring_IS_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main (int argc, char **argv)
//--------------------------------------------------------------------------

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand All @@ -58,14 +58,14 @@ int main (int argc, char **argv)

t = LAGraph_WallClockTime ( ) ;
int status = (LAGraph_coloring_independent_set (&C, &num_colors, G, msg)) ;
LG_TRY(status);
alg_time = LAGraph_WallClockTime ( ) - t ;
printf ("Time for IS Coloring: %g sec\n", alg_time) ;

//--------------------------------------------------------------------------
// check the results
//--------------------------------------------------------------------------

bool isequal ;
t = LAGraph_WallClockTime ( ) ;
LAGRAPH_TRY (LG_check_coloring(G, C, msg)) ;
t = LAGraph_WallClockTime ( ) - t ;
Expand Down
4 changes: 2 additions & 2 deletions experimental/benchmark/coloring_MIS_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ int main (int argc, char **argv)
//--------------------------------------------------------------------------

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand All @@ -58,14 +58,14 @@ int main (int argc, char **argv)

t = LAGraph_WallClockTime ( ) ;
int status = (LAGraph_coloring_MIS (&C, &num_colors, G, msg)) ;
LG_TRY(status);
alg_time = LAGraph_WallClockTime ( ) - t ;
printf ("Time for MIS Coloring: %g sec\n", alg_time) ;

//--------------------------------------------------------------------------
// check the results
//--------------------------------------------------------------------------

bool isequal ;
t = LAGraph_WallClockTime ( ) ;
LAGRAPH_TRY (LG_check_coloring(G, C, msg)) ;
t = LAGraph_WallClockTime ( ) - t ;
Expand Down
1 change: 0 additions & 1 deletion experimental/benchmark/colscale_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ int main(int argc, char **argv)
{
char msg [LAGRAPH_MSG_LEN] ;

LAGraph_Graph G = NULL ;
GrB_Matrix D = NULL ;
GrB_Matrix A = NULL ;
GrB_Matrix Res = NULL ;
Expand Down
2 changes: 0 additions & 2 deletions experimental/benchmark/dnn_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ int LAGraph_tsvread
// create the output matrix
//--------------------------------------------------------------------------

GrB_Info info ;
GrB_Matrix C = NULL ;
(*Chandle) = NULL ;
GRB_TRY (GrB_Matrix_new (&C, type, nrows, ncols)) ;
Expand Down Expand Up @@ -183,7 +182,6 @@ int main (int argc, char **argv)
// start LAGraph and GraphBLAS
//--------------------------------------------------------------------------

GrB_Info info ;
char msg [LAGRAPH_MSG_LEN] ;
LG_TRY (LAGraph_Init (NULL)) ;

Expand Down
6 changes: 3 additions & 3 deletions experimental/benchmark/dot3_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down Expand Up @@ -85,14 +85,14 @@ int main (int argc, char **argv)
printf ("GrB_mxm: C<A> = A*A', %d trials\n", NTRIALS) ;

t = LAGraph_WallClockTime ( ) ;
double t1 = t ;
// double t1 = t ;
for (int k = 0 ; k < NTRIALS ; k++)
{
// C<A,struct> = A*A'
GRB_TRY (GrB_mxm (C, A, NULL, LAGraph_plus_one_uint32, A, A,
GrB_DESC_RST1)) ;
double tt = LAGraph_WallClockTime ( ) - t1 ;
#if 0
double tt = LAGraph_WallClockTime ( ) - t1 ;
if (tt > 3)
{
printf ("%d ok, %g sec\n", k, LAGraph_WallClockTime ( ) - t) ;
Expand Down
3 changes: 1 addition & 2 deletions experimental/benchmark/edgeBetweennessCentrality_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ double difference(GrB_Matrix bc, GrB_Matrix reference_bc)
GrB_free(&diff) ;

return err ;
} ;
}

int main (int argc, char **argv)
{
Expand All @@ -41,7 +41,6 @@ int main (int argc, char **argv)
LAGraph_Graph G = NULL;
GrB_Matrix centrality = NULL, A = NULL;
GrB_Vector sources = NULL;
GrB_Info info;

// start GraphBLAS and LAGraph
LAGRAPH_TRY (LAGraph_Init (msg));
Expand Down
2 changes: 0 additions & 2 deletions experimental/benchmark/fglt_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ int main (int argc, char **argv)

GrB_Matrix A = NULL ;
GrB_Matrix Fnet = NULL ;
GrB_Matrix Abool = NULL ;
FILE *f = NULL ;

// start GraphBLAS and LAGraph
Expand Down Expand Up @@ -115,7 +114,6 @@ int main (int argc, char **argv)

for (int trial = 0 ; trial < ntrials ; trial++)
{
int64_t seed = trial * n + 1 ;
double tt = LAGraph_WallClockTime ( ) ;
LAGRAPH_TRY (LAGraph_FastGraphletTransform (&Fnet, G, true, msg)) ;
tt = LAGraph_WallClockTime ( ) - tt ;
Expand Down
3 changes: 2 additions & 1 deletion experimental/benchmark/hdip_fiedler_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -257,7 +257,7 @@ int main(int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime();
char *matrix_name = (argc > 1) ? argv[1] : "stdin";
//char *matrix_name = (argc > 1) ? argv[1] : "stdin";

LG_TRY(readproblem(
&G, // the graph that is read from stdin or a file
Expand Down Expand Up @@ -327,6 +327,7 @@ int main(int argc, char **argv)

t = LAGraph_WallClockTime( );
int result = LAGraph_mypcg2(&steper, &k, Y, u, alpha, indiag, x, .000001, 50, msg);
LG_TRY(result);
t = LAGraph_WallClockTime( ) - t;
printf("Time for LAGraph_mypcg2: %g sec\n", t);

Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/helloworld_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
3 changes: 1 addition & 2 deletions experimental/benchmark/hits_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down Expand Up @@ -101,4 +101,3 @@ int main (int argc, char **argv)
LG_TRY (LAGraph_Finalize (msg)) ;
return (GrB_SUCCESS) ;
}

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Don't delete this line. I use these to navigate with vim. If gcc 16 is complaining about it, then it would complain in 100s of places in my codes, and the warning should just be silenced instead.

Copy link
Copy Markdown
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The last line had some trailing white space. I removed it, now it is similar to all the other files. Difficult to tell by the web diff.

3 changes: 1 addition & 2 deletions experimental/benchmark/kt_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,6 @@ int main (int argc, char **argv)

char msg [LAGRAPH_MSG_LEN] ; // for error messages from LAGraph
LAGraph_Graph G = NULL ;
GrB_Matrix C = NULL, R = NULL ;
GrB_Matrix *Cset = NULL ;
int64_t *ntris = NULL, *nedges = NULL, *nsteps = NULL ;

Expand All @@ -56,7 +55,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/mcl_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@ int main(int argc, char **argv)
// read in the graph
//--------------------------------------------------------------------------

char *matrix_name = (argc > 1) ? argv[1] : "stdin";
//char *matrix_name = (argc > 1) ? argv[1] : "stdin";
LAGRAPH_TRY(
readproblem(&G, NULL, false, false, false, NULL, false, argc, argv));

Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/mcm_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -143,7 +143,7 @@ int main(int argc, char **argv)
fflush(stdout);
return 0;
}
char *matrix_name = (argc > 1) ? argv[1] : "stdin";
//char *matrix_name = (argc > 1) ? argv[1] : "stdin";

bool make_symmetric = false, remove_self_edges = false, structural = true,
ensure_positive = false;
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/msf_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/peer_pressure_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ int main(int argc, char **argv)
// read in the graph
//--------------------------------------------------------------------------

char *matrix_name = (argc > 1) ? argv[1] : "stdin";
//char *matrix_name = (argc > 1) ? argv[1] : "stdin";
LAGRAPH_TRY(
readproblem(&G, NULL, false, false, false, NULL, false, argc, argv));

Expand Down
2 changes: 1 addition & 1 deletion experimental/benchmark/rcc_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ int main (int argc, char **argv)
// mtx2bin_demo).

double t = LAGraph_WallClockTime ( ) ;
char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
//char *matrix_name = (argc > 1) ? argv [1] : "stdin" ;
LG_TRY (readproblem (
&G, // the graph that is read from stdin or a file
NULL, // source nodes (none, if NULL)
Expand Down
5 changes: 0 additions & 5 deletions experimental/benchmark/rowscale_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@ int main(int argc, char **argv)
{
char msg [LAGRAPH_MSG_LEN] ;

LAGraph_Graph G = NULL ;
GrB_Matrix D = NULL ;
GrB_Matrix B = NULL ;
GrB_Matrix Res = NULL ;
Expand All @@ -27,10 +26,6 @@ int main(int argc, char **argv)
bool burble = false ;
demo_init (burble) ;

GrB_Index n = (argc > 2 ? atoi (argv [2]) : DEFAULT_SIZE) ;
double density = (argc > 3 ? atof (argv [3]) : DEFAULT_DENSITY) ;
uint64_t seed = (argc > 4 ? atoll (argv [4]) : DEFAULT_SEED) ;

int ntrials = 10 ;

for (int i = 0 ; i < ntrials ; i++) {
Expand Down
3 changes: 1 addition & 2 deletions experimental/benchmark/select_demo.c
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,6 @@ int main(int argc, char **argv)
{
char msg [LAGRAPH_MSG_LEN] ;

LAGraph_Graph G = NULL ;
GrB_Matrix A = NULL ;
GrB_Matrix Res = NULL ;
GrB_Scalar s = NULL ;
Expand All @@ -44,7 +43,7 @@ int main(int argc, char **argv)

GRB_TRY (GrB_Matrix_new (&Res, GrB_FP64, n, n)) ;

GrB_Index D_nvals, A_nvals ;
GrB_Index A_nvals ;
GRB_TRY (GrB_Matrix_nvals (&A_nvals, A)) ;
printf ("nvals: A: %" PRIu64 "\n", A_nvals) ;

Expand Down
2 changes: 1 addition & 1 deletion experimental/test/test_SquareClustering.c
Original file line number Diff line number Diff line change
Expand Up @@ -100,7 +100,7 @@ void test_SquareClustering (void)
OK (LAGraph_Delete (&G, msg)) ;

LAGraph_Finalize (msg) ;
};
}

TEST_LIST = {
{"SquareClustering", test_SquareClustering},
Expand Down
2 changes: 0 additions & 2 deletions experimental/test/test_cdlp.c
Original file line number Diff line number Diff line change
Expand Up @@ -130,8 +130,6 @@ void test_errors (void)
OK (LAGraph_DeleteSelfEdges (G, msg)) ;
OK (LAGraph_Cached_IsSymmetricStructure (G, msg)) ;

GrB_Vector c = NULL ;

// c is NULL
int result = LAGraph_cdlp (NULL, G, 100, msg) ;
printf ("\nresult: %d\n", result) ;
Expand Down
1 change: 0 additions & 1 deletion experimental/test/test_dnn.c
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,6 @@ void teardown (void)

void test_dnn (void)
{
GrB_Info info ;
setup ( ) ;

#define NLAYERS 30
Expand Down
2 changes: 0 additions & 2 deletions experimental/test/test_lcc.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,8 +141,6 @@ void test_errors (void)
OK (LAGraph_Cached_IsSymmetricStructure (G, msg));
OK (LAGraph_Cached_NSelfEdges (G, msg)) ;

GrB_Vector c = NULL ;

// c is NULL
int result = LAGraph_lcc (NULL, G, msg) ;
printf ("\nresult: %d\n", result) ;
Expand Down
1 change: 0 additions & 1 deletion experimental/test/test_msf.c
Original file line number Diff line number Diff line change
Expand Up @@ -206,7 +206,6 @@ void test_inf_msf (void)

// load the matrix as A
const char *aname = "bcsstk13.mtx" ;
bool symmetric = 1 ;
printf ("\n================================== %s:\n", aname) ;
TEST_CASE (aname) ;
snprintf (filename, LEN, LG_DATA_DIR "%s", aname) ;
Expand Down
1 change: 0 additions & 1 deletion experimental/test/test_mxm.c
Original file line number Diff line number Diff line change
Expand Up @@ -35,7 +35,6 @@ GrB_Matrix A = NULL, B = NULL, C2 = NULL, Cin = NULL, C = NULL ;
void test_mxm (void)
{

GrB_Info info ;
OK (LAGraph_Init (msg)) ;
uint64_t n = 256 ;
uint64_t seed = 0 ;
Expand Down
2 changes: 1 addition & 1 deletion include/LAGraphX.h
Original file line number Diff line number Diff line change
Expand Up @@ -261,7 +261,7 @@ int LAGraph_Incidence_Matrix
) ;

LAGRAPHX_PUBLIC
int LAGraph_Hash_Vector
GrB_Info LAGraph_Hash_Vector
(
uint64_t *hash,
GrB_Vector v,
Expand Down
Loading