Discussion:
[OMPI users] Typo in mpi-fort-wrapper-data.txt?
Joshua Wall
2018-01-30 15:28:03 UTC
Permalink
Hello users,

I was installing a new OS this week (Xubuntu 17.10 to be exact) and
pulled down the latest OMPI from apt on the machine. While trying to
compile a MPI Fortran program I noticed the following:

***@josh-UX490UA:/usr/share/openmpi$ mpifort --showme
gfortran -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread
-I/usr/lib/x86_64-linux-gnu/openmpi/lib *-L/usr//lib*
-L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08
-lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

Noticing the double //, I checked the file and saw it there also:

***@josh-UX490UA:/usr/share/openmpi$ sudo vim mpifort-wrapper-data.txt
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://github.com/open-mpi/ompi/wiki/compilerwrapper3264
# for more information.

project=Open MPI
project_short=OMPI
version=2.1.1
language=Fortran
compiler_env=FC
compiler_flags_env=FCFLAGS
compiler=gfortran
preprocessor_flags=
compiler_flags=-pthread -I${libdir}
linker_flags=*-L/usr//lib*
# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we
# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are
# pulled in implicitly) because we intend MPI applications to only use
# the MPI API.
libs=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
libs_static=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
-lopen-rte -lopen-pal -lhwloc -ldl -lutil -lm
dyn_lib_file=libmpi.so
static_lib_file=libmpi.a
required_file=
includedir=${includedir}
libdir=${libdir}

I'm guessing this is unintentional, but wanted to check since its in the
distro before I edit it on my end.

Thanks,

Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
Jeff Squyres (jsquyres)
2018-01-30 16:40:54 UTC
Permalink
Joshua -

Can you describe how you installed Open MPI?

I think the exact command you used to configure Open MPI will be important.

Sent from my phone. No type good.

On Jan 30, 2018, at 10:30 AM, Joshua Wall <***@gmail.com<mailto:***@gmail.com>> wrote:

Hello users,

I was installing a new OS this week (Xubuntu 17.10 to be exact) and pulled down the latest OMPI from apt on the machine. While trying to compile a MPI Fortran program I noticed the following:

***@josh-UX490UA:/usr/share/openmpi$ mpifort --showme
gfortran -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread -I/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

Noticing the double //, I checked the file and saw it there also:

***@josh-UX490UA:/usr/share/openmpi$ sudo vim mpifort-wrapper-data.txt
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated. This can be useful for multilib builds. See the
# multilib page at:
# https://github.com/open-mpi/ompi/wiki/compilerwrapper3264
# for more information.

project=Open MPI
project_short=OMPI
version=2.1.1
language=Fortran
compiler_env=FC
compiler_flags_env=FCFLAGS
compiler=gfortran
preprocessor_flags=
compiler_flags=-pthread -I${libdir}
linker_flags=-L/usr//lib
# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we
# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are
# pulled in implicitly) because we intend MPI applications to only use
# the MPI API.
libs=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
libs_static=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lopen-rte -lopen-pal -lhwloc -ldl -lutil -lm
dyn_lib_file=libmpi.so
static_lib_file=libmpi.a
required_file=
includedir=${includedir}
libdir=${libdir}

I'm guessing this is unintentional, but wanted to check since its in the distro before I edit it on my end.

Thanks,

Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
_______________________________________________
users mailing list
***@lists.open-mpi.org<mailto:***@lists.open-mpi.org>
https://lists.open-mpi.org/mailman/listinfo/users
n8tm via users
2018-01-30 16:51:51 UTC
Permalink
Most Linux distros ignore repetition of forward slash. Sometimes used as excuse for sloppiness. 


Sent via the Samsung Galaxy S8 Active, an AT&T 4G LTE smartphone
-------- Original message --------From: Joshua Wall <***@gmail.com> Date: 1/30/18 10:28 AM (GMT-05:00) To: ***@lists.open-mpi.org Subject: [OMPI users] Typo in mpi-fort-wrapper-data.txt?
Hello users,

    I was installing a new OS this week (Xubuntu 17.10 to be exact) and pulled down the latest OMPI from apt on the machine. While trying to compile a MPI Fortran program I noticed the following:

***@josh-UX490UA:/usr/share/openmpi$ mpifort --showme
gfortran -I/usr/lib/x86_64-linux-gnu/openmpi/include -pthread -I/usr/lib/x86_64-linux-gnu/openmpi/lib -L/usr//lib -L/usr/lib/x86_64-linux-gnu/openmpi/lib -lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi

Noticing the double //,  I checked the file and saw it there also:

***@josh-UX490UA:/usr/share/openmpi$ sudo vim mpifort-wrapper-data.txt
# There can be multiple blocks of configuration data, chosen by
# compiler flags (using the compiler_args key to chose which block
# should be activated.  This can be useful for multilib builds.  See the
# multilib page at:
#    https://github.com/open-mpi/ompi/wiki/compilerwrapper3264
# for more information.

project=Open MPI
project_short=OMPI
version=2.1.1
language=Fortran
compiler_env=FC
compiler_flags_env=FCFLAGS
compiler=gfortran
preprocessor_flags=
compiler_flags=-pthread  -I${libdir}
linker_flags=-L/usr//lib
# Note that per https://svn.open-mpi.org/trac/ompi/ticket/3422, we
# intentionally only link in the MPI libraries (ORTE, OPAL, etc. are
# pulled in implicitly) because we intend MPI applications to only use
# the MPI API.
libs=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi
libs_static=-lmpi_usempif08 -lmpi_usempi_ignore_tkr -lmpi_mpifh -lmpi -lopen-rte -lopen-pal  -lhwloc -ldl -lutil -lm
dyn_lib_file=libmpi.so
static_lib_file=libmpi.a
required_file=
includedir=${includedir}
libdir=${libdir}

I'm guessing this is unintentional, but wanted to check since its in the distro before I edit it on my end.

Thanks,

Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
Jeff Squyres (jsquyres)
2018-01-30 19:16:05 UTC
Permalink
Post by n8tm via users
Most Linux distros ignore repetition of forward slash. Sometimes used as excuse for sloppiness.
That path is generated during configure. Meaning: some CLI arg to configure was (probably) given as "--with-SOMETHING=/usr/". Open MPI's configure usually strips out "/usr" prefixes, because it's generally not a good idea to do -I/usr/include, -L/usr/lib or -L/usr/lib64 in the wrappers -- it creates confusion and/or ambiguity in conjunction with default compiler/linker search paths.

However, Open MPI's configure script does not strip off any trailing "/" characters when processing directory names that are provided by the user.

Hence, my *guess* is that --with-SOMETHING=/usr/ was provided (instead of --with-SOMETHING=/usr, or even --with-SOMETHING). And "/usr/" didn't compare exactly to "/usr", so configure let it through.

So yes, perhaps we should catch that unusual case in the configure script, and a) strip all trailing /'s, and b) therefore detect that the path was /usr, and c) therefore filter it out.

But I'd hardly call the present behavior "sloppy".
--
Jeff Squyres
***@cisco.com
Joshua Wall
2018-01-31 21:46:50 UTC
Permalink
Hello Jeff,

Just to be clear, I installed it with (nothing fancy here... I've
experienced installing OMPI from source before, but its not worth it on
this small laptop!):

sudo apt install libopenmpi-dev

Cordially,

Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
Gilles Gouaillardet
2018-01-31 23:04:26 UTC
Permalink
Joshua,

Can you extract the configure command line that was used when building the package ?

Packager should always use --with-foo instead of --with-foo=/usr

That being said, there used to be a bug and the latter syntax was required for a specific package. I do not remember the details off hand, but I am positive this has been fixed a while ago.

Bottom line, /usr/lib in the flags is bad, and
/usr//lib is uglier but equally bad.


Cheers,

Gilles
Post by Joshua Wall
Hello Jeff,
sudo apt install libopenmpi-dev
Cordially,
Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
Jeff Squyres (jsquyres)
2018-02-01 15:04:56 UTC
Permalink
It sounds like he installed his distro package for Open MPI, and they configured / built it less-than-optimally.
Post by Gilles Gouaillardet
Joshua,
Can you extract the configure command line that was used when building the package ?
Packager should always use --with-foo instead of --with-foo=/usr
That being said, there used to be a bug and the latter syntax was required for a specific package. I do not remember the details off hand, but I am positive this has been fixed a while ago.
Bottom line, /usr/lib in the flags is bad, and
/usr//lib is uglier but equally bad.
Cheers,
Gilles
Hello Jeff,
sudo apt install libopenmpi-dev
Cordially,
Josh
--
Joshua Wall
Doctoral Candidate
Department of Physics
Drexel University
3141 Chestnut Street
Philadelphia, PA 19104
_______________________________________________
users mailing list
https://lists.open-mpi.org/mailman/listinfo/users
--
Jeff Squyres
***@cisco.com
Loading...