Hello,
I'm trying to compile/install LIGGGHTS latest version but I'm having problem with the MPI.
I've set the following in [...]/LIGGGHTS-PUBLIC/src/MAKE/Makefile.user:
USE_MPI = "ON"
MPICXX_USR=/home/dventuri/intel/compilers_and_libraries_2018.2.199/linux/mpi/intel64/bin/mpicxx
MPI_INC_USR=/home/dventuri/intel/compilers_and_libraries_2018.2.199/linux/mpi/intel64/include/
MPI_LIB_USR=/home/dventuri/intel/compilers_and_libraries_2018.2.199/linux/mpi/intel64/lib/
These are the folders where the Intel MPI is installed (installation is up-to-date).
However I get the following error when i type "make auto":
Creating list of contact models completed.
make[1]: Entering directory '/home/dventuri/Software/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:499: *** 'Could not compile and link a simple MPI example. Test was done with MPI_LIB=/home/dventuri/intel/compilers_and_libraries_2018.2.199/linux/mpi/intel64/lib/'. Stop.
make[1]: Leaving directory '/home/dventuri/Software/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:106: recipe for target 'auto' failed
make: *** [auto] Error 2
Is it possible that there is any library missing?
Thank you.
dventuri | Thu, 05/03/2018 - 15:25
Possible MPICH flags being used for IntelMPI
I think it is possible that the automated Makefile is not prepared for the IntelMPI.
Checking [...]/src/Obj_auto/Makefile we see at line 459 that it checks for the MPI_TYPE (MPICH or OpenMPI). I don't know where the IntelMPI falls but I know it is base on the MPICH. If so, the Makefile adds the following flags to MPI_ADDLIBS:
-lmpich -lmpichcxx
which are not available for IntelMPI.
I'll try with the MPICH in the meantime, but can we have a correction for the IntelMPI?
dventuri | Thu, 05/03/2018 - 19:03
BUG Confirmed
Confirmed. Using MPICH works.
Can a moderator move the topic to the Bug section so developers can modify the Makefile?
Dheeraj420 | Thu, 05/07/2020 - 13:27
facing same issue while installing
I m getting the same error.
"MPICH" i could not able to identify where exactly i need to do the changes in the file.
Can you please help me out.
Thanks
aaigner | Tue, 05/08/2018 - 10:05
auto with IntelMPI
Hi dventuri,
it is on our issue list. Hopefully, we can fix this with the next release.
Best wishes
Andreas
dventuri | Tue, 05/08/2018 - 13:56
Thank you.
Thank you.
arnavajmani | Wed, 07/03/2019 - 15:09
Compilation with intelmpi
Hi Andreas,
I just wanted to try compiling cfdem with intelmpi on our cluster. Could you please tell me if the bug has been resolved or not? Because I still encounter compilation problems and get the following error
Creating list of contact models completed.
make[1]: Entering directory `/.../LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:499: *** 'Could not compile and link a simple MPI example. Test was done with MPI_LIB=/opt/intel/compilers_and_libraries_2017/linux/mpi/lib64'. Stop.
make[1]: Leaving directory `/.../LIGGGHTS/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [auto] Error 2
Thank you and Regards,
Arnav
tjleps | Thu, 05/07/2020 - 22:40
make mpi
I've had success compiling using intel 2016 compilers, on a cluster, using "$ make mpi" instead of "$ make auto". I edited the make file as follows:
CC = mpiicpc
CCFLAGS = -Ofast -funroll-loops -fstrict-aliasing -Wall -fPIC
LINK = mpiicpc
LINKFLAGS = -Ofast -fPIC
Dheeraj420 | Tue, 05/26/2020 - 08:37
Error
hello,
I tried with "make mpi" and getting this error
make[1]: *** [Makefile:115: neigh_respa.o] Error 1
make[1]: Leaving directory '/home/dheeraj/LIGGGHTS-PUBLIC/src/Obj_mpi'
make: *** [Makefile:114: mpi] Error 2
Even I did the changes in the MAKEFILE as you recommended, after executing the command "make mpi" still getting this error.
make[1]: *** [Makefile:115: neigh_respa.o] Error 1
make[1]: Leaving directory '/home/dheeraj/LIGGGHTS-PUBLIC/src/Obj_mpi'
make: *** [Makefile:114: mpi] Error 2
The changes which i did in MAKEFILE, automatically set back to original command.
Help me out.
Thanks
MIRAND KOSUMI | Sun, 05/10/2020 - 19:19
Installation MPICxx
hello,
Can you help me please:
make[1]: Entering directory '/home/mirand/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:425: *** 'Could not find a suitable mpi compiler (mpicxx or mpic++). Please specify one in the MAKE/Makefile.user using the MPICXX_USR variable or set USE_MPI to "OFF"'. Stop.
make[1]: Leaving directory '/home/mirand/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile.shlib:62: recipe for target 'auto' failed
make: *** [auto] Error 2
mschramm | Tue, 05/12/2020 - 01:33
what steps
Hello,
Have you followed the steps found in the installation section? (https://www.cfdem.com/media/DEM/docu/Section_start.html#making-liggghts-...)
What output do you get if you run the following commands?
which mpirun
which mpicxx
mdvalencia | Fri, 05/29/2020 - 04:19
make auto problem
Hello
I have just updated to Ubuntu 20.04 and I just downloaded the latest version of LIGGGHTS, but when I compile ```make auto``` I get:
Creating list of contact models completed.
make[1]: Entering directory '/mnt/d/Linux/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:456: *** 'Could not compile a simple MPI example. Test was done with MPI_INC="" and MPICXX="mpicxx"'. Stop.
make[1]: Leaving directory '/mnt/d/Linux/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
when I change the path for mpicxx in the Makefile.user I get this:
Creating list of contact models completed.
make[1]: Entering directory '/mnt/d/Linux/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:456: *** 'Could not compile a simple MPI example. Test was done with MPI_INC="" and MPICXX="/usr/bin/mpicxx"'. Stop.
make[1]: Leaving directory '/mnt/d/Linux/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
Could you please help me.
Thanks
mschramm | Fri, 05/29/2020 - 07:25
what do you get
What do you get with
mpicxx --version
and
whereis mpicxx
mdvalencia | Fri, 05/29/2020 - 21:57
Reply
Thanks for your answer
I get :
--------------------------------------------------------------------------
The Open MPI wrapper compiler was unable to find the specified compiler
g++ in your PATH.
Note that this compiler was either specified at configure time or in
one of several possible environment variables.
--------------------------------------------------------------------------
the directory of mpicxx is:
/usr/bin/mpicxx
mschramm | Fri, 05/29/2020 - 23:48
mpi cant find compiler
Looks like the mpi wrapper can't find your g++ program.
Let us try
g++ --version
and
whereis g++
You will probably need to update your path variable as has been suggested to include where your g++ program is.
mdvalencia | Sat, 05/30/2020 - 02:44
Thank you
When I wrote the command you said, the terminal said g++ was not installed. Then I installed it and I could run make auto.
Thank you so much
tjleps | Fri, 05/29/2020 - 22:40
Path variable
You need to update your path variable I think. Try:
PATH=$PATH:/usr/bin
Then run the commands mschramm suggested and see if you get a better result.
tjleps | Fri, 05/29/2020 - 22:42
disregard
Sorry I misread your post, it sounds like the path to your gcc compiler is not set, so replace what I put in the last post with whatever the path to your C++ compiler is.
mingliang_qu | Thu, 03/17/2022 - 11:31
The problem about MPI
Hi,
I'm trying to install liggghts, and I get the following error when I run "make auto":
Creating list of contact models completed.
make[1]: Entering directory '/home/htmt/Documents/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:461: *** 'Could not compile a simple MPI example. Test was done with MPI_INC="" and MPICXX="mpicxx"'. Stop.
make[1]: Leaving directory '/home/htmt/Documents/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
Could you please help me.
Thanks
mschramm | Fri, 03/18/2022 - 15:41
Following Install Instructions
Hello,
Please double check the install guide
https://www.cfdem.com/media/DEM/docu/Section_start.html#making-liggghts-...
Then double check that the make file can find your compilers
run
mpicxx --version
and
whereis mpicxx
and
g++ --version
and
whereis g++
Spelunkee | Fri, 09/29/2023 - 04:59
Still encountering problems with make auto
Hello,
I also need help regarding this problem. How do I check that the makefile can find my compilers?
mpicxx --version
returns: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
whereis mpicxx
returns: /usr/bin/mpicxx /usr/share/man/man1/mpicxx.1.gz
g++ --version
returns: g++ (Ubuntu 11.4.0-1ubuntu1~22.04) 11.4.0
whereis g++
returns: /usr/bin/g++ /usr/share/man/man1/g++.1.gz
Running make auto still returns:
Creating list of contact models completed.
make[1]: Entering directory '/home/spelunkee/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:461: *** 'Could not compile a simple MPI example. Test was done with MPI_INC=" " and MPICXX="mpicxx"'. Stop.
make[1]: Leaving directory '/home/spelunkee/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
Should I put something in MPI_INC_USR= and MPI_LIB_USR= ?
Spelunkee | Fri, 09/29/2023 - 05:42
Update: Found a solution that works
I found a solution in another thread (https://www.cfdem.com/forums/installation-issues-vtk).
I only needed the following changes to my Makefile.
MPICXX_USR=/usr/bin/mpic++
MPI_INC_USR=/usr/lib/x86_64-linux-gnu/openmpi/include
MPI_LIB_USR=/usr/lib/x86_64-linux-gnu/openmpi/lib
Yeasir Mohammad Akib | Fri, 06/03/2022 - 04:13
Problem during the use of "Make Auto"
Hello,
When I am trying to install LIGGGHTS using make auto, I am getting the following error. May I please know how to solve this problem?
reating list of contact models completed.
make[1]: Entering directory '/home/slm_lab/LIGGGHTS-PUBLIC/src/Obj_auto'
mpicxx -funroll-loops -fstrict-aliasing -Wall -Wno-unused-result -O2 -std=c++17 -fPIC -I/usr/include/vtk-7.1 -DLAMMPS_VTK -DSUPERQUADRIC_ACTIVE_FLAG -DNONSPHERICAL_ACTIVE_FLAG -c ../compute_pair_gran_local.cpp
In file included from ../granular_pair_style.h:47,
from ../pair_gran_proxy.h:58,
from ../compute_pair_gran_local.cpp:50:
../utils.h: In function ‘std::string LIGGGHTS::Utils::int_to_string(int)’:
../utils.h:70:12: error: invalid ‘static_cast’ from type ‘std::__cxx11::basic_ostringstream’ to type ‘std::ostringstream&’ {aka ‘std::__cxx11::basic_ostringstream&’}
70 | return static_cast< std::ostringstream & >(( std::ostringstream() << std::dec << a ) ).str();
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
make[1]: *** [Makefile:1399: compute_pair_gran_local.o] Error 1
make[1]: Leaving directory '/home/slm_lab/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
anand204 | Wed, 12/07/2022 - 12:23
Makefile errror
I have done everything right following the steps yet getting following error
Creating list of contact models completed.
make[1]: Entering directory '/home/anand/LIGGGHTS-PUBLIC/src/Obj_auto'
Makefile:461: *** 'Could not compile a simple MPI example. Test was done with MPI_INC="" and MPICXX="mpicxx"'. Stop.
make[1]: Leaving directory '/home/anand/LIGGGHTS-PUBLIC/src/Obj_auto'
make: *** [Makefile:114: auto] Error 2
kanak3524 | Sat, 08/17/2024 - 15:32
SOLUTION to the error
I think I found the solution. This error occurs if "mpi.h" file is missing.
I ran a sample code :
#include <mpi.h>
#include <iostream>
int main(int argc, char** argv) {
MPI_Init(&argc, &argv);
std::cout << "MPI initialized successfully." << std::endl;
MPI_Finalize();
return 0;
}
and saved it as "mpi_test.cpp"
then After creating the mpi_test.cpp file, compile it with:
mpicxx mpi_test.cpp -o mpi_test
Run the compiled program to ensure MPI is working:
mpirun -np 1 ./mpi_test
You should see the output: MPI initialized successfully.
After running this , I found the error :
kanak@kanak-HP-ProBook-440-G6:~/Documents$ mpicxx mpi_test.cpp -o mpi_test
mpi_test.cpp:1:10: fatal error: mpi.h: No such file or directory
1 | #include <mpi.h>
| ^~~~~~~
compilation terminated.
kanak@kanak-HP-ProBook-440-G6:~/Docu
so I installed this :
sudo apt update
sudo apt install openmpi-bin libopenmpi-dev
which eventually solved the problem.