Linker trouble on BlueGene/P system

Today I have learned that having a global variable in some C89 code which is not declared as static might be problematic if said code is later linked together with a Fortran program which includes a function with the exact same name es the mentioned variable. Somehow the program ended up at the location of the variable which of course ended in a crash with a signal four (illegal instruction). Took me about 12h to find and fix that bug… in my defense it was on a BlueGene system and I first thought the error had something to do with some front-/backend problems (you cross compile on the frontend and then execute the resulting binary using the LoadLeveler)… Anyway, now it works and I can finally take measurements for the thesis.

Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s