Ocean Modeling Discussion


Search for:
It is currently Fri Jul 19, 2019 2:23 pm

Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Author Message
 Post subject: OSX with xlf tweaks
PostPosted: Tue Apr 25, 2006 8:10 pm 

Joined: Wed Apr 20, 2005 4:03 pm
Posts: 11
Location: Univ. of Maine
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.


Reply with quote  
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 1 post ] 

All times are UTC

Who is online

Users browsing this forum: No registered users and 3 guests

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group