Opened 13 years ago

Closed 13 years ago

Last modified 13 years ago

#28739 closed enhancement (worksforme)

netcdf @4.1.1 +openmpi Adding Fortran+MPI support

Reported by: jcharris@… Owned by: tenomoto (Takeshi Enomoto)
Priority: Normal Milestone:
Component: ports Version: 1.9.2
Keywords: Cc:
Port: netcdf

Description (last modified by ryandesign (Ryan Carsten Schmidt))

Presently parallel I/O is not possible from Fortran with NetCDF files using the existing MacPorts packages. Attached is a patch that would add Fortran support to the +openmpi variant.

Since openmpi depends on gcc44, Fortran is already installed if someone installs 'netcdf +openmpi', so there is no apparent reason to leave out this functionality. In order to combine it with HDF5 to allow parallel I/O with the Fortran API, see an additionally suggested patch: #22480.

(In addition, adding parallel-netcdf support in the future would be useful.)

Attachments (1)

Portfile-netcdf.diff (578 bytes) - added by jcharris@… 13 years ago.
Suggested patch allowing openmpi variant to work with Fortran.

Download all attachments as: .zip

Change History (8)

Changed 13 years ago by jcharris@…

Attachment: Portfile-netcdf.diff added

Suggested patch allowing openmpi variant to work with Fortran.

comment:1 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Description: modified (diff)

comment:2 Changed 13 years ago by ryandesign (Ryan Carsten Schmidt)

Owner: changed from macports-tickets@… to takeshi@…

comment:3 Changed 13 years ago by tenomoto (Takeshi Enomoto)

You could probably specify both +openmpi and one of +gcc43 +gcc44 +gcc45 to enable openmpi and fortran support.

comment:4 Changed 13 years ago by jcharris@…

I can confirm that this works. However, I would still request that Fortran support be enabled when +openmpi is used. (I have not checked, but I imagine it'd be the same for mpich2).

For example, one does not have to specify +enable-fortran when gcc4* is installed, and since openmpi depends on gcc44 (or a different version), and is not just a variant, it makes sense to not require someone to have a special variant just for netcdf. (Especially since adding the +gcc44 variant, like you suggest, would only be for the purpose of removing the --disable-fortran flag, not for enabling a specific compiler.)

comment:5 Changed 13 years ago by tenomoto (Takeshi Enomoto)

Resolution: worksforme
Status: newclosed

Fortran support is deliberately separated (in netcdf and other ports if possible). It takes a long time to compile a compiler suite gcc4* every time it updates. Some people do not require a fortran binding. I need fortran but I prefer g95 and I do not like to have gcc4* at all. Some people even do not want compiler support at all and netcdf is installed automatically. Most of the software that requires netcdf and fortran, gcc44 variant is a default and they have fortran support. It is not possible to satisfy everyone. I would like to ask you to use +gcc44 +openmpi.

comment:6 Changed 13 years ago by jcharris@…

Perhaps I was not clear -- I am not suggesting forcing any Fortran compiler to be added to any variant. Rather, as far as I can tell, no variants of openmpi exist (as that Portfile is written currently) where Fortran would not be installed, so the only "extra" would be the Fortran bindings for a very useful package. If someone is using +openmpi, they already have some version of Fortran installed!

If you seriously oppose removing the --disable-f77 and --disable-f90 flags from the +openmpi variant, could at least a comment be added to this effect in the Portfile? It took several hours of searching to figure out a potential solution, and I am sure the next person that comes along would appreciate having that time saved. A more consistent objection along your reasoning would be to have an +enable-fortran variant, and to keep Fortran disabled for the +gcc4* variants, which would also make it clear for newcomers to MacPorts how to proceed.

comment:7 Changed 13 years ago by tenomoto (Takeshi Enomoto)

I understand you felt you wasted long hours. Me too, I spend many hours maintaining a number of ports and supporting many users. All gcc4* and g95 have comments that they enable fortran support. If a newcomer does not know much about variants we are here to answer questions.

Note: See TracTickets for help on using tickets.