ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

Discussion on computers, ROMS installation and compiling

Moderators: arango, robertson

Post Reply
Message
Author
osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#1 Unread post by osean »

Hello ROMS community

I am new to this, as a graduate student, starting on a project that involves ROMS.

I currently work on MacOS environment (MacOS v.10.15.2 Catalina), and I plan to buy a new macbook for research use. The only information available on ROMS wiki was for MacOS X 10.5.4, which was the 2007 release; too outdated for my current software.

At the moment, I wonder if anyone has experience installing ROMS on either v.10.15.2 Catalina or v.11+ Big Sur system.

If anyone has attempted installing on ROMS on the new M-1 chip Macbook (with v.11 Big Sur), it would be very helpful to know.

Much appreciated for any guidance!

Kosa
Posts: 32
Joined: Mon Jan 12, 2015 4:12 pm
Location: URI GSO

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#2 Unread post by Kosa »

I've run on Catalina. I haven't tried on Big Sur though.

I'm very curious about ROMS performance on the new M1 chip so if you get one of those machines please keep us updated.

User avatar
wilkin
Posts: 875
Joined: Mon Apr 28, 2003 5:44 pm
Location: Rutgers University
Contact:

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#3 Unread post by wilkin »

Works fine for me on Catalina. You likely have to update macports.
John Wilkin: DMCS Rutgers University
71 Dudley Rd, New Brunswick, NJ 08901-8521, USA. ph: 609-630-0559 jwilkin@rutgers.edu

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#4 Unread post by osean »

Kosa wrote: Mon Jan 25, 2021 2:31 pm I've run on Catalina. I haven't tried on Big Sur though.

I'm very curious about ROMS performance on the new M1 chip so if you get one of those machines please keep us updated.
Thanks! Interesting... I am currently on Catalina. Perhaps once I get it to work for the test cases, if I manage to set it up, I might attempt the new M1 machine one day. Will keep you posted

ggerbi
Posts: 14
Joined: Thu Jun 12, 2008 6:03 pm
Location: University of Maine

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#5 Unread post by ggerbi »

You'll need to install XCode (or at least the command line tools; I haven't kept up to date with the continual XCode changes)
Then, as John said, install Macports.

Parker's old notes (if that's what you're referring to) aren't completely obsolete, so they're a useful guide.

I haven't installed ROMS in a couple years, so I am not entirely up to date right now. But I'll give you snippets of my (old) notes that might be helpful. I'm sure that some of the specifics have changed, but there might be clues in here if you run into problems.

For macports:

May need these if encounter error with old distributions of gcc:
https://trac.macports.org/wiki/ProblemH ... trootfound
--sudo port clean libgcc10
--sudo port clean gcc10

Otherwise, proceed (for gcc10):
--sudo port install gcc10
--sudo port install netcdf +gcc10 +netcdf4
--sudo port install netcdf-cxx +gcc10 +netcdf4
--sudo port install netcdf-cxx4 +gcc10 +netcdf4
--sudo port install netcdf-fortran +gcc10 +netcdf4
--sudo port install nco

update symbolic link for gfortran if needed
--cd /opt/local/bin
--sudo ln -s gfortran-mp-10 gfortran


--GET ROMS SOURCE--
svn from myroms.org


--SET NETCDF LOCATIONS IN COMPILER FILE--
changed netcdf locations in Compilers/Darwin-gfortran.mk to match where macports installs netcdf
From original:
NETCDF_INCDIR ?= /usr/local/include
NETCDF_LIBDIR ?= /usr/local/lib
To new:
NETCDF_INCDIR ?= /opt/local/include
NETCDF_LIBDIR ?= /opt/local/lib

And you'll have to make some changes in Build.sh as well.

Good luck,
Greg

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#6 Unread post by osean »

Kosa wrote: Mon Jan 25, 2021 2:31 pm I've run on Catalina. I haven't tried on Big Sur though.

I'm very curious about ROMS performance on the new M1 chip so if you get one of those machines please keep us updated.
wilkin wrote: Mon Jan 25, 2021 3:48 pm Works fine for me on Catalina. You likely have to update macports.
Hello both, thanks for your info. On Catalina I keep encountering

Code: Select all

Undefined symbols for architecture x86_64:
  "___netcdf_MOD_nf90_close", referenced from:
      ___mod_netcdf_MOD_netcdf_close in libMODS.a(mod_netcdf.o)
 	...
  "___netcdf_MOD_nf90_sync", referenced from:
      ___mod_netcdf_MOD_netcdf_sync in libMODS.a(mod_netcdf.o)
ld: symbol(s) not found for architecture x86_64
Some stuff doesn't seem right with x86_64, which I suspect is due to Catalina not supporting 32-bit anymore.

Did either of you encounter this? If so how did you fix it?

thanks

Kosa
Posts: 32
Joined: Mon Jan 12, 2015 4:12 pm
Location: URI GSO

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#7 Unread post by Kosa »

1. I used homebrew, not macports, and had success. So if you're more familiar with homebrew take that route.

2. Looking through my notes, I believe I got the same (or at least a similar) netcdf error as you. I tried a bunch of different things but it looks like the fix came from altering the trunk/Compilers/Darwin-gfortran.mk file. Note: "Darwin" refers to macOS.

See: viewtopic.php?f=31&t=3492

I updated the following line:

Code: Select all

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff
With modern Netcdf, the fortran part is in a separate library. That's what you are linking to with -lnetcdff
Good luck!

osean
Posts: 47
Joined: Sat Jan 23, 2021 3:46 pm
Location: MIT-WHOI

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#8 Unread post by osean »

Kosa wrote: Thu Jan 28, 2021 1:13 pm 1. I used homebrew, not macports, and had success. So if you're more familiar with homebrew take that route.

2. Looking through my notes, I believe I got the same (or at least a similar) netcdf error as you. I tried a bunch of different things but it looks like the fix came from altering the trunk/Compilers/Darwin-gfortran.mk file. Note: "Darwin" refers to macOS.

See: viewtopic.php?f=31&t=3492

I updated the following line:

Code: Select all

LIBS := -L$(NETCDF_LIBDIR) -lnetcdf -lnetcdff
With modern Netcdf, the fortran part is in a separate library. That's what you are linking to with -lnetcdff
Good luck!
Thank you! I figured it was the NetCDF and Fortran not talking to each other... Now it's working, finally!

Kosa
Posts: 32
Joined: Mon Jan 12, 2015 4:12 pm
Location: URI GSO

Re: ROMS for MacOS v. 10.15.2 Catalina / v. 11 Big Sur system

#9 Unread post by Kosa »

It looks like there is M1 Mac optimization happening. See this post: viewtopic.php?p=24122&sid=495bc79f13d0d ... 214#p24122
arango wrote: Mon Aug 29, 2022 12:44 pm We updated the code last week to use the NAGFOR compiler directly with Apple Silicon. See Darwin-nag.mk. David Robertson is benchmarking ROMS on the new Macs and comparing it with ifort.

Post Reply