Making Finite Element Analysis go faster – Update and PyPardiso

The previous post on this topic looked at the performance of alternative Scipy sparse equation solvers. This post updates those results with the current Scipy version (1.7.1), with very different results. It also compares the Scipy solver performance with the PyPardiso package, which provides an interface to the Intel MKL Pardiso library to solve large sparse linear systems of equations.

The sparse solver function spsolve has an optional argument called permc_spec that defines “how to permute the columns of the matrix for sparsity preservation”.  My timings for the previous post found that the argument NATURAL had very much better performance than any other alternative. This time, NATURAL performed as before, but all the other options had substantially improved, so that it had become the second slowest for the matrix used in the previous post, and the slowest for larger matrices.

The solvers have been compared for solving the stiffness matrix for 3D building frames of increasing size. The table below shows the timing results for the four spsolve options, the banded solver, two iterative solver options, and the PyPardiso solver. Each option has been timed for a system with 14742 equations (as in the previous post), 29487 equations, and 56705 equations.

Two times are reported for the Pardiso function: the time for the first calculation, and a much faster time for subsequent calculations, provided the stiffness matrix is unchanged.

  • The MMD_AT_PLUS_A option is now the fastest of the four spsolve options.
  • The Pardiso function is substantially faster than any spsolve option on the first run, especially for the larger equation systems, and of the order of 50 times faster again on subsequent runs with the same stiffness matrix.
  • The banded solver was slower than Pardiso for the two smaller systems, and failed with a memory error for the third.
  • The two iterative solvers were faster than Pardiso, especially for the largest system, but returned solutions with significant differences from the “exact” solver solutions. Also note that if the same stiffness matrix was to be used with multiple load cases then Pardiso would be very much quicker.

In summary the Pardiso package was substantially faster than any spsolve option, especially for very large systems, was also faster than the banded solver, and was able to handle larger systems than the banded solver.

In the next post I will look at procedures for installing the Pardiso package, and calling the function from Excel using pyxll.

Posted in Arrays, Excel, Finite Element Analysis, Frame Analysis, Link to Python, Newton, NumPy and SciPy, PyXLL | Tagged , , , , , , | Leave a comment

Upgrade to Python 3.10?

Python 3.10 was released on October 4th, rapidly followed by a new release of pyxll (5.3.0), but the Anaconda site does not seem to have it yet, so is it time to upgrade or not. A search on that question found:

Python 3.10 is now available–but should you switch to it immediately? And if not now, when?

The short answer is, no, you probably don’t want to switch immediately; quite possibly you can’t switch immediately. To understand why, we need to consider Python packaging, the software development process, and take a look at the history of past releases.

We can then make a guess about when Python 3.10 will actually be usable.

The problems with a new major Python release

I’m writing this article on October 5th, 2021, the day after 3.10 was released… and far too early to start using Python 3.10.

As with many open source projects, Python, Python libraries, and most of the toolchain and packages mentioned in this article are based on volunteer labor. None of this should be read as a complaint towards the people doing the maintenance, they’re doing hugely valuable work for free, and everything takes time. In addition, because upgrades involve so many different groups, coordination and releases take even more time.

With that in mind, let’s consider the problems with using 3.10 today: …

by Itamar Turner-Trauring

Full article

Posted in Excel, Link to Python, PyXLL | Tagged , , | Leave a comment

Steeleye Span Live

Two recent additions to You Tube with live performances from the early days of Steeleye Span:

This has been a fun little restoration project. My friend and music journalist Simon Jones handed me an old VHS tape recently. On it he tells me, “is the holy grail for Steeleye Span fans. A very rare recording of a TV appearance they made in 1970.” His request was simple, “could you copy the programme from the tape?” The transfer process was simple enough, if a little convoluted. I still have a couple of fully functioning JVC S-VHS decks, so that helped a whole lot! The one I plumped for is a HR-S8700EK. A S-VHS deck with a built in digital time base corrector, which I would use to stabilise the video image. The audio and video outputs from this were hooked up to a Pioneer DVR-720H DVD/Hard Disk recorder and the programme was recorded digitally. Normally I would capture the tape directly to my PC with a Terratec Firewire capture card but in this case there was some tape deterioration and the resultant picture disturbance upset the capture card and interrupted the capture. The Pioneer unit was far more tolerant to the signal and recorded it cleanly. The disk recording was burned to a DVD which was transferred to my editing PC. Here it was upscaled to 1080p, pillar-boxed and set in a 16:9 frame to look better on modern widescreen monitors and colour corrected, just a tad. The Music Room programme has the ATV ident and countdown clock at the beginning so its likely the recording came from ATV themselves, perhaps as someone’s archive copy. If anyone has details on that please let me know.

Tim Vickerstaff

Live At My Father’s Place, Roslyn, New York, 20th April 1973

00:00 One Misty Moisty Morning
04:59 The Ups And Downs
09:54 Oak Tree, Pigeon At The Gate
13:58 Sheep-Crook And Black Dog
20:18 Spotted Cow
24:41 Lady Isabelle Barnet’s Jigs
28:11 Rogues In A Nation
33:26 Cam Ye Oer Frae France
38:18 Alison Gross
43:31 Robbery With Violins
47:40 Gaudete
51:36 Royal Forester
57:05 Mason’s Apron

Posted in Bach | Tagged , , | Leave a comment

ConbeamU update

I recently discovered that the continuous beam function from the ConbeamU spreadsheet was giving incorrect results for cantilevers at the left hand end, if the cantilever had more than one segment and no point loads. The corrected version (Rel 4.16) can be downloaded from:

As usual, the file includes full open source VBA code.

More details of the functions included can be found at:

ConbeamU 4.10

Posted in Beam Bending, Excel, Finite Element Analysis, Frame Analysis, Newton, Strand7, UDFs, VBA | Tagged , , , , , , , , | Leave a comment

Fast Search Reminder

A recent comment at Opening and searching pdf files from Excel reminded of the linked spreadsheet, which allows pdf files to be opened at a specified page from Excel, and also fast searches of the local hard drive: (free download with open source code)

See the link above for more details of the spreadsheet, including the link to pdf function. Below is some more information on using the search function.

Entering text in the Search Text cell, a list of words separated by spaces will find all the files that contain all the listed words.
A list of phrases enclosed in quotes and separated by spaces will find all the files that contain all the listed exact phrases. On my computer the list below shows the search terms and the number of files found:

crack 3360
crack width 2127
crack width slabs 1083
“crack width” 750
“crack width” “slabs” 475
“crack width” “paving slabs” 2

All the searches worked almost instantaneously.

Posted in Computing - general, Excel, VBA | Tagged , , , , , | 2 Comments