Cranky tools make for cranky developers

I’ve been compiling and testing the Open Porous Media (OPM) reservoir simulators for over a week now, and have discovered one very annoying ‘feature’ of the Ubuntu package tool.

I have had great success compiling OPM under Ubuntu 14.04, which is the ‘official’ version for OPM at this time.

I have had less than great success compiling OPM under Ubuntu 16.04 for the past week. Once I did a lot of manual tweaking and got it to compile, but every time since I’ve had the build fail. It isn’t easy to diagnose as the log files run to thousand of lines.

Tonight I figured out the problem.,, and it’s made me a bit cranky.

The issue is that there are package differences between Ubuntu 14 and 16, but I already knew that. It’s what the package manager does with some differences that’s annoying.

The command to install a package in Ubuntu is ‘apt-get install’, followed by one or more packages. So far, so good. But here’s the problem… if you specify multiple packages in the list, and any one of them no longer exists, the ENTIRE INSTALL fails. Worse, there’s no real error message. You only figure it out by the lack of messages about the packages that didn’t get installed.

For example, say you run ‘sudo apt-get install packa packb packd1.02 packe

If packd1.02 existed in U14 but now it’s packd1.11 (for example), you do get a message in the log telling you that packd1.02 cannot be found and thus cannot be installed. What you don’t get is any message telling you that it’s aborted the entire install and so packa, packb and packe are also NOT installed.

It took a few days to track down (why was BOOST missing all the time???) but finally I cracked the code, and it looks like the big compile is proceeding as expected.

Reservoir Simulation Revisited

Back in the early 1980’s, I worked for some years in Calgary writing reservoir simulators in FORTRAN for one company, and a few more years serving as technical support for another company. I really enjoyed the work and the intellectual stimulation of doing reservoir simulation.

Then my career moved to more traditional IT consulting work before I ended up working in education. I started teaching programming as a continuing education instructor, then became a daytime contract instructor before working full-time as an instructor with Athabasca University.

Over the years I’ve played around with modern reservoir simulators, even going as far to obtain an academic license for a commercial simulator from a company run by the son of one of the senior simulation researchers I had worked with years before.

When I started playing with FORTRAN again on my PiDP8 replica, I started to get interested my old Engineering work, going as far as to convert, compile and run all my old Engineering graduate studies programs.

But I wanted to play with reservoir simulation again.

So I started looking for open source reservoir simulators, and I found an excellent one in the Open Porous Media (OPM) project. They offer reservoir simulators and ancillary programs, all under the open license. Best of all, if you dig around a bit on the OPM website, you discover that it’s possible to compile everything fromĀ  source.

I have now obtained, built and installed the entire suite of simulation programs that OPM currently has, including FLOW (the main reservoir simulator) and ResInsight (a data visualizer). I have created repeatable scripts and documentation that allows me to build everything on a VirtualBox machine running Ubuntu 14.04, all running on my Windows7 PC. Ubuntu 14.04 is not the latest (that’s 16.04 currently), but that’s the version they recommend in the OPM wiki files.

It executes the sample simulations quite quckly, which is nice. They also have as examples some of the oldĀ  SPE Comparative Solution Project test cases that I used to run in the 1980s. It’s turning out to be really great fun.

My next steps are to expand the simulations I run beyond the simple test cases, and then explore some of the source code. Perhaps I can even contribute something to the project in time.