Working with Engineering Applications in FreeBSD

Pedro F. Giffuni

In recent years, traditional branches of engineering like Civil, Chemical, Mechanical, Electrical and Industrial Engineering are requiring extensive computing facilities for their needs. Several well known labs (Sandia, Lawrence Livermore) rely on huge clusters to do all types of complex analysis that were unthinkable a couple of decades ago. While the free BSD variants share the environment with traditional UNIX systems, frequently used for such computations, it was not common to find adequate free software packages to carry complex calculations. Eventually commercial versions of important math related packages started to appear for the Linux platform. Even when the big packages were distant, the BSDs learned and adapted in resourceful ways: Matlab and Mathematica, running under Linux emulation, demanded functionality from the BSDs and NetBSD implemented a signal trampoline to be able to run AutoCAD with IRIX binary compatibility. A notable project that was always available under a free license was Berkeley's Spice circuit analysis program, however it was an exception rather than the rule. Even when the scientific community pressed for a while to get other important tools like NASA's FEA package Nastran under a free license, the objective of being able to access and enhance open scientific tools was elusive. About a decade ago the situation started to improve: FreeBSD's ports system started growing exponentially, first with a high content in the math category, afterwards with a CAD section and after sustained growth in those categories a science section was created. This growth was mostly pushed by Universities and their research projects and in general are not well known with respect to the commercial counterparts. I started porting math/engineering code for FreeBSD around 1996. Back then it was absolutely unthinkable for a Mechanical Engineer to depend only on FreeBSD for it's daily work. The situation nowadays is different: there are some very high quality engineering analysis packages like EDF's Code Aster, with more than 12 years of professional development, that just can't be ignored. A Finite Element package, like Code Aster, can easily cost 5000 US$, is priced according to the maximum problem size it can solve, can require yearly licenses, and is rarely available with source code. In NASTRAN's case the source code is only available for US citizens under a yearly fee. Free software does have serious limitations though; just like in office applications there are proprietary CAD formats or sometimes the package simply doesn't have the required functionality. Having the sources, of course, always has the advantage of being able to implement (or pay for) some specific functionality you might need. Many commercial packages have been recently ported to Linux, but even when they gain some of the advantages of an open environment they still have yet another limitation: they have been very slow to make use of the multicored features of the new processors in the market, a huge limitation now that the speed war between processors has been limited by the overheating problem. The objective of the talk is to give an overview of several CAD/CAE packages that have been made available recently as part of FreeBSD's ports system and the decisions that were made to port them. BRLCAD and Varkon are two CAD utilities that made a transition from closed source to an open environment and in the process in the process of getting ported to BSD have gained greater portability and general "bug" fixes critical for their consolidation as usable and maintainable projects. There are also some tricks that have not been well documented: it is possible to enable threads and some extra optimizations on some packages, and it is also possible to replace the standard BLAS library with the faster GOTO BLAS without rebuilding the package. It is also possible to build the packages optimized for a clustered environment, but perhaps what is most interesting of all is how all the packages interrelate with each other and can turn FreeBSD into a complete engineering environment. No OS distribution so far is offering all the engineering specific utilities offered through FreeBSD's ports system: from design to visualization, passing through analysis FreeBSD is becoming an option that can't be ignored, and best of all, it is an effort that will benefit not only FreeBSD but the wider audience.
Pedro F. Giffuni M. Sc. Industrial Engineering - University of Pittsburgh Mechanical Engineer - Universidad Nacional de Colombia I was born in Bogota, Colombia but I am an Italian citizen. My experience with computers started when I was about 12 years old With the TRS-80 Color Computer first using Basic and the OS-9. I studied electronics for 3 years but became tired of worrying about "whatever happened to electrons in there" and moved to Mechanical Engineering. For a while I rested from the computer world until the Internet came stepping along. I started using FreeBSD around 1995 and soon fell in love with the idea of being able to install a complete version of UNIX from the net with just one floppy. After submitting a the 999th port to the FreeBSD project Walnut Creek was kind enough to give me a subscription for several years to FreeBSD's CD-ROM. Since then I've been on and off porting software packages or fixing the bugs I have caused while porting them. Of course there has always been great respect for the other BSDs and their wonderful license and while I've given up on the idea of one day seeing a "UnifiedBSD" I am glad to see different approaches sharing ideas in a healthful environment.
BSD, engineering, CAE, CAD, math, mechanical, FreeBSD ports