Topic: performance on Ubuntu

Hi everyone.Recently, I installed oofem with petsc on Ubuntu. However, when I try it with 1000,000 elements, it nearly spends half an hour. And often it happens to diverge. I want to ask following questions:
1 is there any method that can improve efficiency?
2 How does oofem solve the equations?multigrid methods?or Conjugate gradient method?
3 any suggestions on resisting diverge?

Re: performance on Ubuntu

Hi, can you upload the input file?

Re: performance on Ubuntu

I am sorry, the input file is so big that unable to upload. And by the way, my computer is Core i5-3470CPU3.2GHz*4. The key information of input file is as follows:

StaticStructural nsteps 1 nmodules 1 lstype 3 smtype 7
vtkxml tstep_all domain_all vars 2 1 81 primvars 1 1 cellvars 2 1 81 stype 1 
domain 3d
OutputManager tstep_all dofman_all element_all
ndofman 136941 nelem 722279 ncrosssect 1 nmat 1  nbc 3 nic 0 nltf 1 nset 4


SimpleCS 1 material 1 set 1
IsoLE 1 d 7.9e-09 E 2.1e+8 n 0.3 talpha 1.0
BoundaryCondition 1 loadTimeFunction 1 dofs 5 1 2 3 5 6 values 5 0 0 0 0 0 set 2
NodalLoad 2 loadTimeFunction 1 dofs 1 3 components 1 100 set 3
NodalLoad 3 loadTimeFunction 1 dofs 1 1 components 1 10 set 4
ConstantFunction 1 f(t) 1.0
Set 1 elementranges { (1 722279) }
Set 2 nodes 884 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 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 60 61 62 63 64 65 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 90 91 92 93 94 95 97 98 99 100 101 102 103 105 106 108 109 110 111 112 113 114 115 117 118 119 120 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 148 149 150 151 152 153 154 155 156 157 158 159 161 162 163 164 165 166 167 168 169 170 171 187 188 212 213 231 232 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 382 383 413 414 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 530 531 532 570 571 572 573 574 575 576 577 578 579 580 581 582 583 584 585 586 587 588 589 590 591 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 825 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 1059 1060 1105 1106 1107 1108 1109 1110 1111 1112 1113 1114 1115 1116 1117 1118 1119 1120 1121 1122 1123 1124 1125 1126 1127 1128 1129 1130 1131 1132 1133 1134 1135 1136 1137 1138 1139 1140 1141 1142 1143 1144 1145 1146 1147 1148 1149 1150 1151 1152 1153 1154 1155 1156 1157 1158 1159 1160 1161 1162 1163 1164 1165 1166 1167 1168 1169 1170 1171 1172 1173 1174 1175 1176 1177 1178 1179 1180 1181 1182 1183 1184 1185 1186 1187 1188 1189 1190 1191 1192 1193 1194 1195 1196 1197 1198 1199 1200 1201 1202 1203 1204 1205 1206 1207 1208 1209 1210 1211 1212 1213 1214 1215 1216 1217 1218 1219 1220 1221 1222 1223 1224 1225 1226 1227 1228 1229 1230 1231 1232 1233 1234 1235 1236 1237 1238 1239 1240 1241 1242 1243 1244 1245 1246 1247 1248 1249 1250 1251 1252 1253 1254 1255 1256 1257 1258 1259 1260 1261 1262 1263 1264 1265 1266 1267 1268 1269 1270 1271 1272 1273 1274 1275 1276 1277 1278 1279 1280 1281 1282 1283 1284 1285 1286 1287 1288 1289 1290 1291 1292 1293 1294 1295 1296 1297 1402 1403 1404 1405 1406 1407 1408 1409 1410 1411 1412 1413 1414 1415 1416 1417 1418 1419 1420 1421 1422 1423 1424 1425 1426 1427 1428 1429 1430 1431 1432 1433 1434 1435 1436 1437 1438 1439 1440 1441 1442 1443 1444 1445 1446 1447 1448 1449 1450 1451 1452 1453 1454 1455 1456 1457 1458 1459 1460 1461 1462 1463 1464 1465 1466 1467 1468 1469 1470 1471 1472 1473 1474 1475 1476 1477 1478 1479 1480 1481 1482 1483 1484 1485 1486 1487 1488 1489 1490 1491 1492 1493 1494 1495 1496 1497 1498 1499 1500 1501 1502 1503 1504
Set 3 nodes 198 86 87 88 116 181 182 183 184 206 207 208 209 225 226 227 228 244 245 246 247 376 377 378 379 407 408 409 410 426 427 428 429 523 524 525 526 527 598 599 600 601 602 603 820 821 822 860 861 862 863 874 875 876 877 1011 1012 1013 1014 1307 1308 1309 1310 1311 1514 2612 2616 2638 2686 2728 2729 2775 2792 2805 2837 2966 2982 3029 3066 3117 3170 3182 3185 3189 3406 3582 3605 3694 3822 3835 3889 3921 3952 3960 4063 4205 4285 4328 4361 4368 4511 4530 4571 4615 4803 4831 5097 5103 5117 5310 5388 5528 5686 5823 5872 5994 6060 6069 6127 6312 6386 6476 6526 6581 6583 6866 6892 6987 7073 7367 7464 7648 7940 7941 8088 8541 8579 9344 9360 9692 9777 9985 10478 10686 10852 10915 10998 10999 11000 11191 11193 11210 11843 11879 11887 11888 11914 12444 12445 12656 12774 13093 13377 13417 14181 14215 14239 14354 14366 14621 14972 15054 16544 16770 16771 17032 17277 18443 18532 18877 19720 19818 20277 23337 23338 24529 36092 36195 36515 36706 38712 40954 46878 49537 53025 63231 88043 97003 115242
Set 4 nodes 357 85 87 88 96 177 178 183 185 202 203 208 210 220 221 227 229 240 241 246 248 256 259 372 373 378 380 404 405 409 411 420 421 428 430 438 441 518 519 520 525 526 528 548 592 593 594 595 600 601 602 604 635 636 637 640 817 823 840 859 861 864 869 870 871 876 878 883 887 1007 1008 1013 1015 1032 1033 1034 1037 1312 1313 1341 1342 1346 1365 1372 1373 1511 1512 1536 1539 1542 1543 1545 1592 1593 1596 1709 1710 2680 2694 2769 2770 2823 2865 2904 2911 2922 2926 3096 3109 3226 3330 3379 3402 3579 3583 3588 3618 3669 3714 3734 3874 4069 4093 4207 4363 4399 4418 4489 4606 4770 5004 5170 5227 5270 5329 5338 5535 5536 5774 5954 5955 5989 6080 6229 6333 6418 6569 6613 7335 7479 7481 7575 7674 7935 7984 8065 8397 8490 8586 8652 8915 9280 9306 9364 9577 9587 9774 9778 9801 10024 10033 10239 10356 10360 10726 10727 10732 10757 10784 10801 10862 10932 10935 10962 11116 11317 11459 11559 11673 11703 11728 11933 12039 12107 12178 12228 12230 12282 12454 12539 12809 12969 13056 13070 13071 13495 13654 13656 14561 14662 14720 14722 14921 15052 15198 15380 15423 15424 15700 16053 16184 16222 16266 16627 16969 16970 17111 17120 17121 17223 17237 17708 17859 18034 18064 18139 18148 18190 18263 18265 18699 18759 19217 19219 19220 19221 19724 20180 20481 20612 20613 20661 20846 21692 22000 22220 22235 22879 22911 22912 23488 23960 23961 24442 25057 25224 25225 25226 26129 27940 35797 35997 36037 36059 36083 36142 36395 36677 36690 36707 36748 36837 36997 37349 37714 37878 40849 41262 46593 48030 50853 51631 53091 54145 54568 55060 58686 58969 60909 63040 66169 67143 67285 68878 68894 71099 71939 72023 74459 75309 75329 81100 81764 86298 86449 90507 91835 92305 92953 93112 93983 94464 95011 95810 98229 103189 110292 112843 114751 115149 115398 116192 116211 117829 118541 118932 119181 119478 119715 120205 120302 121042 123110 123535 125975 129450 129765 133983 134399 134679 135662 135739 135880 136140 136141 136212 136448 136586

Re: performance on Ubuntu

Hi, You can actually attach files, instead of pasting file contents directly.
But anyway, the important parts are here; the matrix and solver you picked,
lstype 3 smtype 7
and roughly the number of dofs we are dealing with here
ndofman 136941 nelem 722279
I'm not sure how you have managed to have a whole 722k elements with only 137k nodes. They would have to overlap?

Secondly you have picked linear solver type 3, petsc. Well in this case, you get the solver you specify by using the petsc command line options.
If you didn't pick anyway, I think the default is CG with incomplete LU precond, which often is a good pick.
What solver works best for you depends on a ton of things, and you have everything PETSc can manage on offer here.
There are algebraic multigrid there, but I have only ever had one case where it outperformed CG and GMRES/MINRES

Naturally, the OS is completely irrelevant.

Re: performance on Ubuntu

Mikael Öhman wrote:

Hi, You can actually attach files, instead of pasting file contents directly.
But anyway, the important parts are here; the matrix and solver you picked,
lstype 3 smtype 7
and roughly the number of dofs we are dealing with here
ndofman 136941 nelem 722279
I'm not sure how you have managed to have a whole 722k elements with only 137k nodes. They would have to overlap?

Secondly you have picked linear solver type 3, petsc. Well in this case, you get the solver you specify by using the petsc command line options.
If you didn't pick anyway, I think the default is CG with incomplete LU precond, which often is a good pick.
What solver works best for you depends on a ton of things, and you have everything PETSc can manage on offer here.
There are algebraic multigrid there, but I have only ever had one case where it outperformed CG and GMRES/MINRES

Naturally, the OS is completely irrelevant.

Thank you Mikael, perhaps the meshing is not so good that makes the numbers of elements and nodes seem to be ridiculars. And I have question about  using the petsc command line options. I do not think the manual includes it. Or maybe I am too careless to read the manual.

Re: performance on Ubuntu

Hi ousatoshi,

you can try removing BCs (or cranking up the tolerances to something huge) from the mesh, run it once (it should converge without any need for even constructing the matrix), and look at the resulting mesh, just to see if something has gone awry with the meshing.


You can find petsc's command line options here
http://www.mcs.anl.gov/petsc/documentation/index.html
in particular this page
http://www.mcs.anl.gov/petsc/documentat … table.html

OOFEM doesn't actually do (much) with the PETSc options, they are just passed along.

7

Re: performance on Ubuntu

HI,
some additional thoughts: petsc uses the Krylov subspace iterative solver by default. The performance of iterative solver strongly depends on preconditioner used. You can set the preconditioner using  -pc-type runtine option (possible values are jacobi, bjacobi,ilu, etc. Please, consult petsc documentation for details).
Also, as you have multicore processor, you may try parallel oofem, which can take advantage of multiple cores.
Borek