It lives!

Did something cool last night. I need to document it before I forget how to do it again. This is incomplete and I am pasting it here to check out stuff before moving it into the (currently not open) articles area. Move along now, I am just using this space as a scratchpad.

Building FEAP using the Intel Fortran Compiler on Windows
v 0.0 (The “it’s up, but barely” release.) © 2003 – Me

(Non) Standard disclaimer: The code itself not free software. I am not releasing code, just instructions on key modifications to certain files to get it to build on a different compiler in a different platform. I don’t think this is horribly evil, or more importantly, illegal. If it is, please let me know, and I will remove this content. Also, the content is not guaranteed to be complete or correct. Use this information at your own risk and all that. The changes themselves are currently quite preliminary. The list will be slowly modified and corrected as I learn more. However, if you note some gross errors, let me know. I will fix it.

After getting FEAP up and running on GNU/Linux with gcc/g77 and icc/ifc, and combinations of the compilers (with different levels of optimization), I was in danger of actually using the code to get some useful work done. Then it dawned on me that I had a whole new untried OS to repeat this shenanigans. I am justifying all of this to myself as, “I really haven’t begun to use it productively yet, why not try and find the fastest/easiest set of tools to work with before I really do.”

Actually, I think this mentality has something to do with it.

Also this should be more “fun”, since code had to be hacked to make it “happy” to be in a different environment, and makeable with a different tool chain. I am happy to say, after 14 or so straight hours of mucking around with Fortran graphics code and hacking intel header files, it now lives. Probably not entirely happy, but lives none the less.

I decided to document my steps in order that brave souls attempting this in the future (me included) will find the road a little easier. I begin with a standard, totally unmodded source set, version 7.4 in my case. I don’t believe that it will be horribly different for other versions,but I haven’t tried it, yet. The same goes for FEAPpv.

My “build chain” includes Visual Studio .NET (not entirely necessary, but does make life easier at times, and a lot harder at others.), and the Intel Fortran compiler. The first I got free from the uni, since apparently they’ve made some sort of pact with the devil. The Intel Fortran compiler for windows, ifl from now on, I downloaded for “free” from here. Yes, it is “free” only for a month. And I plan to pay the 30$ if the performance gains are impressive enough. This was a major motiviation for this work too. If the gains from Compaq Visual Fortran are as extreme as the g77 to ifc jump, it should be totally worth it. More on that later.

First, I have to say, apart from the inherent evilness of being non-free, ifl is an insanely cool piece of software. It also has the best documentation I have ever seen for software, ever. Download it, and install it. This involves some registration key and things, which annoy but need to be done. The cool thing here is that it “integrates” with Visual Studio .NET, VSN, for short. By integrating, I mean it now shows a little Intel logo on the splash screen, and more importantly, new projects now can be in Fortran (of different types), apart from the usual C++, C# and what not projects.

Unzip your FEAP source to some convenient location, (eg: C:\Work\FEAP) a place I will be calling $FEAPHOME. So, the source itself exists in different folders in $FEAPHOME/ver74 . Read readme.compaq in $FEAPHOME. It is very useful, though the steps have to be changed to get it working with ifl. The basic idea is the same, the source has to be built in groups that form different libraries, which are all finally linked together to form the FEAP executable.

The libraries specified in readme.compaq are as logical as any other I could think of, so we’ll use something similar. viz. program.lib, element.lib, plot.lib, contact.lib and windows.lib.

(I just randomly use a mix and match of the VSN IDE and the ifl CLI. There’s no need for this, I just switch based on convenience. By which I mean, if you’re comfortable with the ifl CLI, you can hack the source with notepad or whatever and get it to build without requiring the gargantuan VSN installed. I had it anyway, so I used it. Plus, I was very impressed initially with how well ifl integrated with it, and had this intense urge to check it out.)

Open VSN and create a new “Fortran static library” project called “program”.

(The steps I’ve outlined here are just that, an outline. If you need details on how these different steps are carried out, I suggest you read $FEAPHOME/readme.compaq.)

/* Insert actual list of steps and changes here. */

Further articles in this vein involve different optimization levels, replacing the default solver with SuperLU and getting it to build parallely with SuperLU_MT. Now on to optimization changes. Conservative choices, BAH!