In this post I'll take a closer look at the ways in which Maple code can be thread unsafe. If you have not already seen my post on Thread Safety, consider reading that post first. As a brief review, a procedure is thread safe if it works correctly when run in parallel.
The most obvious way in which procedures can be thread unsafe is if they share data without synchronizing access (using a Mutex, for example). So how can two threads share data?
There is something profoundly satisfying when something that goes “viral” on the Web has some connection to your life. This happened recently when I and my colleagues were pointed towards a video of some laboratory robots that somehow drew almost a million views on YouTube alone. For an engineer,...
The first professional training course I gave involved a 275 mile late evening drive in a 1 litre European econobox from Letchworth in the UK to a dingy hotel in Alnwick. I was pretty nervous –some of my delegates were engineers who had been using Mathcad for over ten years, and I was being paid to tell them what they didn’t know. The following day, after drinking several litres of coffee, I drove another five miles to the training location, only to find that just one delegate had turned up. Luckily he was just an intern who’d never used Mathcad before – and to him I was an expert.
Those of you who know me know that besides my family I have three great passions: History, travel and technology.
I have always been an amateur student of history, reading and learning as much as I can. But reading only gets you so far. I think it was Mark Twain who said, “You can’t understand a country until you smell it.” Smell it? I think by that he meant that you can’t smell a country unless you are there, which is really the only way to begin to truly understand it. He was right, of course, and travel is the perfect complement to my love of history.
I'd like to start by thanking all those readers who left feedback on my last post. It was good hear that most of you enjoy reading my posts and that they are generally helpful. I would like to encourage you to continue posting feedback, especially questions or comments about anything that I fail to explain sufficiently.
The following is a discussion of the limitations of parallel programming in Maple. These are the issues that we are aware of and are hoping to fix in future releases.
A leading motorcycle manufacturer has been using MapleSim to model their powertrain, and now they want to include a realistic battery model. This would let them choose batteries and accessories (like starters and alternators) that they can simulate under a variety of operating conditions, along with their powertrain model. The company turned to Maplesoft to help with this modeling exercise and I was put on the task. My background is in circuits so I thought this would be a straightforward project. In my mind batteries were just constant voltage sources that eventually ran out of charge. I was able to find several recent research papers on battery models, and I realized their behavior was much more complicated than a simple voltage source.
My son Eric began high school this year (grade 9) and a marvelous thing happened. In my previous posts, I lamented that I was generally unable to spark in him an interest in math but something changed this year. The first sign was his first math test given within the first two weeks of the new year. It was an assessment of sorts to see who knows what, and he scored 90%. Although it was a review of basic arithmetic with complicated fractions, order of operations, and such, this was the first time he had ever ranked within the top few of his class in math. Fast forward a few days. He came up to me with a large grin and said “Dad, you’re in my math text book!” Actually it wasn’t me but there was an indirect reference to Maple in one of the later chapters of the book that he was perusing out of curiosity (another good sign). “This is your stuff isn’t it?” With tears welling up inside, I proudly answered “yes.”
A favorite diversion of mine (and of many around the Maplesoft office) is xkcd. Its author, Randall Munroe, bills it as “a webcomic of romance, sarcasm, math, and language.” Since 2005, he’s been entertaining many self-proclaimed geeks with his unique and slightly skewed jokes on technology, computer science, mathematics, and relationships.
I really like the post in which a substitute teacher – hm, Mr. Munroe......
In my previous posts I have discussed various difficulties encountered when writing parallel algorithms. At the end of the last post I concluded that the best way to solve some of these problems is to introduce a higher level programming model. This blog post will discuss the Task Programming Model, the high level parallel programming model introduced in Maple 13.
Unless you’ve spent the past five years on an isolated island in the middle of the Pacific, you’ll have heard of Facebook and Twitter and LinkedIn and MySpace and Flickr. Social media sites: whether you love them, hate them, or just don’t get them, they’re going to be here for a while. If you’re like many of us, you may have a few accounts on these sites, whether you’re a power user or occasional dabbler. Social media allow us to re-connect with old friends and colleagues, share our thoughts – and photos, advertise, network... and generally waste time. :)
The evolution of written language started in earnest in 3500 BC with Cuneiform, spurring a step-change in the volume of information that could be recorded and transmitted over large distances.
This evolved into wide spectrum of other methods of information transmission. The first transatlantic telegraph cables, for example, were laid in the mid-to-late nineteenth century by information pioneers – industrialists who saw the vast benefit in increasing the rate of information exchange by many orders of magnitude. This led to a Cambrian explosion in the sheer volume of information transmitted internationally, increasing trade and commerce to hitherto unseen levels.
In my previous posts I discussed the basic difference between parallel programming and single threaded programming. I also showed how controlling access to shared variables can be used to solve some of those problems. For this post, I am going to discuss more difficulties of writing good parallel algorithms.
Here are some definitions used in this post:
Consider the following example
In the previous post, I described why parallel programming is hard. Now I am going to start describing techniques for writing parallel code that works correctly.
First some definitions.
Green is definitely the color of the 21st century. Recently, I was attending the annual conference of the Society of Instrumentation and Control Engineers. The keynote was delivered by Dr. Tariq Samad of Honeywell and the President of the IEEE Control Systems Society. The talk was on various dimensions in advanced control – past, present, and future, and in particular Dr. Samad summarized some fascinating work being done in the natural resources industry on advanced control. Through his very interesting and engaging talk, my generally conservative brain went into green mode.
Dr. Samad gave a couple of examples of massive engineering undertakings that deployed highly sophisticated control strategies at unprecedented levels of innovation and complexity. The Olympic Dam mining operation in Australia is the largest PC-based deployment of digital control techniques in history, with over 500,000 I/O points. There are major applications of model-predictive control (control strategies where the controller has inherent knowledge of plant dynamics) in traditional coal power plants that will immediately reduce the harm from these plants and set the stage for the introduction to alternate power generation.
In my previous post, I tried to convince you that going parallel is necessary for high performance applications. In this post, I am going to show what makes parallel programming different, and why that makes it harder.
We think of a function as a series of discrete steps. Lets say a function f, is composed of steps f1, f2, f3... e.g.
You must be logged into your Facebook account in order to share via Facebook.
Click the button below to share this on Google+. A new window will open.
You must be logged in to your Twitter account in order to share. Click the button below to login (a new window will open.)
Please log-in to your MaplePrimes account.
Wrong Email/Password. Please try again.
Please log-in to your MaplePrimes account.
Wrong Email/Password. Please try again.
Questions | Posts | Tags
| Users | Unanswered |
Maplesoft Blog | Badges | Recent
About | MaplePrimes Help |
© Maplesoft, a division of Waterloo Maple Inc. maplesoft.com | Terms of
Use | Privacy | Trademarks
Error occurred during PDF generation. Please refresh the page and try again