- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Dear Intel
I have a mechanics problem which I solve with finite differences, and the matrix is sparse. I use pardiso to solve the linear system, and I regularly get solutions which do not match Gaussian elimination with row and column pivoting. In addition, in these cases the residual (as expected) r = Ax-b is not zero. A sample matrix with the right hand side can be found in the following sample code. My Gaussian elimination results in the first element of the solution vector x[0] = 2.197819, but pardiso reports 1.798e-8. Note that my matrix is non-dimensionalized so I reduce my numerical errors, but in one row towards the end I have very large values (42046084959222096), which is correct for my model.
Any help is deeply appreciated. Thanks
#include <stdio.h> #include <stdlib.h> #include <math.h> #include "mkl_pardiso.h" #include "mkl_types.h" #define nrElements 2088 int main() { // number of rows MKL_INT n = 576; // matrix data (1-based indexing) double a[nrElements] = { -1, // 0 -0.0073499999999999963, // 1 1, // 2 -0.0073499999999999963, // 3 -0.0073499999999999963, // 4 -1, // 5 0.060000000000000005, // 6 -0.02102120408936008, // 7 1, // 8 0.060000000000000005, // 9 -0.02102120408936008, // 10 -0.02102120408936008, // 11 -1, // 12 -0.97999999999999998, // 13 1, // 14 -0.97999999999999998, // 15 -0.97999999999999998, // 16 -1, // 17 -0.02, // 18 1, // 19 -0.02, // 20 -0.02, // 21 1, // 22 -1, // 23 1, // 24 1, // 25 -1, // 26 -0.060000000000000005, // 27 -0.02102120408936008, // 28 1, // 29 -0.060000000000000005, // 30 -0.02102120408936008, // 31 -0.02102120408936008, // 32 -1, // 33 -0.97999999999999998, // 34 1, // 35 -0.97999999999999998, // 36 -0.97999999999999998, // 37 -1, // 38 0.02, // 39 1, // 40 0.02, // 41 0.02, // 42 1, // 43 -1, // 44 1, // 45 1, // 46 -1, // 47 1, // 48 1, // 49 -1, // 50 -1.2740123690521266, // 51 1, // 52 -1.2740123690521266, // 53 -1.2740123690521266, // 54 -1, // 55 1, // 56 1, // 57 -1, // 58 -0.001312499999999999, // 59 1, // 60 -0.001312499999999999, // 61 -1, // 62 0.010714285714285713, // 63 -0.0037537864445285848, // 64 1, // 65 0.010714285714285713, // 66 -0.0037537864445285848, // 67 -1, // 68 -0.17499999999999988, // 69 1, // 70 -0.17499999999999988, // 71 -1, // 72 -0.0035714285714285704, // 73 1, // 74 -0.0035714285714285704, // 75 -1, // 76 1, // 77 -1, // 78 -0.010714285714285713, // 79 -0.0037537864445285848, // 80 1, // 81 -0.010714285714285713, // 82 -0.0037537864445285848, // 83 -1, // 84 -0.17499999999999988, // 85 1, // 86 -0.17499999999999988, // 87 -1, // 88 0.0035714285714285704, // 89 1, // 90 0.0035714285714285704, // 91 -1, // 92 1, // 93 -1, // 94 1, // 95 -1, // 96 -0.22750220875930818, // 97 1, // 98 -0.22750220875930818, // 99 -1, // 100 1, // 101 -1, // 102 -0.0086624999999999949, // 103 1, // 104 -0.0086624999999999949, // 105 -1, // 106 0.070714285714285716, // 107 -0.024774990533888663, // 108 1, // 109 0.070714285714285716, // 110 -0.024774990533888663, // 111 -1, // 112 -1.1549999999999991, // 113 1, // 114 -1.1549999999999991, // 115 -1, // 116 -0.023571428571428566, // 117 1, // 118 -0.023571428571428566, // 119 -1, // 120 1, // 121 -1, // 122 -0.070714285714285716, // 123 -0.024774990533888663, // 124 1, // 125 -0.070714285714285716, // 126 -0.024774990533888663, // 127 -1, // 128 -1.1549999999999991, // 129 1, // 130 -1.1549999999999991, // 131 -1, // 132 0.023571428571428566, // 133 1, // 134 0.023571428571428566, // 135 -1, // 136 1, // 137 -1, // 138 1, // 139 -1, // 140 -1.501514577811434, // 141 1, // 142 -1.501514577811434, // 143 -1, // 144 1, // 145 -1, // 146 -0.0028874999999999977, // 147 1, // 148 -0.0028874999999999977, // 149 -1, // 150 0.023571428571428563, // 151 -0.0082583301779628852, // 152 1, // 153 0.023571428571428563, // 154 -0.0082583301779628852, // 155 -1, // 156 -0.38499999999999968, // 157 1, // 158 -0.38499999999999968, // 159 -1, // 160 -0.0078571428571428542, // 161 1, // 162 -0.0078571428571428542, // 163 -1, // 164 1, // 165 -1, // 166 -0.023571428571428563, // 167 -0.0082583301779628852, // 168 1, // 169 -0.023571428571428563, // 170 -0.0082583301779628852, // 171 -1, // 172 -0.38499999999999968, // 173 1, // 174 -0.38499999999999968, // 175 -1, // 176 0.0078571428571428542, // 177 1, // 178 0.0078571428571428542, // 179 -1, // 180 1, // 181 -1, // 182 1, // 183 -1, // 184 -0.50050485927047794, // 185 1, // 186 -0.50050485927047794, // 187 -1, // 188 1, // 189 -1, // 190 -0.0018375000000000008, // 191 1, // 192 -0.0018375000000000008, // 193 -0.0018375000000000008, // 194 -1, // 195 0.015000000000000015, // 196 -0.0052553010223400252, // 197 1, // 198 0.015000000000000015, // 199 -0.0052553010223400252, // 200 -0.0052553010223400252, // 201 -1, // 202 -0.24500000000000013, // 203 1, // 204 -0.24500000000000013, // 205 -0.24500000000000013, // 206 -1, // 207 -0.0050000000000000044, // 208 1, // 209 -0.0050000000000000044, // 210 -0.0050000000000000044, // 211 1, // 212 -1, // 213 1, // 214 1, // 215 -1, // 216 -0.015000000000000015, // 217 -0.0052553010223400252, // 218 1, // 219 -0.015000000000000015, // 220 -0.0052553010223400252, // 221 -0.0052553010223400252, // 222 -1, // 223 -0.24500000000000013, // 224 1, // 225 -0.24500000000000013, // 226 -0.24500000000000013, // 227 -1, // 228 0.0050000000000000044, // 229 1, // 230 0.0050000000000000044, // 231 0.0050000000000000044, // 232 1, // 233 -1, // 234 1, // 235 1, // 236 -1, // 237 1, // 238 1, // 239 -1, // 240 -0.31850309226303186, // 241 1, // 242 -0.31850309226303186, // 243 -0.31850309226303186, // 244 -1, // 245 1, // 246 1, // 247 -1, // 248 -0.0018375000000000008, // 249 1, // 250 -0.0018375000000000008, // 251 -1, // 252 0.015000000000000015, // 253 -0.0052553010223400252, // 254 1, // 255 0.015000000000000015, // 256 -0.0052553010223400252, // 257 -1, // 258 -0.24500000000000013, // 259 1, // 260 -0.24500000000000013, // 261 -1, // 262 -0.0050000000000000044, // 263 1, // 264 -0.0050000000000000044, // 265 -1, // 266 1, // 267 -1, // 268 -0.015000000000000015, // 269 -0.0052553010223400252, // 270 1, // 271 -0.015000000000000015, // 272 -0.0052553010223400252, // 273 -1, // 274 -0.24500000000000013, // 275 1, // 276 -0.24500000000000013, // 277 -1, // 278 0.0050000000000000044, // 279 1, // 280 0.0050000000000000044, // 281 -1, // 282 1, // 283 -1, // 284 1, // 285 -1, // 286 -0.31850309226303186, // 287 1, // 288 -0.31850309226303186, // 289 -1, // 290 1, // 291 -1, // 292 -0.0020999999999999968, // 293 1, // 294 -0.0020999999999999968, // 295 -1, // 296 0.017142857142857126, // 297 -0.0060060583112457305, // 298 1, // 299 0.017142857142857126, // 300 -0.0060060583112457305, // 301 -1, // 302 -0.27999999999999958, // 303 1, // 304 -0.27999999999999958, // 305 -1, // 306 -0.0057142857142857082, // 307 1, // 308 -0.0057142857142857082, // 309 -1, // 310 1, // 311 -1, // 312 -0.017142857142857126, // 313 -0.0060060583112457305, // 314 1, // 315 -0.017142857142857126, // 316 -0.0060060583112457305, // 317 -1, // 318 -0.27999999999999958, // 319 1, // 320 -0.27999999999999958, // 321 -1, // 322 0.0057142857142857082, // 323 1, // 324 0.0057142857142857082, // 325 -1, // 326 1, // 327 -1, // 328 1, // 329 -1, // 330 -0.36400353401489283, // 331 1, // 332 -0.36400353401489283, // 333 -1, // 334 1, // 335 -1, // 336 -0.0070875, // 337 1, // 338 -0.0070875, // 339 -0.0070875, // 340 -1, // 341 0.057857142857142892, // 342 -0.020270446800454374, // 343 1, // 344 0.057857142857142892, // 345 -0.020270446800454374, // 346 -0.020270446800454374, // 347 -1, // 348 -0.94500000000000006, // 349 1, // 350 -0.94500000000000006, // 351 -0.94500000000000006, // 352 -1, // 353 -0.019285714285714295, // 354 1, // 355 -0.019285714285714295, // 356 -0.019285714285714295, // 357 1, // 358 -1, // 359 1, // 360 1, // 361 -1, // 362 -0.057857142857142892, // 363 -0.020270446800454374, // 364 1, // 365 -0.057857142857142892, // 366 -0.020270446800454374, // 367 -0.020270446800454374, // 368 -1, // 369 -0.94500000000000006, // 370 1, // 371 -0.94500000000000006, // 372 -0.94500000000000006, // 373 -1, // 374 0.019285714285714295, // 375 1, // 376 0.019285714285714295, // 377 0.019285714285714295, // 378 1, // 379 -1, // 380 1, // 381 1, // 382 -1, // 383 1, // 384 1, // 385 -1, // 386 -1.2285119273002651, // 387 1, // 388 -1.2285119273002651, // 389 -1.2285119273002651, // 390 -1, // 391 1, // 392 1, // 393 -1, // 394 -0.0015749999999999952, // 395 1, // 396 -0.0015749999999999952, // 397 -1, // 398 0.012857142857142824, // 399 -0.0045045437334342913, // 400 1, // 401 0.012857142857142824, // 402 -0.0045045437334342913, // 403 -1, // 404 -0.20999999999999935, // 405 1, // 406 -0.20999999999999935, // 407 -1, // 408 -0.0042857142857142747, // 409 1, // 410 -0.0042857142857142747, // 411 -1, // 412 1, // 413 -1, // 414 -0.012857142857142824, // 415 -0.0045045437334342913, // 416 1, // 417 -0.012857142857142824, // 418 -0.0045045437334342913, // 419 -1, // 420 -0.20999999999999935, // 421 1, // 422 -0.20999999999999935, // 423 -1, // 424 0.0042857142857142747, // 425 1, // 426 0.0042857142857142747, // 427 -1, // 428 1, // 429 -1, // 430 1, // 431 -1, // 432 -0.27300265051116918, // 433 1, // 434 -0.27300265051116918, // 435 -1, // 436 1, // 437 -1, // 438 -0.0086624999999999914, // 439 1, // 440 -0.0086624999999999914, // 441 -1, // 442 0.070714285714285688, // 443 -0.024774990533888652, // 444 1, // 445 0.070714285714285688, // 446 -0.024774990533888652, // 447 -1, // 448 -1.1549999999999989, // 449 1, // 450 -1.1549999999999989, // 451 -1, // 452 -0.023571428571428559, // 453 1, // 454 -0.023571428571428559, // 455 -1, // 456 1, // 457 -1, // 458 -0.070714285714285688, // 459 -0.024774990533888652, // 460 1, // 461 -0.070714285714285688, // 462 -0.024774990533888652, // 463 -1, // 464 -1.1549999999999989, // 465 1, // 466 -1.1549999999999989, // 467 -1, // 468 0.023571428571428559, // 469 1, // 470 0.023571428571428559, // 471 -1, // 472 1, // 473 -1, // 474 1, // 475 -1, // 476 -1.5015145778114336, // 477 1, // 478 -1.5015145778114336, // 479 -1, // 480 1, // 481 -1, // 482 -0.0086624999999999914, // 483 1, // 484 -0.0086624999999999914, // 485 -1, // 486 0.070714285714285688, // 487 -0.024774990533888652, // 488 1, // 489 0.070714285714285688, // 490 -0.024774990533888652, // 491 -1, // 492 -1.1549999999999989, // 493 1, // 494 -1.1549999999999989, // 495 -1, // 496 -0.023571428571428559, // 497 1, // 498 -0.023571428571428559, // 499 -1, // 500 1, // 501 -1, // 502 -0.070714285714285688, // 503 -0.024774990533888652, // 504 1, // 505 -0.070714285714285688, // 506 -0.024774990533888652, // 507 -1, // 508 -1.1549999999999989, // 509 1, // 510 -1.1549999999999989, // 511 -1, // 512 0.023571428571428559, // 513 1, // 514 0.023571428571428559, // 515 -1, // 516 1, // 517 -1, // 518 1, // 519 -1, // 520 -1.5015145778114336, // 521 1, // 522 -1.5015145778114336, // 523 -1, // 524 1, // 525 -1, // 526 -0.0086625000000000053, // 527 1, // 528 -0.0086625000000000053, // 529 -0.0086625000000000053, // 530 -1, // 531 0.070714285714285799, // 532 -0.024774990533888694, // 533 1, // 534 0.070714285714285799, // 535 -0.024774990533888694, // 536 -0.024774990533888694, // 537 -1, // 538 -1.1550000000000007, // 539 1, // 540 -1.1550000000000007, // 541 -1.1550000000000007, // 542 -1, // 543 -0.023571428571428597, // 544 1, // 545 -0.023571428571428597, // 546 -0.023571428571428597, // 547 1, // 548 -1, // 549 1, // 550 1, // 551 -1, // 552 -0.070714285714285799, // 553 -0.024774990533888694, // 554 1, // 555 -0.070714285714285799, // 556 -0.024774990533888694, // 557 -0.024774990533888694, // 558 -1, // 559 -1.1550000000000007, // 560 1, // 561 -1.1550000000000007, // 562 -1.1550000000000007, // 563 -1, // 564 0.023571428571428597, // 565 1, // 566 0.023571428571428597, // 567 0.023571428571428597, // 568 1, // 569 -1, // 570 1, // 571 1, // 572 -1, // 573 1, // 574 1, // 575 -1, // 576 -1.501514577811436, // 577 1, // 578 -1.501514577811436, // 579 -1.501514577811436, // 580 -1, // 581 1, // 582 1, // 583 -1, // 584 -0.0090343749999999938, // 585 1, // 586 -0.0090343749999999938, // 587 -1, // 588 0.073749999999999996, // 589 -0.025838563359838425, // 590 1, // 591 0.073749999999999996, // 592 -0.025838563359838425, // 593 -1, // 594 -1.2045833333333322, // 595 1, // 596 -1.2045833333333322, // 597 -1, // 598 -0.024583333333333329, // 599 1, // 600 -0.024583333333333329, // 601 -1, // 602 1, // 603 -1, // 604 -0.073749999999999996, // 605 -0.025838563359838425, // 606 1, // 607 -0.073749999999999996, // 608 -0.025838563359838425, // 609 -1, // 610 -1.2045833333333322, // 611 1, // 612 -1.2045833333333322, // 613 -1, // 614 0.024583333333333329, // 615 1, // 616 0.024583333333333329, // 617 -1, // 618 1, // 619 -1, // 620 1, // 621 -1, // 622 -1.5659735369599046, // 623 1, // 624 -1.5659735369599046, // 625 -1, // 626 1, // 627 -1, // 628 -0.0090343749999999938, // 629 1, // 630 -0.0090343749999999938, // 631 -1, // 632 0.073749999999999996, // 633 -0.025838563359838425, // 634 1, // 635 0.073749999999999996, // 636 -0.025838563359838425, // 637 -1, // 638 -1.2045833333333329, // 639 1, // 640 -1.2045833333333329, // 641 -1, // 642 -0.024583333333333329, // 643 1, // 644 -0.024583333333333329, // 645 -1, // 646 1, // 647 -1, // 648 -0.073749999999999996, // 649 -0.025838563359838425, // 650 1, // 651 -0.073749999999999996, // 652 -0.025838563359838425, // 653 -1, // 654 -1.2045833333333329, // 655 1, // 656 -1.2045833333333329, // 657 -1, // 658 0.024583333333333329, // 659 1, // 660 0.024583333333333329, // 661 -1, // 662 1, // 663 -1, // 664 1, // 665 -1, // 666 -1.5659735369599053, // 667 1, // 668 -1.5659735369599053, // 669 -1, // 670 1, // 671 -1, // 672 -0.0090343749999999938, // 673 1, // 674 -0.0090343749999999938, // 675 -1, // 676 0.073749999999999996, // 677 -0.025838563359838425, // 678 1, // 679 0.073749999999999996, // 680 -0.025838563359838425, // 681 -1, // 682 -1.2045833333333325, // 683 1, // 684 -1.2045833333333325, // 685 -1, // 686 -0.024583333333333329, // 687 1, // 688 -0.024583333333333329, // 689 -1, // 690 1, // 691 -1, // 692 -0.073749999999999996, // 693 -0.025838563359838425, // 694 1, // 695 -0.073749999999999996, // 696 -0.025838563359838425, // 697 -1, // 698 -1.2045833333333325, // 699 1, // 700 -1.2045833333333325, // 701 -1, // 702 0.024583333333333329, // 703 1, // 704 0.024583333333333329, // 705 -1, // 706 1, // 707 -1, // 708 1, // 709 -1, // 710 -1.5659735369599048, // 711 1, // 712 -1.5659735369599048, // 713 -1, // 714 1, // 715 -1, // 716 -0.0090343749999999938, // 717 1, // 718 -0.0090343749999999938, // 719 -1, // 720 0.073749999999999996, // 721 -0.025838563359838425, // 722 1, // 723 0.073749999999999996, // 724 -0.025838563359838425, // 725 -1, // 726 -1.2045833333333325, // 727 1, // 728 -1.2045833333333325, // 729 -1, // 730 -0.024583333333333329, // 731 1, // 732 -0.024583333333333329, // 733 -1, // 734 1, // 735 -1, // 736 -0.073749999999999996, // 737 -0.025838563359838425, // 738 1, // 739 -0.073749999999999996, // 740 -0.025838563359838425, // 741 -1, // 742 -1.2045833333333325, // 743 1, // 744 -1.2045833333333325, // 745 -1, // 746 0.024583333333333329, // 747 1, // 748 0.024583333333333329, // 749 -1, // 750 1, // 751 -1, // 752 1, // 753 -1, // 754 -1.5659735369599048, // 755 1, // 756 -1.5659735369599048, // 757 -1, // 758 1, // 759 -1, // 760 -0.0090343749999999938, // 761 1, // 762 -0.0090343749999999938, // 763 -1, // 764 0.073749999999999996, // 765 -0.025838563359838425, // 766 1, // 767 0.073749999999999996, // 768 -0.025838563359838425, // 769 -1, // 770 -1.2045833333333325, // 771 1, // 772 -1.2045833333333325, // 773 -1, // 774 -0.024583333333333329, // 775 1, // 776 -0.024583333333333329, // 777 -1, // 778 1, // 779 -1, // 780 -0.073749999999999996, // 781 -0.025838563359838425, // 782 1, // 783 -0.073749999999999996, // 784 -0.025838563359838425, // 785 -1, // 786 -1.2045833333333325, // 787 1, // 788 -1.2045833333333325, // 789 -1, // 790 0.024583333333333329, // 791 1, // 792 0.024583333333333329, // 793 -1, // 794 1, // 795 -1, // 796 1, // 797 -1, // 798 -1.5659735369599048, // 799 1, // 800 -1.5659735369599048, // 801 -1, // 802 1, // 803 -1, // 804 -0.0090343749999999938, // 805 1, // 806 -0.0090343749999999938, // 807 -1, // 808 0.073749999999999996, // 809 -0.025838563359838425, // 810 1, // 811 0.073749999999999996, // 812 -0.025838563359838425, // 813 -1, // 814 -1.2045833333333325, // 815 1, // 816 -1.2045833333333325, // 817 -1, // 818 -0.024583333333333329, // 819 1, // 820 -0.024583333333333329, // 821 -1, // 822 1, // 823 -1, // 824 -0.073749999999999996, // 825 -0.025838563359838425, // 826 1, // 827 -0.073749999999999996, // 828 -0.025838563359838425, // 829 -1, // 830 -1.2045833333333325, // 831 1, // 832 -1.2045833333333325, // 833 -1, // 834 0.024583333333333329, // 835 1, // 836 0.024583333333333329, // 837 -1, // 838 1, // 839 -1, // 840 1, // 841 -1, // 842 -1.5659735369599048, // 843 1, // 844 -1.5659735369599048, // 845 -1, // 846 1, // 847 -1, // 848 -0.0090343749999999938, // 849 1, // 850 -0.0090343749999999938, // 851 -1, // 852 0.073749999999999996, // 853 -0.025838563359838425, // 854 1, // 855 0.073749999999999996, // 856 -0.025838563359838425, // 857 -1, // 858 -1.2045833333333325, // 859 1, // 860 -1.2045833333333325, // 861 -1, // 862 -0.024583333333333329, // 863 1, // 864 -0.024583333333333329, // 865 -1, // 866 1, // 867 -1, // 868 -0.073749999999999996, // 869 -0.025838563359838425, // 870 1, // 871 -0.073749999999999996, // 872 -0.025838563359838425, // 873 -1, // 874 -1.2045833333333325, // 875 1, // 876 -1.2045833333333325, // 877 -1, // 878 0.024583333333333329, // 879 1, // 880 0.024583333333333329, // 881 -1, // 882 1, // 883 -1, // 884 1, // 885 -1, // 886 -1.5659735369599048, // 887 1, // 888 -1.5659735369599048, // 889 -1, // 890 1, // 891 -1, // 892 -0.0090343749999999938, // 893 1, // 894 -0.0090343749999999938, // 895 -1, // 896 0.073749999999999996, // 897 -0.025838563359838425, // 898 1, // 899 0.073749999999999996, // 900 -0.025838563359838425, // 901 -1, // 902 -1.2045833333333325, // 903 1, // 904 -1.2045833333333325, // 905 -1, // 906 -0.024583333333333329, // 907 1, // 908 -0.024583333333333329, // 909 -1, // 910 1, // 911 -1, // 912 -0.073749999999999996, // 913 -0.025838563359838425, // 914 1, // 915 -0.073749999999999996, // 916 -0.025838563359838425, // 917 -1, // 918 -1.2045833333333325, // 919 1, // 920 -1.2045833333333325, // 921 -1, // 922 0.024583333333333329, // 923 1, // 924 0.024583333333333329, // 925 -1, // 926 1, // 927 -1, // 928 1, // 929 -1, // 930 -1.5659735369599048, // 931 1, // 932 -1.5659735369599048, // 933 -1, // 934 1, // 935 -1, // 936 -0.0090343749999999938, // 937 1, // 938 -0.0090343749999999938, // 939 -1, // 940 0.073749999999999996, // 941 -0.025838563359838425, // 942 1, // 943 0.073749999999999996, // 944 -0.025838563359838425, // 945 -1, // 946 -1.2045833333333325, // 947 1, // 948 -1.2045833333333325, // 949 -1, // 950 -0.024583333333333329, // 951 1, // 952 -0.024583333333333329, // 953 -1, // 954 1, // 955 -1, // 956 -0.073749999999999996, // 957 -0.025838563359838425, // 958 1, // 959 -0.073749999999999996, // 960 -0.025838563359838425, // 961 -1, // 962 -1.2045833333333325, // 963 1, // 964 -1.2045833333333325, // 965 -1, // 966 0.024583333333333329, // 967 1, // 968 0.024583333333333329, // 969 -1, // 970 1, // 971 -1, // 972 1, // 973 -1, // 974 -1.5659735369599048, // 975 1, // 976 -1.5659735369599048, // 977 -1, // 978 1, // 979 -1, // 980 -0.0090343749999999938, // 981 1, // 982 -0.0090343749999999938, // 983 -1, // 984 0.073749999999999996, // 985 -0.025838563359838425, // 986 1, // 987 0.073749999999999996, // 988 -0.025838563359838425, // 989 -1, // 990 -1.2045833333333325, // 991 1, // 992 -1.2045833333333325, // 993 -1, // 994 -0.024583333333333329, // 995 1, // 996 -0.024583333333333329, // 997 -1, // 998 1, // 999 -1, // 1000 -0.073749999999999996, // 1001 -0.025838563359838425, // 1002 1, // 1003 -0.073749999999999996, // 1004 -0.025838563359838425, // 1005 -1, // 1006 -1.2045833333333325, // 1007 1, // 1008 -1.2045833333333325, // 1009 -1, // 1010 0.024583333333333329, // 1011 1, // 1012 0.024583333333333329, // 1013 -1, // 1014 1, // 1015 -1, // 1016 1, // 1017 -1, // 1018 -1.5659735369599048, // 1019 1, // 1020 -1.5659735369599048, // 1021 -1, // 1022 1, // 1023 -1, // 1024 -0.0090343749999999938, // 1025 1, // 1026 -0.0090343749999999938, // 1027 -1, // 1028 0.073749999999999996, // 1029 -0.025838563359838425, // 1030 1, // 1031 0.073749999999999996, // 1032 -0.025838563359838425, // 1033 -1, // 1034 -1.2045833333333325, // 1035 1, // 1036 -1.2045833333333325, // 1037 -1, // 1038 -0.024583333333333329, // 1039 1, // 1040 -0.024583333333333329, // 1041 -1, // 1042 1, // 1043 -1, // 1044 -0.073749999999999996, // 1045 -0.025838563359838425, // 1046 1, // 1047 -0.073749999999999996, // 1048 -0.025838563359838425, // 1049 -1, // 1050 -1.2045833333333325, // 1051 1, // 1052 -1.2045833333333325, // 1053 -1, // 1054 0.024583333333333329, // 1055 1, // 1056 0.024583333333333329, // 1057 -1, // 1058 1, // 1059 -1, // 1060 1, // 1061 -1, // 1062 -1.5659735369599048, // 1063 1, // 1064 -1.5659735369599048, // 1065 -1, // 1066 1, // 1067 -1, // 1068 -0.0090343749999999938, // 1069 1, // 1070 -0.0090343749999999938, // 1071 -0.0090343749999999938, // 1072 -1, // 1073 0.073749999999999996, // 1074 -0.025838563359838425, // 1075 1, // 1076 0.073749999999999996, // 1077 -0.025838563359838425, // 1078 -0.025838563359838425, // 1079 -1, // 1080 -1.2045833333333325, // 1081 1, // 1082 -1.2045833333333325, // 1083 -1.2045833333333325, // 1084 -1, // 1085 -0.024583333333333329, // 1086 1, // 1087 -0.024583333333333329, // 1088 -0.024583333333333329, // 1089 1, // 1090 -1, // 1091 1, // 1092 1, // 1093 -1, // 1094 -0.073749999999999996, // 1095 -0.025838563359838425, // 1096 1, // 1097 -0.073749999999999996, // 1098 -0.025838563359838425, // 1099 -0.025838563359838425, // 1100 -1, // 1101 -1.2045833333333325, // 1102 1, // 1103 -1.2045833333333325, // 1104 -1.2045833333333325, // 1105 -1, // 1106 0.024583333333333329, // 1107 1, // 1108 0.024583333333333329, // 1109 0.024583333333333329, // 1110 1, // 1111 -1, // 1112 1, // 1113 1, // 1114 -1, // 1115 1, // 1116 1, // 1117 -1, // 1118 -1.5659735369599048, // 1119 1, // 1120 -1.5659735369599048, // 1121 -1.5659735369599048, // 1122 -1, // 1123 1, // 1124 1, // 1125 -1, // 1126 -0.0073500000000000032, // 1127 1, // 1128 -0.0073500000000000032, // 1129 -1, // 1130 0.06000000000000006, // 1131 -0.021021204089360101, // 1132 1, // 1133 0.06000000000000006, // 1134 -0.021021204089360101, // 1135 -1, // 1136 -0.98000000000000054, // 1137 1, // 1138 -0.98000000000000054, // 1139 -1, // 1140 -0.020000000000000018, // 1141 1, // 1142 -0.020000000000000018, // 1143 -1, // 1144 1, // 1145 -1, // 1146 -0.06000000000000006, // 1147 -0.021021204089360101, // 1148 1, // 1149 -0.06000000000000006, // 1150 -0.021021204089360101, // 1151 -1, // 1152 -0.98000000000000054, // 1153 1, // 1154 -0.98000000000000054, // 1155 -1, // 1156 0.020000000000000018, // 1157 1, // 1158 0.020000000000000018, // 1159 -1, // 1160 1, // 1161 -1, // 1162 1, // 1163 -1, // 1164 -1.2740123690521274, // 1165 1, // 1166 -1.2740123690521274, // 1167 -1, // 1168 1, // 1169 -1, // 1170 -0.0073500000000000032, // 1171 1, // 1172 -0.0073500000000000032, // 1173 -1, // 1174 0.06000000000000006, // 1175 -0.021021204089360101, // 1176 1, // 1177 0.06000000000000006, // 1178 -0.021021204089360101, // 1179 -1, // 1180 -0.98000000000000054, // 1181 1, // 1182 -0.98000000000000054, // 1183 -1, // 1184 -0.020000000000000018, // 1185 1, // 1186 -0.020000000000000018, // 1187 -1, // 1188 1, // 1189 -1, // 1190 -0.06000000000000006, // 1191 -0.021021204089360101, // 1192 1, // 1193 -0.06000000000000006, // 1194 -0.021021204089360101, // 1195 -1, // 1196 -0.98000000000000054, // 1197 1, // 1198 -0.98000000000000054, // 1199 -1, // 1200 0.020000000000000018, // 1201 1, // 1202 0.020000000000000018, // 1203 -1, // 1204 1, // 1205 -1, // 1206 1, // 1207 -1, // 1208 -1.2740123690521274, // 1209 1, // 1210 -1.2740123690521274, // 1211 -1, // 1212 1, // 1213 1, // 1214 1, // 1215 1, // 1216 1, // 1217 1, // 1218 1, // 1219 1, // 1220 1, // 1221 1, // 1222 1, // 1223 1, // 1224 1, // 1225 1, // 1226 42046084959222096, // 1227 1, // 1228 -42046084959222096, // 1229 1, // 1230 1, // 1231 1, // 1232 1, // 1233 1, // 1234 -1, // 1235 1, // 1236 1, // 1237 -1, // 1238 1, // 1239 1, // 1240 1, // 1241 1, // 1242 -1, // 1243 1, // 1244 1, // 1245 -1, // 1246 1, // 1247 1, // 1248 1, // 1249 1, // 1250 1, // 1251 1, // 1252 1, // 1253 1, // 1254 1, // 1255 1, // 1256 1, // 1257 1, // 1258 1, // 1259 1, // 1260 1, // 1261 1, // 1262 1, // 1263 1, // 1264 1, // 1265 1, // 1266 1, // 1267 1, // 1268 1, // 1269 1, // 1270 0.33000000000000002, // 1271 1, // 1272 0.92000000000000004, // 1273 1, // 1274 0.12, // 1275 1, // 1276 0.040000000000000001, // 1277 1, // 1278 0.18000000000000002, // 1279 1, // 1280 1, // 1281 -0.33000000000000002, // 1282 1, // 1283 -0.92000000000000004, // 1284 1, // 1285 -0.12, // 1286 1, // 1287 -0.040000000000000001, // 1288 1, // 1289 -0.18000000000000002, // 1290 1, // 1291 -1, // 1292 -0.0057272727272727241, // 1293 1, // 1294 -0.0057272727272727241, // 1295 -1, // 1296 0.081818181818181804, // 1297 -0.01638015903067019, // 1298 1, // 1299 0.081818181818181804, // 1300 -0.01638015903067019, // 1301 -1, // 1302 -0.1221818181818181, // 1303 1, // 1304 -0.1221818181818181, // 1305 -1, // 1306 -0.027272727272727268, // 1307 1, // 1308 -0.027272727272727268, // 1309 -1, // 1310 1, // 1311 -1, // 1312 -0.081818181818181804, // 1313 -0.01638015903067019, // 1314 1, // 1315 -0.081818181818181804, // 1316 -0.01638015903067019, // 1317 -1, // 1318 -0.1221818181818181, // 1319 1, // 1320 -0.1221818181818181, // 1321 -1, // 1322 0.027272727272727268, // 1323 1, // 1324 0.027272727272727268, // 1325 -1, // 1326 1, // 1327 -1, // 1328 1, // 1329 -1, // 1330 -0.15883790575195336, // 1331 1, // 1332 -0.15883790575195336, // 1333 -1, // 1334 1, // 1335 -1, // 1336 -0.0057272727272727241, // 1337 1, // 1338 -0.0057272727272727241, // 1339 -1, // 1340 0.081818181818181804, // 1341 -0.01638015903067019, // 1342 1, // 1343 0.081818181818181804, // 1344 -0.01638015903067019, // 1345 -1, // 1346 -0.1221818181818181, // 1347 1, // 1348 -0.1221818181818181, // 1349 -1, // 1350 -0.027272727272727268, // 1351 1, // 1352 -0.027272727272727268, // 1353 -1, // 1354 1, // 1355 -1, // 1356 -0.081818181818181804, // 1357 -0.01638015903067019, // 1358 1, // 1359 -0.081818181818181804, // 1360 -0.01638015903067019, // 1361 -1, // 1362 -0.1221818181818181, // 1363 1, // 1364 -0.1221818181818181, // 1365 -1, // 1366 0.027272727272727268, // 1367 1, // 1368 0.027272727272727268, // 1369 -1, // 1370 1, // 1371 -1, // 1372 1, // 1373 -1, // 1374 -0.15883790575195336, // 1375 1, // 1376 -0.15883790575195336, // 1377 -1, // 1378 1, // 1379 -1, // 1380 -0.0057272727272727241, // 1381 1, // 1382 -0.0057272727272727241, // 1383 -1, // 1384 0.081818181818181804, // 1385 -0.01638015903067019, // 1386 1, // 1387 0.081818181818181804, // 1388 -0.01638015903067019, // 1389 -1, // 1390 -0.12218181818181809, // 1391 1, // 1392 -0.12218181818181809, // 1393 -1, // 1394 -0.027272727272727268, // 1395 1, // 1396 -0.027272727272727268, // 1397 -1, // 1398 1, // 1399 -1, // 1400 -0.081818181818181804, // 1401 -0.01638015903067019, // 1402 1, // 1403 -0.081818181818181804, // 1404 -0.01638015903067019, // 1405 -1, // 1406 -0.12218181818181809, // 1407 1, // 1408 -0.12218181818181809, // 1409 -1, // 1410 0.027272727272727268, // 1411 1, // 1412 0.027272727272727268, // 1413 -1, // 1414 1, // 1415 -1, // 1416 1, // 1417 -1, // 1418 -0.15883790575195333, // 1419 1, // 1420 -0.15883790575195333, // 1421 -1, // 1422 1, // 1423 -1, // 1424 -0.0057272727272727241, // 1425 1, // 1426 -0.0057272727272727241, // 1427 -1, // 1428 0.081818181818181832, // 1429 -0.01638015903067019, // 1430 1, // 1431 0.081818181818181832, // 1432 -0.01638015903067019, // 1433 -1, // 1434 -0.12218181818181811, // 1435 1, // 1436 -0.12218181818181811, // 1437 -1, // 1438 -0.027272727272727271, // 1439 1, // 1440 -0.027272727272727271, // 1441 -1, // 1442 1, // 1443 -1, // 1444 -0.081818181818181832, // 1445 -0.01638015903067019, // 1446 1, // 1447 -0.081818181818181832, // 1448 -0.01638015903067019, // 1449 -1, // 1450 -0.12218181818181811, // 1451 1, // 1452 -0.12218181818181811, // 1453 -1, // 1454 0.027272727272727271, // 1455 1, // 1456 0.027272727272727271, // 1457 -1, // 1458 1, // 1459 -1, // 1460 1, // 1461 -1, // 1462 -0.15883790575195339, // 1463 1, // 1464 -0.15883790575195339, // 1465 -1, // 1466 1, // 1467 -1, // 1468 -0.0057272727272727249, // 1469 1, // 1470 -0.0057272727272727249, // 1471 -1, // 1472 0.081818181818181832, // 1473 -0.016380159030670194, // 1474 1, // 1475 0.081818181818181832, // 1476 -0.016380159030670194, // 1477 -1, // 1478 -0.12218181818181811, // 1479 1, // 1480 -0.12218181818181811, // 1481 -1, // 1482 -0.027272727272727271, // 1483 1, // 1484 -0.027272727272727271, // 1485 -1, // 1486 1, // 1487 -1, // 1488 -0.081818181818181832, // 1489 -0.016380159030670194, // 1490 1, // 1491 -0.081818181818181832, // 1492 -0.016380159030670194, // 1493 -1, // 1494 -0.12218181818181811, // 1495 1, // 1496 -0.12218181818181811, // 1497 -1, // 1498 0.027272727272727271, // 1499 1, // 1500 0.027272727272727271, // 1501 -1, // 1502 1, // 1503 -1, // 1504 1, // 1505 -1, // 1506 -0.15883790575195339, // 1507 1, // 1508 -0.15883790575195339, // 1509 -1, // 1510 1, // 1511 -1, // 1512 -0.0057272727272727215, // 1513 1, // 1514 -0.0057272727272727215, // 1515 -1, // 1516 0.081818181818181776, // 1517 -0.016380159030670183, // 1518 1, // 1519 0.081818181818181776, // 1520 -0.016380159030670183, // 1521 -1, // 1522 -0.12218181818181804, // 1523 1, // 1524 -0.12218181818181804, // 1525 -1, // 1526 -0.027272727272727254, // 1527 1, // 1528 -0.027272727272727254, // 1529 -1, // 1530 1, // 1531 -1, // 1532 -0.081818181818181776, // 1533 -0.016380159030670183, // 1534 1, // 1535 -0.081818181818181776, // 1536 -0.016380159030670183, // 1537 -1, // 1538 -0.12218181818181804, // 1539 1, // 1540 -0.12218181818181804, // 1541 -1, // 1542 0.027272727272727254, // 1543 1, // 1544 0.027272727272727254, // 1545 -1, // 1546 1, // 1547 -1, // 1548 1, // 1549 -1, // 1550 -0.15883790575195331, // 1551 1, // 1552 -0.15883790575195331, // 1553 -1, // 1554 1, // 1555 -1, // 1556 -0.0057272727272727249, // 1557 1, // 1558 -0.0057272727272727249, // 1559 -1, // 1560 0.081818181818181832, // 1561 -0.016380159030670194, // 1562 1, // 1563 0.081818181818181832, // 1564 -0.016380159030670194, // 1565 -1, // 1566 -0.12218181818181811, // 1567 1, // 1568 -0.12218181818181811, // 1569 -1, // 1570 -0.027272727272727271, // 1571 1, // 1572 -0.027272727272727271, // 1573 -1, // 1574 1, // 1575 -1, // 1576 -0.081818181818181832, // 1577 -0.016380159030670194, // 1578 1, // 1579 -0.081818181818181832, // 1580 -0.016380159030670194, // 1581 -1, // 1582 -0.12218181818181811, // 1583 1, // 1584 -0.12218181818181811, // 1585 -1, // 1586 0.027272727272727271, // 1587 1, // 1588 0.027272727272727271, // 1589 -1, // 1590 1, // 1591 -1, // 1592 1, // 1593 -1, // 1594 -0.15883790575195339, // 1595 1, // 1596 -0.15883790575195339, // 1597 -1, // 1598 1, // 1599 -1, // 1600 -0.0057272727272727249, // 1601 1, // 1602 -0.0057272727272727249, // 1603 -1, // 1604 0.081818181818181832, // 1605 -0.016380159030670194, // 1606 1, // 1607 0.081818181818181832, // 1608 -0.016380159030670194, // 1609 -1, // 1610 -0.12218181818181811, // 1611 1, // 1612 -0.12218181818181811, // 1613 -1, // 1614 -0.027272727272727271, // 1615 1, // 1616 -0.027272727272727271, // 1617 -1, // 1618 1, // 1619 -1, // 1620 -0.081818181818181832, // 1621 -0.016380159030670194, // 1622 1, // 1623 -0.081818181818181832, // 1624 -0.016380159030670194, // 1625 -1, // 1626 -0.12218181818181811, // 1627 1, // 1628 -0.12218181818181811, // 1629 -1, // 1630 0.027272727272727271, // 1631 1, // 1632 0.027272727272727271, // 1633 -1, // 1634 1, // 1635 -1, // 1636 1, // 1637 -1, // 1638 -0.15883790575195339, // 1639 1, // 1640 -0.15883790575195339, // 1641 -1, // 1642 1, // 1643 -1, // 1644 -0.00038181818181818266, // 1645 1, // 1646 -0.00038181818181818266, // 1647 -0.00038181818181818266, // 1648 -1, // 1649 0.0054545454545454697, // 1650 -0.0010920106020446824, // 1651 1, // 1652 0.0054545454545454697, // 1653 -0.0010920106020446824, // 1654 -0.0010920106020446824, // 1655 -1, // 1656 -0.0081454545454545633, // 1657 1, // 1658 -0.0081454545454545633, // 1659 -0.0081454545454545633, // 1660 -1, // 1661 -0.001818181818181823, // 1662 1, // 1663 -0.001818181818181823, // 1664 -0.001818181818181823, // 1665 1, // 1666 -1, // 1667 1, // 1668 1, // 1669 -1, // 1670 -0.0054545454545454697, // 1671 -0.0010920106020446824, // 1672 1, // 1673 -0.0054545454545454697, // 1674 -0.0010920106020446824, // 1675 -0.0010920106020446824, // 1676 -1, // 1677 -0.0081454545454545633, // 1678 1, // 1679 -0.0081454545454545633, // 1680 -0.0081454545454545633, // 1681 -1, // 1682 0.001818181818181823, // 1683 1, // 1684 0.001818181818181823, // 1685 0.001818181818181823, // 1686 1, // 1687 -1, // 1688 1, // 1689 1, // 1690 -1, // 1691 1, // 1692 1, // 1693 -1, // 1694 -0.010589193716796921, // 1695 1, // 1696 -0.010589193716796921, // 1697 -0.010589193716796921, // 1698 -1, // 1699 1, // 1700 1, // 1701 -1, // 1702 -0.005345454545454543, // 1703 1, // 1704 -0.005345454545454543, // 1705 -1, // 1706 0.076363636363636356, // 1707 -0.015288148428625513, // 1708 1, // 1709 0.076363636363636356, // 1710 -0.015288148428625513, // 1711 -1, // 1712 -0.11403636363636357, // 1713 1, // 1714 -0.11403636363636357, // 1715 -1, // 1716 -0.025454545454545452, // 1717 1, // 1718 -0.025454545454545452, // 1719 -1, // 1720 1, // 1721 -1, // 1722 -0.076363636363636356, // 1723 -0.015288148428625513, // 1724 1, // 1725 -0.076363636363636356, // 1726 -0.015288148428625513, // 1727 -1, // 1728 -0.11403636363636357, // 1729 1, // 1730 -0.11403636363636357, // 1731 -1, // 1732 0.025454545454545452, // 1733 1, // 1734 0.025454545454545452, // 1735 -1, // 1736 1, // 1737 -1, // 1738 1, // 1739 -1, // 1740 -0.14824871203515649, // 1741 1, // 1742 -0.14824871203515649, // 1743 -1, // 1744 1, // 1745 -1, // 1746 -0.0020045454545454607, // 1747 1, // 1748 -0.0020045454545454607, // 1749 -1, // 1750 0.028636363636363741, // 1751 -0.0057330556607345876, // 1752 1, // 1753 0.028636363636363741, // 1754 -0.0057330556607345876, // 1755 -1, // 1756 -0.042763636363636497, // 1757 1, // 1758 -0.042763636363636497, // 1759 -1, // 1760 -0.0095454545454545792, // 1761 1, // 1762 -0.0095454545454545792, // 1763 -1, // 1764 1, // 1765 -1, // 1766 -0.028636363636363741, // 1767 -0.0057330556607345876, // 1768 1, // 1769 -0.028636363636363741, // 1770 -0.0057330556607345876, // 1771 -1, // 1772 -0.042763636363636497, // 1773 1, // 1774 -0.042763636363636497, // 1775 -1, // 1776 0.0095454545454545792, // 1777 1, // 1778 0.0095454545454545792, // 1779 -1, // 1780 1, // 1781 -1, // 1782 1, // 1783 -1, // 1784 -0.055593267013183886, // 1785 1, // 1786 -0.055593267013183886, // 1787 -1, // 1788 1, // 1789 -1, // 1790 -0.0010500000000000006, // 1791 1, // 1792 -0.0010500000000000006, // 1793 -0.0010500000000000006, // 1794 -1, // 1795 0.015000000000000015, // 1796 -0.0030030291556228717, // 1797 1, // 1798 0.015000000000000015, // 1799 -0.0030030291556228717, // 1800 -0.0030030291556228717, // 1801 -1, // 1802 -0.02240000000000001, // 1803 1, // 1804 -0.02240000000000001, // 1805 -0.02240000000000001, // 1806 -1, // 1807 -0.0050000000000000044, // 1808 1, // 1809 -0.0050000000000000044, // 1810 -0.0050000000000000044, // 1811 1, // 1812 -1, // 1813 1, // 1814 1, // 1815 -1, // 1816 -0.015000000000000015, // 1817 -0.0030030291556228717, // 1818 1, // 1819 -0.015000000000000015, // 1820 -0.0030030291556228717, // 1821 -0.0030030291556228717, // 1822 -1, // 1823 -0.02240000000000001, // 1824 1, // 1825 -0.02240000000000001, // 1826 -0.02240000000000001, // 1827 -1, // 1828 0.0050000000000000044, // 1829 1, // 1830 0.0050000000000000044, // 1831 0.0050000000000000044, // 1832 1, // 1833 -1, // 1834 1, // 1835 1, // 1836 -1, // 1837 1, // 1838 1, // 1839 -1, // 1840 -0.029120282721191482, // 1841 1, // 1842 -0.029120282721191482, // 1843 -0.029120282721191482, // 1844 -1, // 1845 1, // 1846 1, // 1847 -1, // 1848 -0.001049999999999993, // 1849 1, // 1850 -0.001049999999999993, // 1851 -1, // 1852 0.014999999999999909, // 1853 -0.0030030291556228505, // 1854 1, // 1855 0.014999999999999909, // 1856 -0.0030030291556228505, // 1857 -1, // 1858 -0.022399999999999847, // 1859 1, // 1860 -0.022399999999999847, // 1861 -1, // 1862 -0.0049999999999999689, // 1863 1, // 1864 -0.0049999999999999689, // 1865 -1, // 1866 1, // 1867 -1, // 1868 -0.014999999999999909, // 1869 -0.0030030291556228505, // 1870 1, // 1871 -0.014999999999999909, // 1872 -0.0030030291556228505, // 1873 -1, // 1874 -0.022399999999999847, // 1875 1, // 1876 -0.022399999999999847, // 1877 -1, // 1878 0.0049999999999999689, // 1879 1, // 1880 0.0049999999999999689, // 1881 -1, // 1882 1, // 1883 -1, // 1884 1, // 1885 -1, // 1886 -0.029120282721191274, // 1887 1, // 1888 -0.029120282721191274, // 1889 -1, // 1890 1, // 1891 -1, // 1892 -0.0016227272727272709, // 1893 1, // 1894 -0.0016227272727272709, // 1895 -1, // 1896 0.023181818181818165, // 1897 -0.0046410450586898853, // 1898 1, // 1899 0.023181818181818165, // 1900 -0.0046410450586898853, // 1901 -1, // 1902 -0.034618181818181777, // 1903 1, // 1904 -0.034618181818181777, // 1905 -1, // 1906 -0.0077272727272727215, // 1907 1, // 1908 -0.0077272727272727215, // 1909 -1, // 1910 1, // 1911 -1, // 1912 -0.023181818181818165, // 1913 -0.0046410450586898853, // 1914 1, // 1915 -0.023181818181818165, // 1916 -0.0046410450586898853, // 1917 -1, // 1918 -0.034618181818181777, // 1919 1, // 1920 -0.034618181818181777, // 1921 -1, // 1922 0.0077272727272727215, // 1923 1, // 1924 0.0077272727272727215, // 1925 -1, // 1926 1, // 1927 -1, // 1928 1, // 1929 -1, // 1930 -0.045004073296386761, // 1931 1, // 1932 -0.045004073296386761, // 1933 -1, // 1934 1, // 1935 -1, // 1936 -0.003627272727272732, // 1937 1, // 1938 -0.003627272727272732, // 1939 -0.003627272727272732, // 1940 -1, // 1941 0.051818181818181909, // 1942 -0.010374100719424474, // 1943 1, // 1944 0.051818181818181909, // 1945 -0.010374100719424474, // 1946 -0.010374100719424474, // 1947 -1, // 1948 -0.077381818181818274, // 1949 1, // 1950 -0.077381818181818274, // 1951 -0.077381818181818274, // 1952 -1, // 1953 -0.017272727272727301, // 1954 1, // 1955 -0.017272727272727301, // 1956 -0.017272727272727301, // 1957 1, // 1958 -1, // 1959 1, // 1960 1, // 1961 -1, // 1962 -0.051818181818181909, // 1963 -0.010374100719424474, // 1964 1, // 1965 -0.051818181818181909, // 1966 -0.010374100719424474, // 1967 -0.010374100719424474, // 1968 -1, // 1969 -0.077381818181818274, // 1970 1, // 1971 -0.077381818181818274, // 1972 -0.077381818181818274, // 1973 -1, // 1974 0.017272727272727301, // 1975 1, // 1976 0.017272727272727301, // 1977 0.017272727272727301, // 1978 1, // 1979 -1, // 1980 1, // 1981 1, // 1982 -1, // 1983 1, // 1984 1, // 1985 -1, // 1986 -0.10059734030957064, // 1987 1, // 1988 -0.10059734030957064, // 1989 -0.10059734030957064, // 1990 -1, // 1991 1, // 1992 1, // 1993 -1, // 1994 -0.0020999999999999934, // 1995 1, // 1996 -0.0020999999999999934, // 1997 -1, // 1998 0.029999999999999919, // 1999 -0.0060060583112457209, // 2000 1, // 2001 0.029999999999999919, // 2002 -0.0060060583112457209, // 2003 -1, // 2004 -0.044799999999999854, // 2005 1, // 2006 -0.044799999999999854, // 2007 -1, // 2008 -0.0099999999999999725, // 2009 1, // 2010 -0.0099999999999999725, // 2011 -1, // 2012 1, // 2013 -1, // 2014 -0.029999999999999919, // 2015 -0.0060060583112457209, // 2016 1, // 2017 -0.029999999999999919, // 2018 -0.0060060583112457209, // 2019 -1, // 2020 -0.044799999999999854, // 2021 1, // 2022 -0.044799999999999854, // 2023 -1, // 2024 0.0099999999999999725, // 2025 1, // 2026 0.0099999999999999725, // 2027 -1, // 2028 1, // 2029 -1, // 2030 1, // 2031 -1, // 2032 -0.05824056544238275, // 2033 1, // 2034 -0.05824056544238275, // 2035 -1, // 2036 1, // 2037 1, // 2038 -42046084959222096, // 2039 42046084959222096, // 2040 1, // 2041 1, // 2042 1, // 2043 1, // 2044 1, // 2045 1, // 2046 1, // 2047 1, // 2048 1, // 2049 1, // 2050 1, // 2051 1, // 2052 1, // 2053 1, // 2054 1, // 2055 1, // 2056 1, // 2057 1, // 2058 1, // 2059 1, // 2060 1, // 2061 1, // 2062 1, // 2063 1, // 2064 1, // 2065 1, // 2066 1, // 2067 1, // 2068 1, // 2069 1, // 2070 1, // 2071 1, // 2072 1, // 2073 1, // 2074 0.52000000000000002, // 2075 1, // 2076 0.44, // 2077 1, // 2078 0.57999999999999996, // 2079 1, // 2080 1, // 2081 -0.52000000000000002, // 2082 1, // 2083 -0.44, // 2084 1, // 2085 -0.57999999999999996, // 2086 1 }; // 2087 int ja[nrElements] = { 1, // 0 10, // 1 13, // 2 22, // 3 344, // 4 2, // 5 3, // 6 5, // 7 14, // 8 15, // 9 17, // 10 343, // 11 3, // 12 4, // 13 15, // 14 16, // 15 348, // 16 4, // 17 5, // 18 16, // 19 17, // 20 343, // 21 348, // 22 5, // 23 17, // 24 343, // 25 6, // 26 7, // 27 9, // 28 18, // 29 19, // 30 21, // 31 345, // 32 7, // 33 8, // 34 19, // 35 20, // 36 346, // 37 8, // 38 9, // 39 20, // 40 21, // 41 345, // 42 346, // 43 9, // 44 21, // 45 345, // 46 10, // 47 22, // 48 344, // 49 11, // 50 12, // 51 23, // 52 24, // 53 347, // 54 12, // 55 24, // 56 347, // 57 13, // 58 22, // 59 25, // 60 34, // 61 14, // 62 15, // 63 17, // 64 26, // 65 27, // 66 29, // 67 15, // 68 16, // 69 27, // 70 28, // 71 16, // 72 17, // 73 28, // 74 29, // 75 17, // 76 29, // 77 18, // 78 19, // 79 21, // 80 30, // 81 31, // 82 33, // 83 19, // 84 20, // 85 31, // 86 32, // 87 20, // 88 21, // 89 32, // 90 33, // 91 21, // 92 33, // 93 22, // 94 34, // 95 23, // 96 24, // 97 35, // 98 36, // 99 24, // 100 36, // 101 25, // 102 34, // 103 37, // 104 46, // 105 26, // 106 27, // 107 29, // 108 38, // 109 39, // 110 41, // 111 27, // 112 28, // 113 39, // 114 40, // 115 28, // 116 29, // 117 40, // 118 41, // 119 29, // 120 41, // 121 30, // 122 31, // 123 33, // 124 42, // 125 43, // 126 45, // 127 31, // 128 32, // 129 43, // 130 44, // 131 32, // 132 33, // 133 44, // 134 45, // 135 33, // 136 45, // 137 34, // 138 46, // 139 35, // 140 36, // 141 47, // 142 48, // 143 36, // 144 48, // 145 37, // 146 46, // 147 49, // 148 58, // 149 38, // 150 39, // 151 41, // 152 50, // 153 51, // 154 53, // 155 39, // 156 40, // 157 51, // 158 52, // 159 40, // 160 41, // 161 52, // 162 53, // 163 41, // 164 53, // 165 42, // 166 43, // 167 45, // 168 54, // 169 55, // 170 57, // 171 43, // 172 44, // 173 55, // 174 56, // 175 44, // 176 45, // 177 56, // 178 57, // 179 45, // 180 57, // 181 46, // 182 58, // 183 47, // 184 48, // 185 59, // 186 60, // 187 48, // 188 60, // 189 49, // 190 58, // 191 61, // 192 70, // 193 338, // 194 50, // 195 51, // 196 53, // 197 62, // 198 63, // 199 65, // 200 337, // 201 51, // 202 52, // 203 63, // 204 64, // 205 342, // 206 52, // 207 53, // 208 64, // 209 65, // 210 337, // 211 342, // 212 53, // 213 65, // 214 337, // 215 54, // 216 55, // 217 57, // 218 66, // 219 67, // 220 69, // 221 339, // 222 55, // 223 56, // 224 67, // 225 68, // 226 340, // 227 56, // 228 57, // 229 68, // 230 69, // 231 339, // 232 340, // 233 57, // 234 69, // 235 339, // 236 58, // 237 70, // 238 338, // 239 59, // 240 60, // 241 71, // 242 72, // 243 341, // 244 60, // 245 72, // 246 341, // 247 61, // 248 70, // 249 73, // 250 82, // 251 62, // 252 63, // 253 65, // 254 74, // 255 75, // 256 77, // 257 63, // 258 64, // 259 75, // 260 76, // 261 64, // 262 65, // 263 76, // 264 77, // 265 65, // 266 77, // 267 66, // 268 67, // 269 69, // 270 78, // 271 79, // 272 81, // 273 67, // 274 68, // 275 79, // 276 80, // 277 68, // 278 69, // 279 80, // 280 81, // 281 69, // 282 81, // 283 70, // 284 82, // 285 71, // 286 72, // 287 83, // 288 84, // 289 72, // 290 84, // 291 73, // 292 82, // 293 85, // 294 94, // 295 74, // 296 75, // 297 77, // 298 86, // 299 87, // 300 89, // 301 75, // 302 76, // 303 87, // 304 88, // 305 76, // 306 77, // 307 88, // 308 89, // 309 77, // 310 89, // 311 78, // 312 79, // 313 81, // 314 90, // 315 91, // 316 93, // 317 79, // 318 80, // 319 91, // 320 92, // 321 80, // 322 81, // 323 92, // 324 93, // 325 81, // 326 93, // 327 82, // 328 94, // 329 83, // 330 84, // 331 95, // 332 96, // 333 84, // 334 96, // 335 85, // 336 94, // 337 97, // 338 106, // 339 350, // 340 86, // 341 87, // 342 89, // 343 98, // 344 99, // 345 101, // 346 349, // 347 87, // 348 88, // 349 99, // 350 100, // 351 354, // 352 88, // 353 89, // 354 100, // 355 101, // 356 349, // 357 354, // 358 89, // 359 101, // 360 349, // 361 90, // 362 91, // 363 93, // 364 102, // 365 103, // 366 105, // 367 351, // 368 91, // 369 92, // 370 103, // 371 104, // 372 352, // 373 92, // 374 93, // 375 104, // 376 105, // 377 351, // 378 352, // 379 93, // 380 105, // 381 351, // 382 94, // 383 106, // 384 350, // 385 95, // 386 96, // 387 107, // 388 108, // 389 353, // 390 96, // 391 108, // 392 353, // 393 97, // 394 106, // 395 109, // 396 118, // 397 98, // 398 99, // 399 101, // 400 110, // 401 111, // 402 113, // 403 99, // 404 100, // 405 111, // 406 112, // 407 100, // 408 101, // 409 112, // 410 113, // 411 101, // 412 113, // 413 102, // 414 103, // 415 105, // 416 114, // 417 115, // 418 117, // 419 103, // 420 104, // 421 115, // 422 116, // 423 104, // 424 105, // 425 116, // 426 117, // 427 105, // 428 117, // 429 106, // 430 118, // 431 107, // 432 108, // 433 119, // 434 120, // 435 108, // 436 120, // 437 109, // 438 118, // 439 121, // 440 130, // 441 110, // 442 111, // 443 113, // 444 122, // 445 123, // 446 125, // 447 111, // 448 112, // 449 123, // 450 124, // 451 112, // 452 113, // 453 124, // 454 125, // 455 113, // 456 125, // 457 114, // 458 115, // 459 117, // 460 126, // 461 127, // 462 129, // 463 115, // 464 116, // 465 127, // 466 128, // 467 116, // 468 117, // 469 128, // 470 129, // 471 117, // 472 129, // 473 118, // 474 130, // 475 119, // 476 120, // 477 131, // 478 132, // 479 120, // 480 132, // 481 121, // 482 130, // 483 133, // 484 142, // 485 122, // 486 123, // 487 125, // 488 134, // 489 135, // 490 137, // 491 123, // 492 124, // 493 135, // 494 136, // 495 124, // 496 125, // 497 136, // 498 137, // 499 125, // 500 137, // 501 126, // 502 127, // 503 129, // 504 138, // 505 139, // 506 141, // 507 127, // 508 128, // 509 139, // 510 140, // 511 128, // 512 129, // 513 140, // 514 141, // 515 129, // 516 141, // 517 130, // 518 142, // 519 131, // 520 132, // 521 143, // 522 144, // 523 132, // 524 144, // 525 133, // 526 142, // 527 145, // 528 154, // 529 326, // 530 134, // 531 135, // 532 137, // 533 146, // 534 147, // 535 149, // 536 325, // 537 135, // 538 136, // 539 147, // 540 148, // 541 330, // 542 136, // 543 137, // 544 148, // 545 149, // 546 325, // 547 330, // 548 137, // 549 149, // 550 325, // 551 138, // 552 139, // 553 141, // 554 150, // 555 151, // 556 153, // 557 327, // 558 139, // 559 140, // 560 151, // 561 152, // 562 328, // 563 140, // 564 141, // 565 152, // 566 153, // 567 327, // 568 328, // 569 141, // 570 153, // 571 327, // 572 142, // 573 154, // 574 326, // 575 143, // 576 144, // 577 155, // 578 156, // 579 329, // 580 144, // 581 156, // 582 329, // 583 145, // 584 154, // 585 157, // 586 166, // 587 146, // 588 147, // 589 149, // 590 158, // 591 159, // 592 161, // 593 147, // 594 148, // 595 159, // 596 160, // 597 148, // 598 149, // 599 160, // 600 161, // 601 149, // 602 161, // 603 150, // 604 151, // 605 153, // 606 162, // 607 163, // 608 165, // 609 151, // 610 152, // 611 163, // 612 164, // 613 152, // 614 153, // 615 164, // 616 165, // 617 153, // 618 165, // 619 154, // 620 166, // 621 155, // 622 156, // 623 167, // 624 168, // 625 156, // 626 168, // 627 157, // 628 166, // 629 169, // 630 178, // 631 158, // 632 159, // 633 161, // 634 170, // 635 171, // 636 173, // 637 159, // 638 160, // 639 171, // 640 172, // 641 160, // 642 161, // 643 172, // 644 173, // 645 161, // 646 173, // 647 162, // 648 163, // 649 165, // 650 174, // 651 175, // 652 177, // 653 163, // 654 164, // 655 175, // 656 176, // 657 164, // 658 165, // 659 176, // 660 177, // 661 165, // 662 177, // 663 166, // 664 178, // 665 167, // 666 168, // 667 179, // 668 180, // 669 168, // 670 180, // 671 169, // 672 178, // 673 181, // 674 190, // 675 170, // 676 171, // 677 173, // 678 182, // 679 183, // 680 185, // 681 171, // 682 172, // 683 183, // 684 184, // 685 172, // 686 173, // 687 184, // 688 185, // 689 173, // 690 185, // 691 174, // 692 175, // 693 177, // 694 186, // 695 187, // 696 189, // 697 175, // 698 176, // 699 187, // 700 188, // 701 176, // 702 177, // 703 188, // 704 189, // 705 177, // 706 189, // 707 178, // 708 190, // 709 179, // 710 180, // 711 191, // 712 192, // 713 180, // 714 192, // 715 181, // 716 190, // 717 193, // 718 202, // 719 182, // 720 183, // 721 185, // 722 194, // 723 195, // 724 197, // 725 183, // 726 184, // 727 195, // 728 196, // 729 184, // 730 185, // 731 196, // 732 197, // 733 185, // 734 197, // 735 186, // 736 187, // 737 189, // 738 198, // 739 199, // 740 201, // 741 187, // 742 188, // 743 199, // 744 200, // 745 188, // 746 189, // 747 200, // 748 201, // 749 189, // 750 201, // 751 190, // 752 202, // 753 191, // 754 192, // 755 203, // 756 204, // 757 192, // 758 204, // 759 193, // 760 202, // 761 205, // 762 214, // 763 194, // 764 195, // 765 197, // 766 206, // 767 207, // 768 209, // 769 195, // 770 196, // 771 207, // 772 208, // 773 196, // 774 197, // 775 208, // 776 209, // 777 197, // 778 209, // 779 198, // 780 199, // 781 201, // 782 210, // 783 211, // 784 213, // 785 199, // 786 200, // 787 211, // 788 212, // 789 200, // 790 201, // 791 212, // 792 213, // 793 201, // 794 213, // 795 202, // 796 214, // 797 203, // 798 204, // 799 215, // 800 216, // 801 204, // 802 216, // 803 205, // 804 214, // 805 217, // 806 226, // 807 206, // 808 207, // 809 209, // 810 218, // 811 219, // 812 221, // 813 207, // 814 208, // 815 219, // 816 220, // 817 208, // 818 209, // 819 220, // 820 221, // 821 209, // 822 221, // 823 210, // 824 211, // 825 213, // 826 222, // 827 223, // 828 225, // 829 211, // 830 212, // 831 223, // 832 224, // 833 212, // 834 213, // 835 224, // 836 225, // 837 213, // 838 225, // 839 214, // 840 226, // 841 215, // 842 216, // 843 227, // 844 228, // 845 216, // 846 228, // 847 217, // 848 226, // 849 229, // 850 238, // 851 218, // 852 219, // 853 221, // 854 230, // 855 231, // 856 233, // 857 219, // 858 220, // 859 231, // 860 232, // 861 220, // 862 221, // 863 232, // 864 233, // 865 221, // 866 233, // 867 222, // 868 223, // 869 225, // 870 234, // 871 235, // 872 237, // 873 223, // 874 224, // 875 235, // 876 236, // 877 224, // 878 225, // 879 236, // 880 237, // 881 225, // 882 237, // 883 226, // 884 238, // 885 227, // 886 228, // 887 239, // 888 240, // 889 228, // 890 240, // 891 229, // 892 238, // 893 241, // 894 250, // 895 230, // 896 231, // 897 233, // 898 242, // 899 243, // 900 245, // 901 231, // 902 232, // 903 243, // 904 244, // 905 232, // 906 233, // 907 244, // 908 245, // 909 233, // 910 245, // 911 234, // 912 235, // 913 237, // 914 246, // 915 247, // 916 249, // 917 235, // 918 236, // 919 247, // 920 248, // 921 236, // 922 237, // 923 248, // 924 249, // 925 237, // 926 249, // 927 238, // 928 250, // 929 239, // 930 240, // 931 251, // 932 252, // 933 240, // 934 252, // 935 241, // 936 250, // 937 253, // 938 262, // 939 242, // 940 243, // 941 245, // 942 254, // 943 255, // 944 257, // 945 243, // 946 244, // 947 255, // 948 256, // 949 244, // 950 245, // 951 256, // 952 257, // 953 245, // 954 257, // 955 246, // 956 247, // 957 249, // 958 258, // 959 259, // 960 261, // 961 247, // 962 248, // 963 259, // 964 260, // 965 248, // 966 249, // 967 260, // 968 261, // 969 249, // 970 261, // 971 250, // 972 262, // 973 251, // 974 252, // 975 263, // 976 264, // 977 252, // 978 264, // 979 253, // 980 262, // 981 265, // 982 274, // 983 254, // 984 255, // 985 257, // 986 266, // 987 267, // 988 269, // 989 255, // 990 256, // 991 267, // 992 268, // 993 256, // 994 257, // 995 268, // 996 269, // 997 257, // 998 269, // 999 258, // 1000 259, // 1001 261, // 1002 270, // 1003 271, // 1004 273, // 1005 259, // 1006 260, // 1007 271, // 1008 272, // 1009 260, // 1010 261, // 1011 272, // 1012 273, // 1013 261, // 1014 273, // 1015 262, // 1016 274, // 1017 263, // 1018 264, // 1019 275, // 1020 276, // 1021 264, // 1022 276, // 1023 265, // 1024 274, // 1025 277, // 1026 286, // 1027 266, // 1028 267, // 1029 269, // 1030 278, // 1031 279, // 1032 281, // 1033 267, // 1034 268, // 1035 279, // 1036 280, // 1037 268, // 1038 269, // 1039 280, // 1040 281, // 1041 269, // 1042 281, // 1043 270, // 1044 271, // 1045 273, // 1046 282, // 1047 283, // 1048 285, // 1049 271, // 1050 272, // 1051 283, // 1052 284, // 1053 272, // 1054 273, // 1055 284, // 1056 285, // 1057 273, // 1058 285, // 1059 274, // 1060 286, // 1061 275, // 1062 276, // 1063 287, // 1064 288, // 1065 276, // 1066 288, // 1067 277, // 1068 286, // 1069 289, // 1070 298, // 1071 332, // 1072 278, // 1073 279, // 1074 281, // 1075 290, // 1076 291, // 1077 293, // 1078 331, // 1079 279, // 1080 280, // 1081 291, // 1082 292, // 1083 336, // 1084 280, // 1085 281, // 1086 292, // 1087 293, // 1088 331, // 1089 336, // 1090 281, // 1091 293, // 1092 331, // 1093 282, // 1094 283, // 1095 285, // 1096 294, // 1097 295, // 1098 297, // 1099 333, // 1100 283, // 1101 284, // 1102 295, // 1103 296, // 1104 334, // 1105 284, // 1106 285, // 1107 296, // 1108 297, // 1109 333, // 1110 334, // 1111 285, // 1112 297, // 1113 333, // 1114 286, // 1115 298, // 1116 332, // 1117 287, // 1118 288, // 1119 299, // 1120 300, // 1121 335, // 1122 288, // 1123 300, // 1124 335, // 1125 289, // 1126 298, // 1127 301, // 1128 310, // 1129 290, // 1130 291, // 1131 293, // 1132 302, // 1133 303, // 1134 305, // 1135 291, // 1136 292, // 1137 303, // 1138 304, // 1139 292, // 1140 293, // 1141 304, // 1142 305, // 1143 293, // 1144 305, // 1145 294, // 1146 295, // 1147 297, // 1148 306, // 1149 307, // 1150 309, // 1151 295, // 1152 296, // 1153 307, // 1154 308, // 1155 296, // 1156 297, // 1157 308, // 1158 309, // 1159 297, // 1160 309, // 1161 298, // 1162 310, // 1163 299, // 1164 300, // 1165 311, // 1166 312, // 1167 300, // 1168 312, // 1169 301, // 1170 310, // 1171 313, // 1172 322, // 1173 302, // 1174 303, // 1175 305, // 1176 314, // 1177 315, // 1178 317, // 1179 303, // 1180 304, // 1181 315, // 1182 316, // 1183 304, // 1184 305, // 1185 316, // 1186 317, // 1187 305, // 1188 317, // 1189 306, // 1190 307, // 1191 309, // 1192 318, // 1193 319, // 1194 321, // 1195 307, // 1196 308, // 1197 319, // 1198 320, // 1199 308, // 1200 309, // 1201 320, // 1202 321, // 1203 309, // 1204 321, // 1205 310, // 1206 322, // 1207 311, // 1208 312, // 1209 323, // 1210 324, // 1211 312, // 1212 324, // 1213 146, // 1214 326, // 1215 150, // 1216 328, // 1217 329, // 1218 330, // 1219 290, // 1220 289, // 1221 294, // 1222 334, // 1223 335, // 1224 336, // 1225 337, // 1226 61, // 1227 338, // 1228 499, // 1229 339, // 1230 340, // 1231 341, // 1232 342, // 1233 14, // 1234 464, // 1235 344, // 1236 18, // 1237 468, // 1238 346, // 1239 347, // 1240 348, // 1241 98, // 1242 536, // 1243 350, // 1244 102, // 1245 540, // 1246 352, // 1247 353, // 1248 354, // 1249 317, // 1250 322, // 1251 321, // 1252 320, // 1253 324, // 1254 316, // 1255 325, // 1256 331, // 1257 337, // 1258 343, // 1259 349, // 1260 326, // 1261 332, // 1262 338, // 1263 344, // 1264 350, // 1265 327, // 1266 333, // 1267 339, // 1268 345, // 1269 351, // 1270 327, // 1271 328, // 1272 333, // 1273 334, // 1274 339, // 1275 340, // 1276 345, // 1277 346, // 1278 351, // 1279 352, // 1280 11, // 1281 325, // 1282 330, // 1283 331, // 1284 336, // 1285 337, // 1286 342, // 1287 343, // 1288 348, // 1289 349, // 1290 354, // 1291 355, // 1292 364, // 1293 367, // 1294 376, // 1295 356, // 1296 357, // 1297 359, // 1298 368, // 1299 369, // 1300 371, // 1301 357, // 1302 358, // 1303 369, // 1304 370, // 1305 358, // 1306 359, // 1307 370, // 1308 371, // 1309 359, // 1310 371, // 1311 360, // 1312 361, // 1313 363, // 1314 372, // 1315 373, // 1316 375, // 1317 361, // 1318 362, // 1319 373, // 1320 374, // 1321 362, // 1322 363, // 1323 374, // 1324 375, // 1325 363, // 1326 375, // 1327 364, // 1328 376, // 1329 365, // 1330 366, // 1331 377, // 1332 378, // 1333 366, // 1334 378, // 1335 367, // 1336 376, // 1337 379, // 1338 388, // 1339 368, // 1340 369, // 1341 371, // 1342 380, // 1343 381, // 1344 383, // 1345 369, // 1346 370, // 1347 381, // 1348 382, // 1349 370, // 1350 371, // 1351 382, // 1352 383, // 1353 371, // 1354 383, // 1355 372, // 1356 373, // 1357 375, // 1358 384, // 1359 385, // 1360 387, // 1361 373, // 1362 374, // 1363 385, // 1364 386, // 1365 374, // 1366 375, // 1367 386, // 1368 387, // 1369 375, // 1370 387, // 1371 376, // 1372 388, // 1373 377, // 1374 378, // 1375 389, // 1376 390, // 1377 378, // 1378 390, // 1379 379, // 1380 388, // 1381 391, // 1382 400, // 1383 380, // 1384 381, // 1385 383, // 1386 392, // 1387 393, // 1388 395, // 1389 381, // 1390 382, // 1391 393, // 1392 394, // 1393 382, // 1394 383, // 1395 394, // 1396 395, // 1397 383, // 1398 395, // 1399 384, // 1400 385, // 1401 387, // 1402 396, // 1403 397, // 1404 399, // 1405 385, // 1406 386, // 1407 397, // 1408 398, // 1409 386, // 1410 387, // 1411 398, // 1412 399, // 1413 387, // 1414 399, // 1415 388, // 1416 400, // 1417 389, // 1418 390, // 1419 401, // 1420 402, // 1421 390, // 1422 402, // 1423 391, // 1424 400, // 1425 403, // 1426 412, // 1427 392, // 1428 393, // 1429 395, // 1430 404, // 1431 405, // 1432 407, // 1433 393, // 1434 394, // 1435 405, // 1436 406, // 1437 394, // 1438 395, // 1439 406, // 1440 407, // 1441 395, // 1442 407, // 1443 396, // 1444 397, // 1445 399, // 1446 408, // 1447 409, // 1448 411, // 1449 397, // 1450 398, // 1451 409, // 1452 410, // 1453 398, // 1454 399, // 1455 410, // 1456 411, // 1457 399, // 1458 411, // 1459 400, // 1460 412, // 1461 401, // 1462 402, // 1463 413, // 1464 414, // 1465 402, // 1466 414, // 1467 403, // 1468 412, // 1469 415, // 1470 424, // 1471 404, // 1472 405, // 1473 407, // 1474 416, // 1475 417, // 1476 419, // 1477 405, // 1478 406, // 1479 417, // 1480 418, // 1481 406, // 1482 407, // 1483 418, // 1484 419, // 1485 407, // 1486 419, // 1487 408, // 1488 409, // 1489 411, // 1490 420, // 1491 421, // 1492 423, // 1493 409, // 1494 410, // 1495 421, // 1496 422, // 1497 410, // 1498 411, // 1499 422, // 1500 423, // 1501 411, // 1502 423, // 1503 412, // 1504 424, // 1505 413, // 1506 414, // 1507 425, // 1508 426, // 1509 414, // 1510 426, // 1511 415, // 1512 424, // 1513 427, // 1514 436, // 1515 416, // 1516 417, // 1517 419, // 1518 428, // 1519 429, // 1520 431, // 1521 417, // 1522 418, // 1523 429, // 1524 430, // 1525 418, // 1526 419, // 1527 430, // 1528 431, // 1529 419, // 1530 431, // 1531 420, // 1532 421, // 1533 423, // 1534 432, // 1535 433, // 1536 435, // 1537 421, // 1538 422, // 1539 433, // 1540 434, // 1541 422, // 1542 423, // 1543 434, // 1544 435, // 1545 423, // 1546 435, // 1547 424, // 1548 436, // 1549 425, // 1550 426, // 1551 437, // 1552 438, // 1553 426, // 1554 438, // 1555 427, // 1556 436, // 1557 439, // 1558 448, // 1559 428, // 1560 429, // 1561 431, // 1562 440, // 1563 441, // 1564 443, // 1565 429, // 1566 430, // 1567 441, // 1568 442, // 1569 430, // 1570 431, // 1571 442, // 1572 443, // 1573 431, // 1574 443, // 1575 432, // 1576 433, // 1577 435, // 1578 444, // 1579 445, // 1580 447, // 1581 433, // 1582 434, // 1583 445, // 1584 446, // 1585 434, // 1586 435, // 1587 446, // 1588 447, // 1589 435, // 1590 447, // 1591 436, // 1592 448, // 1593 437, // 1594 438, // 1595 449, // 1596 450, // 1597 438, // 1598 450, // 1599 439, // 1600 448, // 1601 451, // 1602 460, // 1603 440, // 1604 441, // 1605 443, // 1606 452, // 1607 453, // 1608 455, // 1609 441, // 1610 442, // 1611 453, // 1612 454, // 1613 442, // 1614 443, // 1615 454, // 1616 455, // 1617 443, // 1618 455, // 1619 444, // 1620 445, // 1621 447, // 1622 456, // 1623 457, // 1624 459, // 1625 445, // 1626 446, // 1627 457, // 1628 458, // 1629 446, // 1630 447, // 1631 458, // 1632 459, // 1633 447, // 1634 459, // 1635 448, // 1636 460, // 1637 449, // 1638 450, // 1639 461, // 1640 462, // 1641 450, // 1642 462, // 1643 451, // 1644 460, // 1645 463, // 1646 472, // 1647 566, // 1648 452, // 1649 453, // 1650 455, // 1651 464, // 1652 465, // 1653 467, // 1654 565, // 1655 453, // 1656 454, // 1657 465, // 1658 466, // 1659 570, // 1660 454, // 1661 455, // 1662 466, // 1663 467, // 1664 565, // 1665 570, // 1666 455, // 1667 467, // 1668 565, // 1669 456, // 1670 457, // 1671 459, // 1672 468, // 1673 469, // 1674 471, // 1675 567, // 1676 457, // 1677 458, // 1678 469, // 1679 470, // 1680 568, // 1681 458, // 1682 459, // 1683 470, // 1684 471, // 1685 567, // 1686 568, // 1687 459, // 1688 471, // 1689 567, // 1690 460, // 1691 472, // 1692 566, // 1693 461, // 1694 462, // 1695 473, // 1696 474, // 1697 569, // 1698 462, // 1699 474, // 1700 569, // 1701 463, // 1702 472, // 1703 475, // 1704 484, // 1705 464, // 1706 465, // 1707 467, // 1708 476, // 1709 477, // 1710 479, // 1711 465, // 1712 466, // 1713 477, // 1714 478, // 1715 466, // 1716 467, // 1717 478, // 1718 479, // 1719 467, // 1720 479, // 1721 468, // 1722 469, // 1723 471, // 1724 480, // 1725 481, // 1726 483, // 1727 469, // 1728 470, // 1729 481, // 1730 482, // 1731 470, // 1732 471, // 1733 482, // 1734 483, // 1735 471, // 1736 483, // 1737 472, // 1738 484, // 1739 473, // 1740 474, // 1741 485, // 1742 486, // 1743 474, // 1744 486, // 1745 475, // 1746 484, // 1747 487, // 1748 496, // 1749 476, // 1750 477, // 1751 479, // 1752 488, // 1753 489, // 1754 491, // 1755 477, // 1756 478, // 1757 489, // 1758 490, // 1759 478, // 1760 479, // 1761 490, // 1762 491, // 1763 479, // 1764 491, // 1765 480, // 1766 481, // 1767 483, // 1768 492, // 1769 493, // 1770 495, // 1771 481, // 1772 482, // 1773 493, // 1774 494, // 1775 482, // 1776 483, // 1777 494, // 1778 495, // 1779 483, // 1780 495, // 1781 484, // 1782 496, // 1783 485, // 1784 486, // 1785 497, // 1786 498, // 1787 486, // 1788 498, // 1789 487, // 1790 496, // 1791 499, // 1792 508, // 1793 560, // 1794 488, // 1795 489, // 1796 491, // 1797 500, // 1798 501, // 1799 503, // 1800 559, // 1801 489, // 1802 490, // 1803 501, // 1804 502, // 1805 564, // 1806 490, // 1807 491, // 1808 502, // 1809 503, // 1810 559, // 1811 564, // 1812 491, // 1813 503, // 1814 559, // 1815 492, // 1816 493, // 1817 495, // 1818 504, // 1819 505, // 1820 507, // 1821 561, // 1822 493, // 1823 494, // 1824 505, // 1825 506, // 1826 562, // 1827 494, // 1828 495, // 1829 506, // 1830 507, // 1831 561, // 1832 562, // 1833 495, // 1834 507, // 1835 561, // 1836 496, // 1837 508, // 1838 560, // 1839 497, // 1840 498, // 1841 509, // 1842 510, // 1843 563, // 1844 498, // 1845 510, // 1846 563, // 1847 499, // 1848 508, // 1849 511, // 1850 520, // 1851 500, // 1852 501, // 1853 503, // 1854 512, // 1855 513, // 1856 515, // 1857 501, // 1858 502, // 1859 513, // 1860 514, // 1861 502, // 1862 503, // 1863 514, // 1864 515, // 1865 503, // 1866 515, // 1867 504, // 1868 505, // 1869 507, // 1870 516, // 1871 517, // 1872 519, // 1873 505, // 1874 506, // 1875 517, // 1876 518, // 1877 506, // 1878 507, // 1879 518, // 1880 519, // 1881 507, // 1882 519, // 1883 508, // 1884 520, // 1885 509, // 1886 510, // 1887 521, // 1888 522, // 1889 510, // 1890 522, // 1891 511, // 1892 520, // 1893 523, // 1894 532, // 1895 512, // 1896 513, // 1897 515, // 1898 524, // 1899 525, // 1900 527, // 1901 513, // 1902 514, // 1903 525, // 1904 526, // 1905 514, // 1906 515, // 1907 526, // 1908 527, // 1909 515, // 1910 527, // 1911 516, // 1912 517, // 1913 519, // 1914 528, // 1915 529, // 1916 531, // 1917 517, // 1918 518, // 1919 529, // 1920 530, // 1921 518, // 1922 519, // 1923 530, // 1924 531, // 1925 519, // 1926 531, // 1927 520, // 1928 532, // 1929 521, // 1930 522, // 1931 533, // 1932 534, // 1933 522, // 1934 534, // 1935 523, // 1936 532, // 1937 535, // 1938 544, // 1939 572, // 1940 524, // 1941 525, // 1942 527, // 1943 536, // 1944 537, // 1945 539, // 1946 571, // 1947 525, // 1948 526, // 1949 537, // 1950 538, // 1951 576, // 1952 526, // 1953 527, // 1954 538, // 1955 539, // 1956 571, // 1957 576, // 1958 527, // 1959 539, // 1960 571, // 1961 528, // 1962 529, // 1963 531, // 1964 540, // 1965 541, // 1966 543, // 1967 573, // 1968 529, // 1969 530, // 1970 541, // 1971 542, // 1972 574, // 1973 530, // 1974 531, // 1975 542, // 1976 543, // 1977 573, // 1978 574, // 1979 531, // 1980 543, // 1981 573, // 1982 532, // 1983 544, // 1984 572, // 1985 533, // 1986 534, // 1987 545, // 1988 546, // 1989 575, // 1990 534, // 1991 546, // 1992 575, // 1993 535, // 1994 544, // 1995 547, // 1996 556, // 1997 536, // 1998 537, // 1999 539, // 2000 548, // 2001 549, // 2002 551, // 2003 537, // 2004 538, // 2005 549, // 2006 550, // 2007 538, // 2008 539, // 2009 550, // 2010 551, // 2011 539, // 2012 551, // 2013 540, // 2014 541, // 2015 543, // 2016 552, // 2017 553, // 2018 555, // 2019 541, // 2020 542, // 2021 553, // 2022 554, // 2023 542, // 2024 543, // 2025 554, // 2026 555, // 2027 543, // 2028 555, // 2029 544, // 2030 556, // 2031 545, // 2032 546, // 2033 557, // 2034 558, // 2035 546, // 2036 558, // 2037 559, // 2038 61, // 2039 499, // 2040 560, // 2041 561, // 2042 562, // 2043 563, // 2044 564, // 2045 343, // 2046 565, // 2047 566, // 2048 345, // 2049 567, // 2050 568, // 2051 569, // 2052 570, // 2053 349, // 2054 571, // 2055 572, // 2056 351, // 2057 573, // 2058 574, // 2059 575, // 2060 576, // 2061 551, // 2062 556, // 2063 555, // 2064 554, // 2065 558, // 2066 550, // 2067 559, // 2068 565, // 2069 571, // 2070 355, // 2071 561, // 2072 567, // 2073 573, // 2074 561, // 2075 562, // 2076 567, // 2077 568, // 2078 573, // 2079 574, // 2080 365, // 2081 559, // 2082 564, // 2083 565, // 2084 570, // 2085 571, // 2086 576 // 2087 }; int ia[577] = { 1, 6, 13, 18, 24, 27, 34, 39, 45, 48, 51, 56, 59, 63, 69, 73, 77, 79, 85, 89, 93, 95, 97, 101, 103, 107, 113, 117, 121, 123, 129, 133, 137, 139, 141, 145, 147, 151, 157, 161, 165, 167, 173, 177, 181, 183, 185, 189, 191, 196, 203, 208, 214, 217, 224, 229, 235, 238, 241, 246, 249, 253, 259, 263, 267, 269, 275, 279, 283, 285, 287, 291, 293, 297, 303, 307, 311, 313, 319, 323, 327, 329, 331, 335, 337, 342, 349, 354, 360, 363, 370, 375, 381, 384, 387, 392, 395, 399, 405, 409, 413, 415, 421, 425, 429, 431, 433, 437, 439, 443, 449, 453, 457, 459, 465, 469, 473, 475, 477, 481, 483, 487, 493, 497, 501, 503, 509, 513, 517, 519, 521, 525, 527, 532, 539, 544, 550, 553, 560, 565, 571, 574, 577, 582, 585, 589, 595, 599, 603, 605, 611, 615, 619, 621, 623, 627, 629, 633, 639, 643, 647, 649, 655, 659, 663, 665, 667, 671, 673, 677, 683, 687, 691, 693, 699, 703, 707, 709, 711, 715, 717, 721, 727, 731, 735, 737, 743, 747, 751, 753, 755, 759, 761, 765, 771, 775, 779, 781, 787, 791, 795, 797, 799, 803, 805, 809, 815, 819, 823, 825, 831, 835, 839, 841, 843, 847, 849, 853, 859, 863, 867, 869, 875, 879, 883, 885, 887, 891, 893, 897, 903, 907, 911, 913, 919, 923, 927, 929, 931, 935, 937, 941, 947, 951, 955, 957, 963, 967, 971, 973, 975, 979, 981, 985, 991, 995, 999, 1001, 1007, 1011, 1015, 1017, 1019, 1023, 1025, 1029, 1035, 1039, 1043, 1045, 1051, 1055, 1059, 1061, 1063, 1067, 1069, 1074, 1081, 1086, 1092, 1095, 1102, 1107, 1113, 1116, 1119, 1124, 1127, 1131, 1137, 1141, 1145, 1147, 1153, 1157, 1161, 1163, 1165, 1169, 1171, 1175, 1181, 1185, 1189, 1191, 1197, 1201, 1205, 1207, 1209, 1213, 1215, 1216, 1217, 1218, 1219, 1220, 1221, 1222, 1223, 1224, 1225, 1226, 1227, 1228, 1231, 1232, 1233, 1234, 1235, 1237, 1238, 1240, 1241, 1242, 1243, 1245, 1246, 1248, 1249, 1250, 1251, 1252, 1253, 1254, 1255, 1256, 1257, 1262, 1267, 1272, 1282, 1283, 1293, 1297, 1303, 1307, 1311, 1313, 1319, 1323, 1327, 1329, 1331, 1335, 1337, 1341, 1347, 1351, 1355, 1357, 1363, 1367, 1371, 1373, 1375, 1379, 1381, 1385, 1391, 1395, 1399, 1401, 1407, 1411, 1415, 1417, 1419, 1423, 1425, 1429, 1435, 1439, 1443, 1445, 1451, 1455, 1459, 1461, 1463, 1467, 1469, 1473, 1479, 1483, 1487, 1489, 1495, 1499, 1503, 1505, 1507, 1511, 1513, 1517, 1523, 1527, 1531, 1533, 1539, 1543, 1547, 1549, 1551, 1555, 1557, 1561, 1567, 1571, 1575, 1577, 1583, 1587, 1591, 1593, 1595, 1599, 1601, 1605, 1611, 1615, 1619, 1621, 1627, 1631, 1635, 1637, 1639, 1643, 1645, 1650, 1657, 1662, 1668, 1671, 1678, 1683, 1689, 1692, 1695, 1700, 1703, 1707, 1713, 1717, 1721, 1723, 1729, 1733, 1737, 1739, 1741, 1745, 1747, 1751, 1757, 1761, 1765, 1767, 1773, 1777, 1781, 1783, 1785, 1789, 1791, 1796, 1803, 1808, 1814, 1817, 1824, 1829, 1835, 1838, 1841, 1846, 1849, 1853, 1859, 1863, 1867, 1869, 1875, 1879, 1883, 1885, 1887, 1891, 1893, 1897, 1903, 1907, 1911, 1913, 1919, 1923, 1927, 1929, 1931, 1935, 1937, 1942, 1949, 1954, 1960, 1963, 1970, 1975, 1981, 1984, 1987, 1992, 1995, 1999, 2005, 2009, 2013, 2015, 2021, 2025, 2029, 2031, 2033, 2037, 2039, 2040, 2043, 2044, 2045, 2046, 2047, 2049, 2050, 2052, 2053, 2054, 2055, 2057, 2058, 2060, 2061, 2062, 2063, 2064, 2065, 2066, 2067, 2068, 2069, 2072, 2073, 2076, 2082, 2083, 2089 }; // the right hand side double *rhs = new double(); rhs[8] = 6.4340259880000004e-005; rhs[20] = 1.1489332120000001e-005; rhs[32] = 7.5829592000000001e-005; rhs[44] = 2.5276530670000002e-005; rhs[56] = 1.6085064970000001e-005; rhs[68] = 1.6085064970000001e-005; rhs[80] = 1.8382931390000001e-005; rhs[92] = 6.204239346e-005; rhs[104] = 1.3787198550000001e-005; rhs[116] = 7.5829592000000001e-005; rhs[128] = 7.5829592000000001e-005; rhs[140] = 7.5829592000000001e-005; rhs[152] = 7.9084902769999994e-005; rhs[164] = 7.9084902769999994e-005; rhs[176] = 7.9084902769999994e-005; rhs[188] = 7.9084902769999994e-005; rhs[200] = 7.9084902769999994e-005; rhs[212] = 7.9084902769999994e-005; rhs[224] = 7.9084902769999994e-005; rhs[236] = 7.9084902769999994e-005; rhs[248] = 7.9084902769999994e-005; rhs[260] = 7.9084902769999994e-005; rhs[272] = 7.9084902769999994e-005; rhs[284] = 7.9084902769999994e-005; rhs[296] = 6.4340259880000004e-005; rhs[308] = 6.4340259880000004e-005; rhs[325] = -66666666670000000; rhs[350] = 0.001608506497; rhs[351] = 0.00080425324849999998; rhs[362] = 0.00015353925650000001; rhs[374] = 0.00015353925650000001; rhs[386] = 0.00015353925650000001; rhs[398] = 0.00015353925650000001; rhs[410] = 0.00015353925650000001; rhs[422] = 0.00015353925650000001; rhs[434] = 0.00015353925650000001; rhs[446] = 0.00015353925650000001; rhs[458] = 1.0235950440000001e-005; rhs[470] = 0.00014330330610000001; rhs[482] = 5.3738739789999997e-005; rhs[494] = 2.8148863700000001e-005; rhs[506] = 2.8148863700000001e-005; rhs[518] = 4.350278935e-005; rhs[530] = 9.7241529140000004e-005; rhs[542] = 5.6297727400000002e-005; rhs[547] = 66666666670000000; rhs[571] = 4.5997148169999997; rhs[572] = 0.001688931822; rhs[573] = 0.00050667954659999997; MKL_INT nrhs = 1; MKL_INT mtype = 11; /* Real unsymmetric matrix */ /* Internal solver memory pointer pt, */ /* 32-bit: int pt[64]; 64-bit: long int pt[64] */ /* or void *pt[64] should be OK on both architectures */ void *pt[64]; /* Pardiso control parameters. */ MKL_INT iparm[64]; MKL_INT maxfct, mnum, phase, error, msglvl; /* Auxiliary variables. */ MKL_INT i; double ddum; /* Double dummy */ MKL_INT idum; /* Integer dummy. */ /* -------------------------------------------------------------------- */ /* .. Setup Pardiso control parameters. */ /* -------------------------------------------------------------------- */ for (i = 0; i < 64; i++) { iparm = 0; } iparm[0] = 1; /* No solver default */ iparm[1] = 2; /* Fill-in reordering from METIS */ /* Numbers of processors, value of OMP_NUM_THREADS */ iparm[2] = 1; iparm[3] = 0; /* No iterative-direct algorithm */ iparm[4] = 0; /* No user fill-in reducing permutation */ iparm[5] = 0; /* Write solution into x :(0 writes on x, 1 overwrites rhs) */ iparm[6] = 0; /* Not in use */ iparm[7] = 0; /* Max numbers of iterative refinement steps */ iparm[8] = 0; /* Not in use */ iparm[9] = 7; /* Perturb the pivot elements with 1E-13 */ iparm[10] = 1; /* Use nonsymmetric permutation and scaling MPS */ iparm[11] = 0; /* Conjugate transposed/transpose solve */ iparm[12] = 1; /* Maximum weighted matching algorithm is switched-on (default for non-symmetric) */ iparm[13] = 0; /* Output: Number of perturbed pivots */ iparm[14] = 0; /* Not in use */ iparm[15] = 0; /* Not in use */ iparm[16] = 0; /* Not in use */ iparm[17] = -1; /* Output: Number of nonzeros in the factor LU */ iparm[18] = -1; /* Output: Mflops for LU factorization */ iparm[19] = 0; /* Output: Numbers of CG Iterations */ //iparm[34] = 1; /* Zero-based indexing (C-style, not Fortran-style) */ iparm[34] = 0; /* One-based indexing (Fortran-style) */ maxfct = 1; /* Maximum number of numerical factorizations. */ mnum = 1; /* Which factorization to use. */ msglvl = 1; /* Print statistical information in file */ error = 0; /* Initialize error flag */ /* -------------------------------------------------------------------- */ /* .. Initialize the internal solver memory pointer. This is only */ /* necessary for the FIRST call of the PARDISO solver. */ /* -------------------------------------------------------------------- */ for (i = 0; i < 64; i++) { pt = 0; } /* -------------------------------------------------------------------- */ /* .. Reordering and Symbolic Factorization. This step also allocates */ /* all memory that is necessary for the factorization. */ /* -------------------------------------------------------------------- */ phase = 11; PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error); /* -------------------------------------------------------------------- */ /* .. Numerical factorization. */ /* -------------------------------------------------------------------- */ if (error == 0) { phase = 22; PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error); } /* -------------------------------------------------------------------- */ /* .. Back substitution and iterative refinement. */ /* -------------------------------------------------------------------- */ double *xx = 0; if (error == 0) { phase = 33; xx = new double[n * nrhs](); PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, a, ia, ja, &idum, &nrhs, iparm, &msglvl, rhs, xx, &error); } if (error == 0) { // control the residual bool numericalError = false; for (int i = 0; i < n; i++) { double r = -rhs; int idx1 = ia - 1; int idx2 = ia[i + 1] - 1; for (int idx = idx1; idx < idx2; idx++) { int j = ja[idx] - 1; double val = a[idx]; r += val * xx ; } if (fabs(r) > 1e-3) { numericalError = true; break; } } } /* -------------------------------------------------------------------- */ /* .. Termination and release of memory. */ /* -------------------------------------------------------------------- */ phase = -1; /* Release internal memory. */ PARDISO(pt, &maxfct, &mnum, &mtype, &phase, &n, &ddum, ia, ja, &idum, &nrhs, iparm, &msglvl, &ddum, &ddum, &error); delete[] rhs; delete[] xx; return 0; }
Link Copied
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please check your initializers for ja[] and a[]. By my count, they contained only 2080 values each, whereas you should have 2088 elements. That could imply that eight matrix entries have position and value undefined, so the output "solution" computed from those values means nothing. Did you leave out a line or two in the data initialization lines?
As to the title of the thread, "...pardiso error..." and "but pardiso reports <wrong value>" , let us remember that few library routines give correct results with incomplete input data, and most library routines are not equipped to detect errors of this type.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi
Thanks for your answer. The elements are 2088, there was an issue with the data formatting, since I had to dump my internal matrix data to fit the test file. The problem still exists. Any ideas on a resolution?
Best regards
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Please post the missing data or, if you need to correct the data already posted, attach the whole matrix data in a text file.
Even better, if you can put the data into one of the standard sparse matrix file formats (please see http://math.nist.gov/MatrixMarket/formats.html ), the matrix can be analysed with existing programs.
It is better to have voluminous data in a separate file rather than in program source code.
P.S. I just noticed that you have edited the first post. I'll need some time to read the corrected version -- even my browser gets slow displaying the post, which is now over 4,000 lines (the original was about 400 lines). It would be better to have the file as an attachment.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Benjamin M. wrote:
The elements are 2088, there was an issue with the data formatting, since I had to dump my internal matrix data to fit the test file. The problem still exists. Any ideas on a resolution?
I am yet to be convinced that there is a problem. Are you sure that you fed the same matrix and r.h.s. vector to the dense-matrix solver as you did to Pardiso? What is the basis of concluding that one result is correct and the other wrong?
I suggest that you test the answer given by Pardiso by printing the residuals that you are already computing at the end of the program -- you compute the value of "numericalError", but you do not print it at present.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I understand your concern about the lengthy source code, thus I attach the modified code now as a file.
Please find also the matrix in the exchange format you requested. As you see in the test exe, the exact solution I get from gaussian elimination (row and column swapping) is remarkably different from the pardiso solution, even though the residual is 0 in many cases. This has a major influence in my problem.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I think that the effort you must have put into creating an interchangeable format file for your test matrix, while significant, has paid off. Loading the file into Matlab using the utility at http://math.nist.gov/MatrixMarket/mmio/matlab/mmiomatlab.html and the commands
[A, rows, cols, entries] = mmread(filename); condest(A)
gave me a condition number of 1.2618e+020, which indicates that either (i) there is an error in forming the matrix, or (ii) you should no longer expect such an ill-conditioned matrix to give result to reproducible and precise solution vectors.
Here is additional confirmation. It so happens that I have been currently working on some codes to solve such problems, partly related to a recent thread in this forum: https://software.intel.com/en-us/forums/intel-math-kernel-library/topic/591912. Here are the results given by MKL-Pardiso (first column after '=') compared to the results from MUMPS 5.0 (second column):
_x( 1) = -6.108845081301712E-005 1.0170286064608D-03 x( 2) = 2.655036734826543E+015 2.6550367348266D+15 x( 3) = 7.840000000391897E+015 7.8400000003920D+15 x( 4) = 0.714285714285733 1.2500000000000D+00 x( 5) = 0.000000000000000E+000 0.0000000000000D+00 x( 6) = -3.171888928449457E-002 -3.1718889284495D-02 x( 7) = 4.478920118475741E-002 4.4789201184757D-02 x( 8) = -1.608506497010000E-003 -1.6085064970100D-03 x( 9) = 8.042532485000003E-004 8.0425324850000D-04 x( 10) = 1.608506497000000E-003 1.6085064970000D-03 ... x(567) = 2.099100978771429E-003 2.0991009787714D-03 x(568) = 0.000000000000000E+000 0.0000000000000D+00 x(569) = 0.000000000000000E+000 0.0000000000000D+00 x(570) = 0.000000000000000E+000 0.0000000000000D+00 x(571) = -3.809523809714287E+016 -3.8095238097143D+16 x(572) = 0.000000000000000E+000 0.0000000000000D+00 x(573) = -1.592421432171429E-003 -1.5924214321714D-03 x(574) = 0.000000000000000E+000 0.0000000000000D+00 x(575) = 0.000000000000000E+000 0.0000000000000D+00 x(576) = 0.000000000000000E+000 0.0000000000000D+00
The range of magnitudes of x(), from 10-3 to 10+16, makes it difficult to judge whether residuals of the order of 1.0 are "large" or "small".
For information about MUMPS, please see http://mumps.enseeiht.fr/index.php?page=home .
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I know that this is not a "typical" matrix, but it's formulation is correct. The very high condition number is due to the huge elements in line 326, eg.
...
326 61 42046084959222096
326 338 1
326 499 -42046084959222096
...
Before we close this thread, how do you suggest I treat these cases (they show up very often)? Is there a flag I could set to the pardiso solver, or is there a return flag that I could look into? I really puzzled with this, since my own-written gaussian elimination (no optimizations, no blocking, no reordering, no nothing...) gives me a better answer than pardiso.
What I forgot to mention since the beginning is that I use the sequential version with the following linker flags (VS 2013), and I have MKL 11.2.2 version
mkl_core.lib; mkl_sequential.lib; mkl_intel_c.lib
Thanks for the continuing help on this
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
You can call Pardiso with the msglevel argument set to 1 or 2 if you wish to obtain more diagnostic information that is generated during the factorization and solution. There is also an option (set in iparm) to check the input matrix for consistency, but I do not think that turning this on will do anything for your case, since there is no error in specifying the matrix, ill-conditioned as it is.
I really puzzled with this, since my own-written gaussian elimination (no optimizations, no blocking, no reordering, no nothing...) gives me a better answer than pardiso.
I do not know the attributes based on which you say "better answer". I suspect results obtained from applying Gaussian elimination without pivoting to a matrix that is ill-conditioned. Here are the results from Lapack95 dense matrix solver GESV for your problem:
_x( 1) = 1.032500320533674E-003 x( 2) = 2.655036734826504E+015 x( 3) = 7.840000000391856E+015 x( 4) = -0.593750000000000 x( 5) = 0.000000000000000E+000 x( 6) = -3.171888928449457E-002 x( 7) = 4.478920118475738E-002 x( 8) = -1.608506497009995E-003 x( 9) = 8.042532484999997E-004 x( 10) = 1.608506497000000E-003 ... x(567) = 2.099100978771429E-003 x(568) = 0.000000000000000E+000 x(569) = 0.000000000000000E+000 x(570) = 0.000000000000000E+000 x(571) = -3.809523809714290E+016 x(572) = 0.000000000000000E+000 x(573) = -1.592421432171429E-003 x(574) = 0.000000000000000E+000 x(575) = 0.000000000000000E+000 x(576) = 0.000000000000000E+000
I note that none of the solutions that I have obtained agree with the values that you posted in #1 for x(1) (x[0] in C).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I ran my code on an AMD machine and I noticed that in some cases I get different results, for the same input data. Is this possible? If yes, how can I instruct MKL to always give me repeatable results, irrespectively of the CPU used?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Do you want to see the same numerical results with the same #of threads?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
If the differences that you see (between CPU xxx and CPU yyy, or OS aaa and OS bbb) are large, it is possible that your program used uninitialized variables. In this case, even on a single computer you may see different output results in different runs with the same EXE and input data.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I am always using one thread (pardiso parameter: iparm[2] = 1), and I have already ran the tests multiple times in the same (Intel) machine, which gives repeatable results. Only in the AMD machine I see the differences.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Hi,
Before deep investigation i want to provide quick comment - i see that you try to handle number of threads by iparm[2] parameter. In MKL pardiso number of openmp threads set by function omp_set_num_threads()
Thanks,
Alex

- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Printer Friendly Page