Problem making MBX perallal

186 views
Skip to first unread message

Md Sharif Khan

unread,
Apr 25, 2023, 8:05:10 PM4/25/23
to MBX-users
Hello Everyone, 

I am trying to install MBX in a cluster for use with LAMMPS. When I try to install MBX without paralization, it is installed normally; however, when I use the MPI, I get errors. I have attached my config.log file for your consideration. The origin of the problem could be the compatibility of the MBX with the compiler in my cluster, although they should be supported according to the manual. The main error could be this 

mv -f potential/1b/.deps/liba1b2c4_la-poly_1b_A1B2C4_deg5_v1x.Tpo potential/1b/.deps/liba1b2c4_la-poly_1b_A1B2C4_deg5_v1x.Plo
/bin/sh ../libtool  --tag=CXX   --mode=link mpic++ -std=c++11 -O0  -O0   -L/cm/shared/software/spack/opt/spack/linux-centos7-cascadelake/gcc-12.1.0/fftw-3.3.10-lzcxnkn4ndi37vr4lqtfva7oeo3zalz3/.//lib -Lmpi_dir/lib -o liba1b2c4.la  potential/1b/liba1b2c4_la-poly_1b_A1B2C4_deg5_v1.lo potential/1b/liba1b2c4_la-poly_1b_A1B2C4_deg5_v1x.lo potential/1b/liba1b2c4_la-x1b_A1B2C4_deg5_v1x.lo  -lgsl -lgslcblas -lfftw3 -lm
../libtool: line 6000: cd: mpi_dir/lib: No such file or directory
libtool: link: cannot determine absolute directory name of `mpi_dir/lib'
make[3]: *** [liba1b2c4.la] Error 1

Thank you very much for your time and consideration. 

Thank you 
Best Regards 
Khan 
config.log

Marc Riera

unread,
Apr 25, 2023, 8:08:11 PM4/25/23
to MBX-users
Hello! Let me have a look and will get back to you soon.

Thanks for the post!

Marc

Marc Riera

unread,
Apr 25, 2023, 8:20:39 PM4/25/23
to MBX-users
Hello Khan,

This error appeared in a previous version due to an issue with the configure.ac file. Would you mind sending me your MBX_HOME/configure.ac file? The current version should have it fixed. May I ask when did you clone the code from github? If it was before Sunday, would you mind cloning a fresh copy and try to do the following:
1. Set the MPI_HOME, FFTW_HOME, and GSL_HOME environment variables
2. Run: autoreconf -fi
3. Run: ./configure --enable-mpi --disable-optimization CXX=mpicxx
4. Run make && make install

Following these commands, I have been able to compile it right now cloning the latest version from https://github.com/paesanilab/MBX . Please save the outputs of configure and make in a file, just in case it fails again, and send them to the chat if the problems persist.

Thank you very much and apologies for the issues!

All the best,
Marc


On Tuesday, April 25, 2023 at 5:05:10 PM UTC-7 mdshar...@boisestate.edu wrote:

Md Sharif Khan

unread,
Apr 27, 2023, 3:39:49 PM4/27/23
to MBX-users
Hello Marc 

Thank you very much for your reply. 

I have tried the new version. When I tried the make check, it passed 28 instead of 34. I read in some of your other discussions that it is fine. 
Therefore, I tried to integrate with the lammps. Then I got this error---- In file included from ../style_fix.h:31,
                 from ../modify.cpp:16:
../fix_mbx.h:27:10: fatal error: bblock/system.h: No such file or directory
 #include "bblock/system.h"
          ^~~~~~~~~~~~~~~~~

This error persists after both ways I tried 

cp Makefile.mpi_mbx LAMMPS_HOME/src/MAKE/Makefile.mpi_mbx
cp -rf USER-MBX LAMMPS_HOME/src
cp USER-MBX/*.cpp LAMMPS_HOME/src
cd LAMMPS_HOME/src/
make yes-USER-MBX yes-MOLECULE yes-KSPACE yes-RIGID yes-EXTRA-PAIR
make yes-USER-MBX
make mpi_mbx -j 4

and 

rm style_fix.h style_pair.h
make yes-USER-MBX yes-MOLECULE yes-KSPACE yes-RIGID yes-EXTRA-PAIR
make yes-USER-MBX
touch fix_mbx.* pair_mbx.*
make mpi_mbx -j 8

Ethan Bull-vulpe

unread,
Apr 27, 2023, 5:29:36 PM4/27/23
to MBX-users
Hello Khan,

When you run the above statements, is the MBX_HOME environment variable set to the location of your MBX install?
It will need MBX_HOME to be set in order to find the bblock/system.h file within MBX.

If it is not set, you may see a warning message like:
"MBX_HOME is not set. Please set it or ignore if the default HOME/codes/MBX is OK"
when you run `make mpi_mbx`.

-Ethan

Marc Riera

unread,
Apr 27, 2023, 6:30:47 PM4/27/23
to MBX-users
Hello!

Another possibility is that maybe you are using the Makefile for the previous version of the code. The reason that the code is not compiling is that LAMMPS fails to find the MBX headers. If you look inside LAMMPS_HOME/src/MAKE, there should be the Makefile.mpi_mbx file. That file has been updated in the MBX repo. The main difference is that the installation of MBX is performed in MBX_HOME, and not MBX_HOME/install. Thus, if you see a install folder in the path in the Makefile, you may have to update that file. To make it clearer, you probably have now the following first lines in the Makefile:

=====
# mpi = MPI with its default compiler

SHELL = /bin/sh

MBX=$(MBX_HOME)/install
MBX_INC=$(MBX)/include
MBX_LIB=$(MBX)/lib
FFTW=$(FFTW_HOME)
=====

and it should be something like this:

=====
# mpi = MPI with its default compiler

SHELL = /bin/sh

MBX=$(MBX_HOME)
MBX_INC=$(MBX)/include
MBX_LIB=$(MBX)/lib
FFTW=$(FFTW_HOME)
=====

If you look at it, you will see how the bottom part does not have the "install" in the MBX variable definition. Updating this should allow you to properly compile the code.

Then, regarding the unittests, you probably run them when the code is compiled with MPI, which will make them fail. The build in Github is passing, so you can 1) either ignore the test building or 2) compile without mpi (with g++ and without the --enable-mpi flag in configure) and run make check. Either is fine.

Please let us know if you run into any more problems. Also, the lammps mbx fix format has changed since the previous version. Please look at the README in https://github.com/paesanilab/MBX/blob/master/plugins/lammps/README.md to properly define the fix.

See you!

Marc

Md Sharif Khan

unread,
Apr 27, 2023, 7:43:35 PM4/27/23
to MBX-users
Hello Ethan and Marc, 

A fresh installation passed all the tests. However, integrating with LAMMPS is still showing the same error message. I have set MBX_HOME=$pwd at the beginning of the MBX installation. 
I have attached my Makefile.mpi_mbx here. The top part of the files is correct, according to your comment. 

Thank you very much! 
Makefile.mpi_mbx
Reply all
Reply to author
Forward
0 new messages