NBISweden / MrBayes

MrBayes is a program for Bayesian inference and model choice across a wide range of phylogenetic and evolutionary models. For documentation and downloading the program, please see the home page:
http://NBISweden.github.io/MrBayes/
GNU General Public License v3.0
234 stars 79 forks source link

Compilation problem with MPI #263

Closed bvalot closed 2 years ago

bvalot commented 2 years ago

I'm try to compile MrBayes with MPI and without Beagles I have some problem at the configure steps. gcc and mpicc are correctly installed at system /usr/bin

git checkout tags/v3.2.7a
./configure --with-mpi --without-beagle
checking for a BSD-compatible install... /usr/bin/install -c
checking whether build environment is sane... yes
checking for a thread-safe mkdir -p... /usr/bin/mkdir -p
checking for gawk... gawk
checking whether make sets $(MAKE)... yes
checking whether make supports nested variables... yes
checking whether to enable maintainer-specific portions of Makefiles... no
checking build system type... x86_64-unknown-linux-gnu
checking host system type... x86_64-unknown-linux-gnu
checking for pkg-config... /usr/bin/pkg-config
checking pkg-config is at least version 0.9.0... yes
checking for pdflatex... no
checking for bibtex... no
configure: WARNING: pdflatex or bibtex is missing, documentation will not be rebuilt
checking for style of include used by make... GNU
checking whether to compile using MPI... yes
checking for mpicc... mpicc
checking for gcc... (cached) mpicc
checking whether the C compiler works... no
configure: error: in `/home/bvalot3/tools/MrBayes':
configure: error: C compiler cannot create executables

Would you be able to compile and run MrBayes to test fixes to this bug?

What is the environment that you run MrBayes in?

kusalananda commented 2 years ago

Hi @bvalot !

Thanks for your report.

It would be helpful to look at the config.log file that the configure script generated when you tried to run it. It will contain the commands run during the configuration and the full error messages relating to the failure to use mpicc properly. Please attach it to a follow-up comment on this issue if you can.

bvalot commented 2 years ago

Please find the file below. config.log

kusalananda commented 2 years ago

Please find the file below. config.log

Thanks!

This is the relevant part from the log file:

configure:4011: checking whether the C compiler works
configure:4033: mpicc -O3 -DNDEBUG -std=c99 -pedantic    conftest.c  >&5
/usr/bin/ld: cannot find -lmpi
/usr/bin/ld: cannot find -lopen-rte
/usr/bin/ld: cannot find -lopen-pal
/usr/bin/ld: cannot find -lhwloc
/usr/bin/ld: cannot find -levent_core
/usr/bin/ld: cannot find -levent_pthreads
collect2: error: ld returned 1 exit status

This tells me that the mpicc compiler is non-functional and can't be used as it can't find the needed libraries. You may possibly want to re-install it or check whether you are missing some development package. What package does your mpicc compiler wrapper come from, openmpi-dev (or mpi-default-dev) or mpich?

bvalot commented 2 years ago

Oh. I'm really sorry. I have no dev package install for mpi. For me, it would be automatic with the compiler installation.

Installation work with "mpi-default-dev" install.

trx