OSX with xlf tweaks

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
cousins
Posts: 11
Joined: Wed Apr 20, 2005 4:03 pm
Location: Univ. of Maine

OSX with xlf tweaks

#1 Unread post by cousins »

I've just gone through the process of setting up ROMS 2.2 on a Mac OSX cluster running the IBM xlf compiler and I have a couple of tweaks to hopefully make it easier for others in the future.

1. the xlf compiler uses flush_ instead of flush. Utility/mp_routines.F checks #ifdef AIX for this but it would be better to use #ifdef XLF since it is a xlf issue and not an AIX-specific issue.

2. I ran into the mp_strings issue that others have run across. Unfortunately I didn't find viewtopic.php?t=278 in time to make a simple fix. My "fix" was similar except I used the \ escape character instead of reversing the single quotes with the double quotes:

mod_strings.f90: CPPFLAGS += -DMY_OS="\"$(OS)\"" \
...

This "should" be more cross-platform compatible. The use of the single apostrophe/single-quote in Gnu cpp is "interpreted as the beginning of character constants" according to the GNU cpp man page. This is a hazard of using cpp for non-C language applications. I understand that there will be hesitation in changing this due to worries about cross-platform compatibility but it would be nice to have a universal fix for this too so that people don't have to hack the code each time they want to run it on a Mac. I believe the use of the escape character will be closer to being a universal fix than what is currently being used.

3. The Compilers/Darwin-xlf.mk file specifies -qextname in FFLAGS. I found that this was incompatible with the symbols in my libnetcdf.a library. I got rid of it and it worked fine. Is there a reason that -qextname should be specified? I guess it depends on if it was used to create the netcdf library or not.

Steve

Post Reply