mothur

Mothur MPI make error

Hi,

(Wasn’t sure what topic to put this under.)

I’ve been trying to install MPI Mothur, but I can’t get past the ‘make’ command.
**Note: I can’t put anything into /usr/local (I don’t have permissions)

So far I’ve…

wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz
$ tar -zxvf /home/mpiuser/bin/boost_1_51_0.tar.gz
$ cd boost_1_51_0
$ ./bootstrap.sh --prefix="/home/mpiuser/bin"
added 'using mpi ;' to the /home/mpiuser/bin/boost_1_63_0/project-config.jam
$ ./b2

It looks like I get a clean install.

The Boost C++ Libraries were successfully built!

The following directory should be added to compiler include paths:

/home/mpiuser/bin/boost_1_63_0

The following directory should be added to linker library paths:

/home/mpiuser/bin/boost_1_63_0/stage/lib

I go ahead and export the paths…

$ export COMPILER_PATH="/home/mpiuser/bin/boost_1_63_0"
$ echo $COMPILER_PATH
/home/mpiuser/bin/boost_1_63_0

$ export LIBRARY_PATH="/home/mpiuser/bin/boost_1_63_0/stage/lib"
$ echo $LIBRARY_PATH
/home/mpiuser/bin/boost_1_63_0/stage/lib

I navigate back to the mothur directory. /home/mpiuser/mothur-1.39.2
I got the download from https://github.com/mothur/mothur/archive/v1.39.2.tar.gz

I go to edit the Makefile to alter the paths.

BOOST_LIBRARY_DIR="\"/home/mpiuser/bin/boost_1_63_0/lib/\""
BOOST_INCLUDE_DIR="\"/home/mpiuser/bin/boost_1_63_0/include\""

I notice there is no USEMPI variable to change to ‘yes’ like this manual suggests.
https://www.mothur.org/wiki/Makefile_options

When I run ‘make’, I get the following error.

g++ -DBIT_VERSION -O3 -DRELEASE_DATE="\"2/2/2017\"" -DVERSION="\"1.39.1\"" -DUSE_READLINE -DUSE_BOOST -I "\"/home/mpiuser/bin/boost_1_63_0/include\"" -I.  -I source/  -I source/calculators/  -I source/chimera/  -I source/classifier/  -I source/clearcut/  -I source/commands/  -I source/communitytype/  -I source/datastructures/  -I source/metastats/  -I source/randomforest/  -I source/read/  -I source/svm/   -c -o source/averagelinkage.o source/averagelinkage.cpp
In file included from source/datastructures/sparsedistancematrix.h:12,
                 from source/cluster.hpp:4,
                 from source/averagelinkage.cpp:5:
source/mothur.h:21:52: error: boost/iostreams/filtering_stream.hpp: No such file or directory
source/mothur.h:22:47: error: boost/iostreams/filter/gzip.hpp: No such file or directory
source/mothur.h:73:33: error: readline/readline.h: No such file or directory
source/mothur.h:74:32: error: readline/history.h: No such file or directory
In file included from source/datastructures/sparsedistancematrix.h:13,
                 from source/cluster.hpp:4,
                 from source/averagelinkage.cpp:5:
source/mothurout.h:113: error: 'boost' has not been declared
source/mothurout.h:113: error: expected ',' or '...' before '&' token
source/mothurout.h:114: error: 'boost' has not been declared
source/mothurout.h:114: error: expected ',' or '...' before '&' token
source/mothurout.h:114: error: 'int MothurOut::openInputFileBinary(std::string, std::ifstream&, int)' cannot be overloaded
source/mothurout.h:113: error: with 'int MothurOut::openInputFileBinary(std::string, std::ifstream&, int)'
make: *** [source/averagelinkage.o] Error 1

What is going on???

So, per INSTALL.md I went head and moved the gzip and the zlib

$ find /home/mpiuser/bin -type f -name "gzip.cpp"
/home/mpiuser/bin/boost_1_63_0/libs/iostreams/src/gzip.cpp
$ cp /home/mpiuser/bin/boost_1_63_0/libs/iostreams/src/gzip.cpp /home/mpiuser/mothur-1.39.2/source/
$ cp /home/mpiuser/bin/boost_1_63_0/libs/iostreams/src/zlib.cpp /home/mpiuser/mothur-1.39.2/source/

Then ran ‘make’. Got the same error. How can I get a mother MPI build? What am I not understanding?

Thanks in advance!

It looks like boost is getting installed in the wrong place. FWIW, we have yet to see any benefit using MPI, in fact, for most of our parallelization it actually runs slower at times than using the processors options.

That’s what I was figuring. I probably need root privileges to get it where it needs to go. Thanks for the quick response! and the MPI advice.

Figured it out! Wanted to give an update. Here’s what I did.
Running CentOS
Followed this manual —> https://www.mothur.org/wiki/Installation

Logged in as root.

$ cd /usr/local
$ wget http://sourceforge.net/projects/boost/files/boost/1.63.0/boost_1_63_0.tar.gz
$ tar -zxvf /home/mpiuser/bin/boost_1_51_0.tar.gz
$ cd boost_1_63_0
$ ./bootstrap.sh --prefix="/usr/local/boost_1_63_0/boost"
$ ./b2
$ wget https://github.com/mothur/mothur/archive/v1.35.1.zip
$ unzip v1.35.1.zip
$ cd mothur-1.35.1
$ vim ./source/makefile

USEMPI ?= yes
64BIT_VERSION ?= yes
CXX = g++44 (uncommented)
#TARGET_ARCH += -arch x86_64 (commented)

$ cd ./source
$ make