1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 412 413 414 415 416 417 418 419 420 421 422 423 424 425 426 427 428 429 430 431 432 433 434 435 436 437 438 439 440 441 442 443 444 445 446 447 448 449 450 451 452 453 454 455 456 457 458 459 460 461 462 463 464 465 466 467 468 469 470 471 472 473 474 475 476 477 478 479 480 481 482 483 484 485 486 487 488 489 490 491 492 493 494 495 496 497 498 499 500 501 502 503 504 505 506 507 508 509 510 511 512 513 514 515 516 517 518 519 520 521 522 523 524 525 526 527 528 529 530 531 532 533 534 535 536 537 538 539 540 541 542 543 544 545 546 547 548 549 550 551 552 553 554 555 556 557 558 559 560 561 562 563 564 565 566 567 568 569 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 592 593 594 595 596 597 598 599 600 601 602 603 604 605 606 607 608 609 610 611 612 613 614 615 616 617 618 619 620 621 622 623 624 625 626 627 628 629 630 631 632 633 634 635 636 637 638 639 640 641 642 643 644 645 646 647 648 649 650 651 652 653 654 655 656 657 658 659 660 661 662 663 664 665 666 667 668 669 670 671 672 673 674 675 676 677 678 679 680 681 682 683 684 685 686 687 688 689 690 691 692 693 694 695 696 697 698 699 700 701 702 703 704 705 706 707 708 709 710 711 712 713 714 715 716 717 718 719 720 721 722 723 724 725 726 727 728 729 730 731 732 733 734 735 736 737 738 739 740 741 742 743 744 745 746 747 748 749 750 751 752 753 754 755 756 757 758 759 760 761 762 763 764 765 766 767 768 769 770 771 772 773 774 775 776 777 778 779 780 781 782 783 784 785 786 787 788 789 790 791 792 793 794 795 796 797 798 799 800 801 802 803 804 805 806 807 808 809 810 811 812 813 814 815 816 817 818 819 820 821 822 823 824 825 826 827 828 829 830 831 832 833 834 835 836 837 838 839 840 841 842 843 844 845 846 847 848 849 850 851 852 853 854 855 856 857 858 859 860 861 862 863 864 865 866 867 868 869 870 871 872 873 874 875 876 877 878 879 880 881 882 883 884 885 886 887 888 889 890 891 892 893 894 895 896 897 898 899 900 901 902 903 904 905 906 907 908 909 910 911 912 913 914 915 916 917 918 919 920 921 922 923 924 925 926 927 928 929 930 931 932 933 934 935 936 937 938 939 940 941 942 943 944 945 946 947 948 949 950 951 952 953 954 955 956 957 958 959 960 961 962 963 964 965 966 967 968 969 970 971 972 973 974 975 976 977 978 979 980 981 982 983 984 985 986 987 988 989 990 991 992 993 994 995 996 997 998 999 1000 1001 1002 1003 1004 1005 1006 1007 1008
|
From: Cordell Bloor <cgmb@slerp.xyz>
Date: Sat, 8 Jul 2023 02:35:30 -0600
Subject: allow missing matrix data in tests
Changes applied using:
find -name '*pp' -exec perl -i -p0e \
's/(.*Cannot open \[read\].*\n.*HIPSPARSE_STATUS_)INTERNAL_ERROR/\1SUCCESS/' \
{} \;
find -name '*pp' -exec perl -i -p0e \
's/fprintf.*(Cannot open \[read\]).*,\s*(\w+).c_str\(\)/[&](){ GTEST_SKIP() << "\1 " << \2; }(/' \
{} \;
Forwarded: no
---
clients/include/testing_bsr2csr.hpp | 4 ++--
clients/include/testing_bsric02.hpp | 4 ++--
clients/include/testing_bsrilu02.hpp | 4 ++--
clients/include/testing_bsrmm.hpp | 4 ++--
clients/include/testing_bsrmv.hpp | 4 ++--
clients/include/testing_bsrsm2.hpp | 4 ++--
clients/include/testing_bsrsv2.hpp | 4 ++--
clients/include/testing_coo2csr.hpp | 4 ++--
clients/include/testing_coosort.hpp | 4 ++--
clients/include/testing_cscsort.hpp | 4 ++--
clients/include/testing_csr2bsr.hpp | 4 ++--
clients/include/testing_csr2coo.hpp | 4 ++--
clients/include/testing_csr2csc.hpp | 4 ++--
clients/include/testing_csr2csc_ex2.hpp | 4 ++--
clients/include/testing_csr2csr_compress.hpp | 4 ++--
clients/include/testing_csr2gebsr.hpp | 4 ++--
clients/include/testing_csr2hyb.hpp | 4 ++--
clients/include/testing_csrcolor.hpp | 4 ++--
clients/include/testing_csrgeam.hpp | 4 ++--
clients/include/testing_csrgeam2.hpp | 4 ++--
clients/include/testing_csrgemm.hpp | 4 ++--
clients/include/testing_csrgemm2_a.hpp | 4 ++--
clients/include/testing_csrgemm2_b.hpp | 4 ++--
clients/include/testing_csric02.hpp | 4 ++--
clients/include/testing_csrilu02.hpp | 4 ++--
clients/include/testing_csrilusv.hpp | 2 +-
clients/include/testing_csrmm.hpp | 4 ++--
clients/include/testing_csrmv.hpp | 4 ++--
clients/include/testing_csrsm2.hpp | 4 ++--
clients/include/testing_csrsort.hpp | 4 ++--
clients/include/testing_csrsv2.hpp | 4 ++--
clients/include/testing_csru2csr.hpp | 4 ++--
clients/include/testing_gebsr2csr.hpp | 4 ++--
clients/include/testing_gebsr2gebsc.hpp | 4 ++--
clients/include/testing_gebsr2gebsr.hpp | 4 ++--
clients/include/testing_gemmi.hpp | 4 ++--
clients/include/testing_hyb2csr.hpp | 4 ++--
clients/include/testing_hybmv.hpp | 4 ++--
clients/include/testing_prune_csr2csr.hpp | 4 ++--
clients/include/testing_prune_csr2csr_by_percentage.hpp | 4 ++--
clients/include/testing_sddmm_coo.hpp | 4 ++--
clients/include/testing_sddmm_coo_aos.hpp | 4 ++--
clients/include/testing_sddmm_csc.hpp | 4 ++--
clients/include/testing_sddmm_csr.hpp | 4 ++--
clients/include/testing_sparse_to_dense_coo.hpp | 4 ++--
clients/include/testing_sparse_to_dense_csc.hpp | 4 ++--
clients/include/testing_sparse_to_dense_csr.hpp | 4 ++--
clients/include/testing_spgemm_csr.hpp | 4 ++--
clients/include/testing_spgemmreuse_csr.hpp | 4 ++--
clients/include/testing_spmm_batched_coo.hpp | 4 ++--
clients/include/testing_spmm_batched_csc.hpp | 4 ++--
clients/include/testing_spmm_batched_csr.hpp | 4 ++--
clients/include/testing_spmm_coo.hpp | 4 ++--
clients/include/testing_spmm_csc.hpp | 4 ++--
clients/include/testing_spmm_csr.hpp | 4 ++--
clients/include/testing_spmv_coo.hpp | 4 ++--
clients/include/testing_spmv_coo_aos.hpp | 4 ++--
clients/include/testing_spmv_csr.hpp | 4 ++--
clients/include/testing_spsm_coo.hpp | 4 ++--
clients/include/testing_spsm_csr.hpp | 4 ++--
clients/include/testing_spsv_coo.hpp | 4 ++--
clients/include/testing_spsv_csr.hpp | 4 ++--
62 files changed, 123 insertions(+), 123 deletions(-)
diff --git a/clients/include/testing_bsr2csr.hpp b/clients/include/testing_bsr2csr.hpp
index 4deeedf..79c6a9d 100644
--- a/clients/include/testing_bsr2csr.hpp
+++ b/clients/include/testing_bsr2csr.hpp
@@ -297,8 +297,8 @@ hipsparseStatus_t testing_bsr2csr(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, csr_row_ptr, csr_col_ind, csr_val, csr_idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// m and n can be modifed if we read in a matrix from a file
diff --git a/clients/include/testing_bsric02.hpp b/clients/include/testing_bsric02.hpp
index c08a030..1c63c1f 100644
--- a/clients/include/testing_bsric02.hpp
+++ b/clients/include/testing_bsric02.hpp
@@ -377,8 +377,8 @@ hipsparseStatus_t testing_bsric02(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// m can be modifed if we read in a matrix from a file
diff --git a/clients/include/testing_bsrilu02.hpp b/clients/include/testing_bsrilu02.hpp
index 34599a9..047ca2c 100644
--- a/clients/include/testing_bsrilu02.hpp
+++ b/clients/include/testing_bsrilu02.hpp
@@ -384,8 +384,8 @@ hipsparseStatus_t testing_bsrilu02(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// m can be modifed if we read in a matrix from a file
diff --git a/clients/include/testing_bsrmm.hpp b/clients/include/testing_bsrmm.hpp
index 5ba4c48..359e5ba 100644
--- a/clients/include/testing_bsrmm.hpp
+++ b/clients/include/testing_bsrmm.hpp
@@ -446,8 +446,8 @@ hipsparseStatus_t testing_bsrmm(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, k, nnz, csr_row_ptr, csr_col_ind, csr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// m and k can be modifed if we read in a matrix from a file
diff --git a/clients/include/testing_bsrmv.hpp b/clients/include/testing_bsrmv.hpp
index 41ae24c..a81bc5c 100644
--- a/clients/include/testing_bsrmv.hpp
+++ b/clients/include/testing_bsrmv.hpp
@@ -326,8 +326,8 @@ hipsparseStatus_t testing_bsrmv(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
mb = (m + block_dim - 1) / block_dim;
diff --git a/clients/include/testing_bsrsm2.hpp b/clients/include/testing_bsrsm2.hpp
index ce2a7f8..4cfabea 100644
--- a/clients/include/testing_bsrsm2.hpp
+++ b/clients/include/testing_bsrsm2.hpp
@@ -558,8 +558,8 @@ hipsparseStatus_t testing_bsrsm2(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int mb = (m + block_dim - 1) / block_dim;
diff --git a/clients/include/testing_bsrsv2.hpp b/clients/include/testing_bsrsv2.hpp
index 94932fa..f5238f9 100644
--- a/clients/include/testing_bsrsv2.hpp
+++ b/clients/include/testing_bsrsv2.hpp
@@ -470,8 +470,8 @@ hipsparseStatus_t testing_bsrsv2(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int mb = (m + block_dim - 1) / block_dim;
diff --git a/clients/include/testing_coo2csr.hpp b/clients/include/testing_coo2csr.hpp
index 1f699ca..9a88c63 100644
--- a/clients/include/testing_coo2csr.hpp
+++ b/clients/include/testing_coo2csr.hpp
@@ -100,8 +100,8 @@ hipsparseStatus_t testing_coo2csr(Arguments argus)
int nnz = 0;
if(!generate_coo_matrix(filename, m, n, nnz, hcoo_row_ind, hcoo_col_ind, hcoo_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<int> hcsr_row_ptr(m + 1);
diff --git a/clients/include/testing_coosort.hpp b/clients/include/testing_coosort.hpp
index acfdd32..0edeff8 100644
--- a/clients/include/testing_coosort.hpp
+++ b/clients/include/testing_coosort.hpp
@@ -139,8 +139,8 @@ hipsparseStatus_t testing_coosort(Arguments argus)
int nnz = 0;
if(!generate_coo_matrix(filename, m, n, nnz, hcoo_row_ind, hcoo_col_ind, hcoo_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Unsort COO columns
diff --git a/clients/include/testing_cscsort.hpp b/clients/include/testing_cscsort.hpp
index 199fc09..2c04e09 100644
--- a/clients/include/testing_cscsort.hpp
+++ b/clients/include/testing_cscsort.hpp
@@ -145,8 +145,8 @@ hipsparseStatus_t testing_cscsort(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, n, m, nnz, hcsc_col_ptr, hcsc_row_ind, hcsc_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Unsort CSC columns
diff --git a/clients/include/testing_csr2bsr.hpp b/clients/include/testing_csr2bsr.hpp
index 957be16..8d3b1f2 100644
--- a/clients/include/testing_csr2bsr.hpp
+++ b/clients/include/testing_csr2bsr.hpp
@@ -409,8 +409,8 @@ hipsparseStatus_t testing_csr2bsr(Arguments argus)
if(!generate_csr_matrix(
filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, csr_idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int mb = (m + block_dim - 1) / block_dim;
diff --git a/clients/include/testing_csr2coo.hpp b/clients/include/testing_csr2coo.hpp
index 263870b..59fdfbc 100644
--- a/clients/include/testing_csr2coo.hpp
+++ b/clients/include/testing_csr2coo.hpp
@@ -93,8 +93,8 @@ hipsparseStatus_t testing_csr2coo(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on the device
diff --git a/clients/include/testing_csr2csc.hpp b/clients/include/testing_csr2csc.hpp
index d91c578..d001f24 100644
--- a/clients/include/testing_csr2csc.hpp
+++ b/clients/include/testing_csr2csc.hpp
@@ -188,8 +188,8 @@ hipsparseStatus_t testing_csr2csc(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on the device
diff --git a/clients/include/testing_csr2csc_ex2.hpp b/clients/include/testing_csr2csc_ex2.hpp
index 325d129..9cf99a2 100644
--- a/clients/include/testing_csr2csc_ex2.hpp
+++ b/clients/include/testing_csr2csc_ex2.hpp
@@ -300,8 +300,8 @@ hipsparseStatus_t testing_csr2csc_ex2(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on the device
diff --git a/clients/include/testing_csr2csr_compress.hpp b/clients/include/testing_csr2csr_compress.hpp
index 8f2ecef..85273a9 100644
--- a/clients/include/testing_csr2csr_compress.hpp
+++ b/clients/include/testing_csr2csr_compress.hpp
@@ -338,8 +338,8 @@ hipsparseStatus_t testing_csr2csr_compress(Arguments argus)
if(!generate_csr_matrix(
filename, m, n, hnnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on the device
diff --git a/clients/include/testing_csr2gebsr.hpp b/clients/include/testing_csr2gebsr.hpp
index d9db9a1..6c89b0e 100644
--- a/clients/include/testing_csr2gebsr.hpp
+++ b/clients/include/testing_csr2gebsr.hpp
@@ -463,8 +463,8 @@ hipsparseStatus_t testing_csr2gebsr(Arguments argus)
if(!generate_csr_matrix(
filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, csr_idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int mb = (m + row_block_dim - 1) / row_block_dim;
diff --git a/clients/include/testing_csr2hyb.hpp b/clients/include/testing_csr2hyb.hpp
index 48bef4b..6961cb7 100644
--- a/clients/include/testing_csr2hyb.hpp
+++ b/clients/include/testing_csr2hyb.hpp
@@ -152,8 +152,8 @@ hipsparseStatus_t testing_csr2hyb(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
if(m == 0 || n == 0)
diff --git a/clients/include/testing_csrcolor.hpp b/clients/include/testing_csrcolor.hpp
index 7159341..f175990 100644
--- a/clients/include/testing_csrcolor.hpp
+++ b/clients/include/testing_csrcolor.hpp
@@ -256,8 +256,8 @@ hipsparseStatus_t testing_csrcolor()
if(read_bin_matrix(filename.c_str(), m, k, nnz, hrow_ptr, hcol_ind, hval, idx_base) != 0)
{
- fprintf(stderr, "Cannot open [read] %s\n", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
hipsparseColorInfo_t colorInfo;
diff --git a/clients/include/testing_csrgeam.hpp b/clients/include/testing_csrgeam.hpp
index 1f8c665..e9649d4 100644
--- a/clients/include/testing_csrgeam.hpp
+++ b/clients/include/testing_csrgeam.hpp
@@ -733,8 +733,8 @@ hipsparseStatus_t testing_csrgeam(Arguments argus)
if(!generate_csr_matrix(
filename, M, N, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// B = A
diff --git a/clients/include/testing_csrgeam2.hpp b/clients/include/testing_csrgeam2.hpp
index 733899e..090d98d 100644
--- a/clients/include/testing_csrgeam2.hpp
+++ b/clients/include/testing_csrgeam2.hpp
@@ -769,8 +769,8 @@ hipsparseStatus_t testing_csrgeam2(Arguments argus)
if(!generate_csr_matrix(
filename, M, N, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// B = A so that we can compute the square of A
diff --git a/clients/include/testing_csrgemm.hpp b/clients/include/testing_csrgemm.hpp
index 20bbe7a..7bfb034 100644
--- a/clients/include/testing_csrgemm.hpp
+++ b/clients/include/testing_csrgemm.hpp
@@ -739,8 +739,8 @@ hipsparseStatus_t testing_csrgemm(Arguments argus)
if(!generate_csr_matrix(
filename, M, K, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// B = A^T so that we can compute the square of A
diff --git a/clients/include/testing_csrgemm2_a.hpp b/clients/include/testing_csrgemm2_a.hpp
index bb6fb73..d446d65 100644
--- a/clients/include/testing_csrgemm2_a.hpp
+++ b/clients/include/testing_csrgemm2_a.hpp
@@ -1094,8 +1094,8 @@ hipsparseStatus_t testing_csrgemm2_a(Arguments argus)
if(!generate_csr_matrix(
filename, M, K, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<int> hcsr_row_ptr_B;
diff --git a/clients/include/testing_csrgemm2_b.hpp b/clients/include/testing_csrgemm2_b.hpp
index 5028333..cd710d7 100644
--- a/clients/include/testing_csrgemm2_b.hpp
+++ b/clients/include/testing_csrgemm2_b.hpp
@@ -859,8 +859,8 @@ hipsparseStatus_t testing_csrgemm2_b(Arguments argus)
if(!generate_csr_matrix(
filename, M, N, nnz_D, hcsr_row_ptr_D, hcsr_col_ind_D, hcsr_val_D, idx_base_D))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<int> hcsr_row_ptr_A;
diff --git a/clients/include/testing_csric02.hpp b/clients/include/testing_csric02.hpp
index 50b7d5f..616f8c0 100644
--- a/clients/include/testing_csric02.hpp
+++ b/clients/include/testing_csric02.hpp
@@ -196,8 +196,8 @@ hipsparseStatus_t testing_csric02(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hcsr_val_orig(hcsr_val);
diff --git a/clients/include/testing_csrilu02.hpp b/clients/include/testing_csrilu02.hpp
index d3de170..010a83c 100644
--- a/clients/include/testing_csrilu02.hpp
+++ b/clients/include/testing_csrilu02.hpp
@@ -218,8 +218,8 @@ hipsparseStatus_t testing_csrilu02(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hcsr_val_orig(hcsr_val);
diff --git a/clients/include/testing_csrilusv.hpp b/clients/include/testing_csrilusv.hpp
index d275241..659ccfb 100644
--- a/clients/include/testing_csrilusv.hpp
+++ b/clients/include/testing_csrilusv.hpp
@@ -73,7 +73,7 @@ hipsparseStatus_t testing_csrilusv(Arguments argus)
!= 0)
{
fprintf(stderr, "Cannot open [read] %s\n", argus.filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on device
diff --git a/clients/include/testing_csrmm.hpp b/clients/include/testing_csrmm.hpp
index 0ce036f..4f4d072 100644
--- a/clients/include/testing_csrmm.hpp
+++ b/clients/include/testing_csrmm.hpp
@@ -325,8 +325,8 @@ hipsparseStatus_t testing_csrmm(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, M, K, nnz, hcsr_row_ptrA, hcsr_col_indA, hcsr_valA, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_csrmv.hpp b/clients/include/testing_csrmv.hpp
index e1b2bef..4e4585b 100644
--- a/clients/include/testing_csrmv.hpp
+++ b/clients/include/testing_csrmv.hpp
@@ -162,8 +162,8 @@ hipsparseStatus_t testing_csrmv(Arguments argus)
if(!generate_csr_matrix(
filename, nrow, ncol, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int m = (transA == HIPSPARSE_OPERATION_NON_TRANSPOSE) ? nrow : ncol;
diff --git a/clients/include/testing_csrsm2.hpp b/clients/include/testing_csrsm2.hpp
index 38af6ad..c28a5b9 100644
--- a/clients/include/testing_csrsm2.hpp
+++ b/clients/include/testing_csrsm2.hpp
@@ -623,8 +623,8 @@ hipsparseStatus_t testing_csrsm2(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int ldb = (transB == HIPSPARSE_OPERATION_NON_TRANSPOSE) ? m : nrhs;
diff --git a/clients/include/testing_csrsort.hpp b/clients/include/testing_csrsort.hpp
index af7ecdc..4aed1b4 100644
--- a/clients/include/testing_csrsort.hpp
+++ b/clients/include/testing_csrsort.hpp
@@ -138,8 +138,8 @@ hipsparseStatus_t testing_csrsort(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Unsort CSR columns
diff --git a/clients/include/testing_csrsv2.hpp b/clients/include/testing_csrsv2.hpp
index 69b36cb..1b9c94f 100644
--- a/clients/include/testing_csrsv2.hpp
+++ b/clients/include/testing_csrsv2.hpp
@@ -369,8 +369,8 @@ hipsparseStatus_t testing_csrsv2(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, m, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hx(m);
diff --git a/clients/include/testing_csru2csr.hpp b/clients/include/testing_csru2csr.hpp
index a71b69b..bc852be 100644
--- a/clients/include/testing_csru2csr.hpp
+++ b/clients/include/testing_csru2csr.hpp
@@ -275,8 +275,8 @@ hipsparseStatus_t testing_csru2csr(Arguments argus)
if(!generate_csr_matrix(
filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind_gold, hcsr_val_gold, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Unsort CSR columns
diff --git a/clients/include/testing_gebsr2csr.hpp b/clients/include/testing_gebsr2csr.hpp
index 62fb437..b663a16 100644
--- a/clients/include/testing_gebsr2csr.hpp
+++ b/clients/include/testing_gebsr2csr.hpp
@@ -329,8 +329,8 @@ hipsparseStatus_t testing_gebsr2csr(Arguments argus)
if(!generate_csr_matrix(
filename, mb, nb, nnzb, bsr_row_ptr, bsr_col_ind, bsr_val, bsr_idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
m = mb * row_block_dim;
diff --git a/clients/include/testing_gebsr2gebsc.hpp b/clients/include/testing_gebsr2gebsc.hpp
index d49f2e0..9b59edc 100644
--- a/clients/include/testing_gebsr2gebsc.hpp
+++ b/clients/include/testing_gebsr2gebsc.hpp
@@ -466,8 +466,8 @@ hipsparseStatus_t testing_gebsr2gebsc(Arguments argus)
int nnzb = 0;
if(!generate_csr_matrix(filename, mb, nb, nnzb, hbsr_row_ptr, hbsr_col_ind, hbsr_val, base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
m = mb * row_block_dim;
diff --git a/clients/include/testing_gebsr2gebsr.hpp b/clients/include/testing_gebsr2gebsr.hpp
index 94234ca..ca0a6f3 100644
--- a/clients/include/testing_gebsr2gebsr.hpp
+++ b/clients/include/testing_gebsr2gebsr.hpp
@@ -938,8 +938,8 @@ hipsparseStatus_t testing_gebsr2gebsr(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// mb and nb can be modified if reading from a file
diff --git a/clients/include/testing_gemmi.hpp b/clients/include/testing_gemmi.hpp
index 82a5a3d..f611237 100644
--- a/clients/include/testing_gemmi.hpp
+++ b/clients/include/testing_gemmi.hpp
@@ -308,8 +308,8 @@ hipsparseStatus_t testing_gemmi(Arguments argus)
if(!generate_csr_matrix(
filename, N, K, nnz, hcsc_col_ptrB, hcsc_row_indB, hcsc_valB, HIPSPARSE_INDEX_BASE_ZERO))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
int lda = std::max(1, M);
diff --git a/clients/include/testing_hyb2csr.hpp b/clients/include/testing_hyb2csr.hpp
index a54ac34..e6a4a6c 100644
--- a/clients/include/testing_hyb2csr.hpp
+++ b/clients/include/testing_hyb2csr.hpp
@@ -127,8 +127,8 @@ hipsparseStatus_t testing_hyb2csr(Arguments argus)
if(!generate_csr_matrix(
filename, m, n, nnz, hcsr_row_ptr_gold, hcsr_col_ind_gold, hcsr_val_gold, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate memory on the device
diff --git a/clients/include/testing_hybmv.hpp b/clients/include/testing_hybmv.hpp
index 8d79ae0..749f6de 100644
--- a/clients/include/testing_hybmv.hpp
+++ b/clients/include/testing_hybmv.hpp
@@ -137,8 +137,8 @@ hipsparseStatus_t testing_hybmv(Arguments argus)
int nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hx(n);
diff --git a/clients/include/testing_prune_csr2csr.hpp b/clients/include/testing_prune_csr2csr.hpp
index 7da30c0..8ac2822 100644
--- a/clients/include/testing_prune_csr2csr.hpp
+++ b/clients/include/testing_prune_csr2csr.hpp
@@ -560,8 +560,8 @@ hipsparseStatus_t testing_prune_csr2csr(Arguments argus)
if(!generate_csr_matrix(
filename, M, N, nnz_A, h_csr_row_ptr_A, h_csr_col_ind_A, h_csr_val_A, csr_idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate device memory
diff --git a/clients/include/testing_prune_csr2csr_by_percentage.hpp b/clients/include/testing_prune_csr2csr_by_percentage.hpp
index 218bea0..d16709c 100644
--- a/clients/include/testing_prune_csr2csr_by_percentage.hpp
+++ b/clients/include/testing_prune_csr2csr_by_percentage.hpp
@@ -659,8 +659,8 @@ hipsparseStatus_t testing_prune_csr2csr_by_percentage(Arguments argus)
if(!generate_csr_matrix(
filename, M, N, nnz_A, h_csr_row_ptr_A, h_csr_col_ind_A, h_csr_val_A, csr_idx_base_A))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Allocate device memory
diff --git a/clients/include/testing_sddmm_coo.hpp b/clients/include/testing_sddmm_coo.hpp
index 5ed3802..87271f5 100644
--- a/clients/include/testing_sddmm_coo.hpp
+++ b/clients/include/testing_sddmm_coo.hpp
@@ -218,8 +218,8 @@ hipsparseStatus_t testing_sddmm_coo(Arguments argus)
I nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrow_ind(nnz);
diff --git a/clients/include/testing_sddmm_coo_aos.hpp b/clients/include/testing_sddmm_coo_aos.hpp
index 0789d87..c87966d 100644
--- a/clients/include/testing_sddmm_coo_aos.hpp
+++ b/clients/include/testing_sddmm_coo_aos.hpp
@@ -215,8 +215,8 @@ hipsparseStatus_t testing_sddmm_coo_aos(Arguments argus)
I nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrowcol_ind(nnz * 2);
diff --git a/clients/include/testing_sddmm_csc.hpp b/clients/include/testing_sddmm_csc.hpp
index f79e762..8d34ad1 100644
--- a/clients/include/testing_sddmm_csc.hpp
+++ b/clients/include/testing_sddmm_csc.hpp
@@ -222,8 +222,8 @@ hipsparseStatus_t testing_sddmm_csc(Arguments argus)
I nnz = 0;
if(!generate_csr_matrix(filename, n, m, nnz, hcsc_col_ptr, hcsc_row_ind, hcsc_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_sddmm_csr.hpp b/clients/include/testing_sddmm_csr.hpp
index 798fcb1..bbededa 100644
--- a/clients/include/testing_sddmm_csr.hpp
+++ b/clients/include/testing_sddmm_csr.hpp
@@ -221,8 +221,8 @@ hipsparseStatus_t testing_sddmm_csr(Arguments argus)
I nnz = 0;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_sparse_to_dense_coo.hpp b/clients/include/testing_sparse_to_dense_coo.hpp
index c95c551..c2839e2 100644
--- a/clients/include/testing_sparse_to_dense_coo.hpp
+++ b/clients/include/testing_sparse_to_dense_coo.hpp
@@ -152,8 +152,8 @@ hipsparseStatus_t testing_sparse_to_dense_coo(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
I ld = (order == HIPSPARSE_ORDER_COL) ? m : n;
diff --git a/clients/include/testing_sparse_to_dense_csc.hpp b/clients/include/testing_sparse_to_dense_csc.hpp
index 10e3614..cbdb6fe 100644
--- a/clients/include/testing_sparse_to_dense_csc.hpp
+++ b/clients/include/testing_sparse_to_dense_csc.hpp
@@ -159,8 +159,8 @@ hipsparseStatus_t testing_sparse_to_dense_csc(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
I ld = (order == HIPSPARSE_ORDER_COL) ? m : n;
diff --git a/clients/include/testing_sparse_to_dense_csr.hpp b/clients/include/testing_sparse_to_dense_csr.hpp
index 23f0064..80b0c76 100644
--- a/clients/include/testing_sparse_to_dense_csr.hpp
+++ b/clients/include/testing_sparse_to_dense_csr.hpp
@@ -159,8 +159,8 @@ hipsparseStatus_t testing_sparse_to_dense_csr(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
I ld = (order == HIPSPARSE_ORDER_COL) ? m : n;
diff --git a/clients/include/testing_spgemm_csr.hpp b/clients/include/testing_spgemm_csr.hpp
index 7f2b8f9..b0e718f 100644
--- a/clients/include/testing_spgemm_csr.hpp
+++ b/clients/include/testing_spgemm_csr.hpp
@@ -371,8 +371,8 @@ hipsparseStatus_t testing_spgemm_csr(Arguments argus)
if(!generate_csr_matrix(
filename, m, k, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idxBaseA))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// For sparse matrix B, use the transpose of A
diff --git a/clients/include/testing_spgemmreuse_csr.hpp b/clients/include/testing_spgemmreuse_csr.hpp
index b2fdbbd..a494212 100644
--- a/clients/include/testing_spgemmreuse_csr.hpp
+++ b/clients/include/testing_spgemmreuse_csr.hpp
@@ -246,8 +246,8 @@ hipsparseStatus_t testing_spgemmreuse_csr(Arguments argus)
if(!generate_csr_matrix(
filename, m, k, nnz_A, hcsr_row_ptr_A, hcsr_col_ind_A, hcsr_val_A, idxBaseA))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Sparse matrix B as the transpose of A
diff --git a/clients/include/testing_spmm_batched_coo.hpp b/clients/include/testing_spmm_batched_coo.hpp
index e0e4fe6..bd4fef9 100644
--- a/clients/include/testing_spmm_batched_coo.hpp
+++ b/clients/include/testing_spmm_batched_coo.hpp
@@ -224,8 +224,8 @@ hipsparseStatus_t testing_spmm_batched_coo(Arguments argus)
hval,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrow_ind(nnz_A);
diff --git a/clients/include/testing_spmm_batched_csc.hpp b/clients/include/testing_spmm_batched_csc.hpp
index 45b4a58..566e4a7 100644
--- a/clients/include/testing_spmm_batched_csc.hpp
+++ b/clients/include/testing_spmm_batched_csc.hpp
@@ -236,8 +236,8 @@ hipsparseStatus_t testing_spmm_batched_csc(Arguments argus)
hcsc_val_temp,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_spmm_batched_csr.hpp b/clients/include/testing_spmm_batched_csr.hpp
index 3557e92..83d1b57 100644
--- a/clients/include/testing_spmm_batched_csr.hpp
+++ b/clients/include/testing_spmm_batched_csr.hpp
@@ -236,8 +236,8 @@ hipsparseStatus_t testing_spmm_batched_csr(Arguments argus)
hcsr_val_temp,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_spmm_coo.hpp b/clients/include/testing_spmm_coo.hpp
index 29cddd3..a77c629 100644
--- a/clients/include/testing_spmm_coo.hpp
+++ b/clients/include/testing_spmm_coo.hpp
@@ -236,8 +236,8 @@ hipsparseStatus_t testing_spmm_coo(Arguments argus)
hval,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrow_ind(nnz_A);
diff --git a/clients/include/testing_spmm_csc.hpp b/clients/include/testing_spmm_csc.hpp
index 1ebec93..c0ae03d 100644
--- a/clients/include/testing_spmm_csc.hpp
+++ b/clients/include/testing_spmm_csc.hpp
@@ -237,8 +237,8 @@ hipsparseStatus_t testing_spmm_csc(Arguments argus)
hcsc_val,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_spmm_csr.hpp b/clients/include/testing_spmm_csr.hpp
index 33996ee..cc78d8f 100644
--- a/clients/include/testing_spmm_csr.hpp
+++ b/clients/include/testing_spmm_csr.hpp
@@ -239,8 +239,8 @@ hipsparseStatus_t testing_spmm_csr(Arguments argus)
hcsr_val,
idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
// Some matrix properties
diff --git a/clients/include/testing_spmv_coo.hpp b/clients/include/testing_spmv_coo.hpp
index 61e845a..2d6722f 100644
--- a/clients/include/testing_spmv_coo.hpp
+++ b/clients/include/testing_spmv_coo.hpp
@@ -180,8 +180,8 @@ hipsparseStatus_t testing_spmv_coo(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hrow_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrow_ind(nnz);
diff --git a/clients/include/testing_spmv_coo_aos.hpp b/clients/include/testing_spmv_coo_aos.hpp
index bae1c92..b998c1e 100644
--- a/clients/include/testing_spmv_coo_aos.hpp
+++ b/clients/include/testing_spmv_coo_aos.hpp
@@ -178,8 +178,8 @@ hipsparseStatus_t testing_spmv_coo_aos(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hrow_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hind(2 * nnz);
diff --git a/clients/include/testing_spmv_csr.hpp b/clients/include/testing_spmv_csr.hpp
index f5adc0e..882c648 100644
--- a/clients/include/testing_spmv_csr.hpp
+++ b/clients/include/testing_spmv_csr.hpp
@@ -205,8 +205,8 @@ hipsparseStatus_t testing_spmv_csr(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hx(n);
diff --git a/clients/include/testing_spsm_coo.hpp b/clients/include/testing_spsm_coo.hpp
index f14e65a..272e686 100644
--- a/clients/include/testing_spsm_coo.hpp
+++ b/clients/include/testing_spsm_coo.hpp
@@ -221,8 +221,8 @@ hipsparseStatus_t testing_spsm_coo(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hrow_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
if(m != n)
diff --git a/clients/include/testing_spsm_csr.hpp b/clients/include/testing_spsm_csr.hpp
index d755b65..c7a6631 100644
--- a/clients/include/testing_spsm_csr.hpp
+++ b/clients/include/testing_spsm_csr.hpp
@@ -223,8 +223,8 @@ hipsparseStatus_t testing_spsm_csr(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
if(m != n)
diff --git a/clients/include/testing_spsv_coo.hpp b/clients/include/testing_spsv_coo.hpp
index 5db43f5..2731353 100644
--- a/clients/include/testing_spsv_coo.hpp
+++ b/clients/include/testing_spsv_coo.hpp
@@ -191,8 +191,8 @@ hipsparseStatus_t testing_spsv_coo(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hrow_ptr, hcol_ind, hval, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<I> hrow_ind(nnz);
diff --git a/clients/include/testing_spsv_csr.hpp b/clients/include/testing_spsv_csr.hpp
index 54f7acb..86988bf 100644
--- a/clients/include/testing_spsv_csr.hpp
+++ b/clients/include/testing_spsv_csr.hpp
@@ -193,8 +193,8 @@ hipsparseStatus_t testing_spsv_csr(Arguments argus)
I nnz;
if(!generate_csr_matrix(filename, m, n, nnz, hcsr_row_ptr, hcsr_col_ind, hcsr_val, idx_base))
{
- fprintf(stderr, "Cannot open [read] %s\ncol", filename.c_str());
- return HIPSPARSE_STATUS_INTERNAL_ERROR;
+ [&](){ GTEST_SKIP() << "Cannot open [read] " << filename; }();
+ return HIPSPARSE_STATUS_SUCCESS;
}
std::vector<T> hx(m);
|