mpi.mod not symlinked correctly #7356

Closed
pletnes opened this Issue Sep 1, 2011 · 10 comments

3 participants

@pletnes

Hi,

mpi.mod is currently symlinked like this:
/usr/local/lib % ll mpi.mod

lrwxr-xr-x 1 36B 29 Aug 11:52 mpi.mod -> ../Cellar/open-mpi/1.4.3/lib/mpi.mod

mpi.mod should be in /usr/local/include as this is where compilers (at least gfortran) looks for .mod files.

Cheers

@mxcl
Homebrew member

If you can, brew edit mpi.mod and it's an easy fix.

@pletnes
@mxcl
Homebrew member

I don't get it, I installed open-mpi but I have no such file. find . -name *.mod gives nothing.

@pletnes

Mine is here:
/usr/local/Cellar/open-mpi/1.4.3/lib/mpi.mod
The module file is essential for fortran 90 use - it's sort of like an auto-generated .h file in C terms.

@mxcl
Homebrew member

Is the file generated later?

$ ls /usr/local/Cellar/open-mpi/1.4.3/lib/
libmca_common_sm.1.dylib  libmpi_cxx.dylib          libotf.a
libmca_common_sm.dylib    libopen-pal.0.dylib       libvt.a
libmpi.0.dylib            libopen-pal.dylib         libvt.fmpi.a
libmpi.dylib              libopen-rte.0.dylib       libvt.mpi.a
libmpi_cxx.0.dylib        libopen-rte.dylib         openmpi/
@pletnes
@mxcl
Homebrew member

If I understand you right, then either this or gfortran will require some brew-install-time modification to make it generate these mod files into an alternate directory.

Probably the directory should be "#{HOMEBREW_PREFIX}/incude".

@pletnes

The .mod file should be generated by ./configure; make; when building openmpi. And yes, it should be put into the include folder, because that's where compilers look for .mod files.

I downloaded openmpi and did ./configure; make; manually. mpi.mod is generated in the folder
~/openmpi-1.4.3/ompi/mpi/f90/mpi.mod
I am guessing that make install places mpi.mod in the lib folder for reasons known only to the openmpi developers.

@mxcl
Homebrew member

Well brew install open-mpi produces no mod files for me, so I'm unable to help.

@Sharpie

@mxcl

brew install open-mpi won't produce a mod file if it is not building the Fortran bindings---which it won't if no Fortran compiler is detected.

@Sharpie Sharpie closed this in f858968 Sep 8, 2011
@martinploeger martinploeger added a commit to martinploeger/homebrew that referenced this issue Oct 8, 2011
@Sharpie Sharpie Open-MPI: Install Fortran `.mod` file to `include`
Fixes #7356.
3bdab62
@Julian Julian added a commit to Julian/homebrew that referenced this issue Nov 21, 2011
@Sharpie Sharpie Open-MPI: Install Fortran `.mod` file to `include`
Fixes #7356.
b1da711
@Sharpie Sharpie added a commit to Sharpie/homebrew that referenced this issue Sep 12, 2012
@Sharpie Sharpie Open-MPI: Install Fortran `.mod` file to `include`
Fixes #7356.
edbbf09
@snakeyroc3 snakeyroc3 pushed a commit to snakeyroc3/homebrew that referenced this issue Dec 17, 2012
@Sharpie Sharpie Open-MPI: Install Fortran `.mod` file to `include`
Fixes #7356.
21e5c79
@xu-cheng xu-cheng locked and limited conversation to collaborators Feb 16, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.