Error when Make Fedora

Submitted by xujiancqu on Wed, 10/03/2012 - 08:23

Hi, all.
I'm new to LIGGGHTS and Linux OS.
When I follow the Installation Tutorial to install LIGGGHTS, I get a problem.

My OS is Fedora 16.

1. when typing "which mpirun"

-------------------------------------------------------
/usr/bin/which: no mpirun in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jian/.local/bin:/home/jian/bin)
-------------------------------------------------------

The above information is right? or openmpi is not installed well?

2. in /src directory, type "make clean-all", then "make fedora -j"

-------------------------------------------------------
grep: angle_*.h: No such file or directory
grep: dihedral_*.h: No such file or directory
grep: improper_*.h: No such file or directory
make[1]: Entering directory `/home/jian/Downloads/LIGGGHTS-PUBLIC/src/Obj_fedora'
mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -c minimize.cpp
make[1]: mpic++: Command not found
mpic++ -g -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -c compute_ke_atom.cpp
make[1]: mpic++: Command not found
make[1]: *** [minimize.o] Error 127
make[1]: *** Waiting for unfinished jobs....
make[1]: *** [compute_ke_atom.o] Error 127
make[1]: Leaving directory `/home/jian/Downloads/LIGGGHTS-PUBLIC/src/Obj_fedora'
make: *** [fedora] Error 2
-------------------------------------------------------

How to solve the problems?

Thanks for the help in advance.

ckloss's picture

ckloss | Wed, 10/03/2012 - 10:26

>>mpic++: Command not found
you need to install the openmpi-devel (or openmpi-dev) package

Cheers, Christoph

xujiancqu | Wed, 10/03/2012 - 13:59

Thanks for your reply.

I have already installed MPI.

--------------------------------------------
[jian@cqu ~]$ sudo yum install openmpi openmpi-devel
[sudo] password for jian:
Loaded plugins: langpacks, presto, refresh-packagekit
Setting up Install Process
Package openmpi-1.5.4-3.fc16.x86_64 already installed and latest version
Package openmpi-devel-1.5.4-3.fc16.x86_64 already installed and latest version
Nothing to do
---------------------------------------------

In addition, symbolic links have been added.

----------------------------------------------
[jian@cqu ~]$ sudo ln -s /usr/lib64/openmpi/bin/mpirun /usr/bin
ln: failed to create symbolic link `/usr/bin/mpirun': File exists
[jian@cqu ~]$ sudo ln -s /usr/lib64/openmpi/bin/mpic++ /usr/bin
ln: failed to create symbolic link `/usr/bin/mpic++': File exists
-----------------------------------------------

Rds

Jian

xujiancqu | Wed, 10/03/2012 - 14:18

I used 'find'

--------------------------------------------------------------------
[root@cqu]# find / -name mpirun
find: `/home/jian/.gvfs': Permission denied
/usr/lib64/mpich2/bin/mpirun
/usr/lib64/openmpi/bin/mpirun
/usr/bin/mpirun
--------------------------------------------------------------------

there is /usr/bin/mpirun

why I used 'which'

--------------------------------------------------------------------
[root@cqu]# which mpirun
/usr/bin/which: no mpirun in (/usr/local/bin:/usr/bin:/bin:/usr/local/sbin:/usr/sbin:/sbin:/home/jian/.local/bin:/home/jian/bin)
--------------------------------------------------------------------

nasato | Wed, 10/03/2012 - 14:35

Hi Jian,

Try to type in the terminal: export PATH=$PATH:/usr/lib/openmpi/bin/

and then try to recompile again.

Best,

Daniel

ckloss's picture

ckloss | Thu, 10/04/2012 - 10:25

Jian,

you can link either manually or use mpic++ (with the fedora makefile). I you have troubles with either one, I am sure a local linux expert can help you

Christoph

tianya4088 | Sun, 06/30/2013 - 14:32

Hi
Jian, I encounter with the same question, once I type "make fedora", then it comes "grep: angle_*.h: No such file or directory
grep: dihedral_*.h: No such file or directory
grep: improper_*.h: No such file or directory
make[1]: Entering directory `/home/jian/Downloads/LIGGGHTS-PUBLIC/src/Obj_fedora'"
Seeing you add an topic on this issue, I want to know how you solve this problem, Thanks
Meng

Life-long Learning

lbyal | Thu, 09/05/2013 - 09:26

Hi Jian,

Just wondering whether the problem is fixed, Cos I'm currently experiencing the same problem

Regards
Lloyd

PaulWinkler's picture

PaulWinkler | Fri, 09/06/2013 - 19:50

Hi,

there are just sudos for ln (/usr/bin needs super user rights) and apt-get/yum which needs root access to. It seems you are afraid of using sudo, can you please tell why this can be dangerous and cause problems? I am using sudo very offense in Ubuntu, because many commands need super user rights.

Best wishes,
Paul

AGl | Mon, 09/09/2013 - 07:43

Sorry, my fault. In this tutorial it is really necessary to use "sudo" to install packages.

> + Type "sudo ln -s /path1/src/lmp_fedora /usr/bin/liggghts"

It is potentially dangerous. If you will want to install liggghts from packages later, you will probably get an error, because package manager will not be able to create a binary with the name, which already exists. I am using just the full path "/path1/src/lmp_fedora < in.liggghts_script' for that.

> It seems you are afraid of using sudo, can you please tell why this can be dangerous and cause problems?

I am not afraid, but it is a reliable way to break your system soon. With root-permissions you can accidentally write/delete/move some files in system folders e.g. /usr/bin, /usr/lib etc. And starting your scripts under the root-user is also not the best way of work. Try to escape that.