PLUMED in LAMMPS

935 views
Skip to first unread message

Denvid Lau

unread,
Oct 12, 2010, 4:17:31 PM10/12/10
to plumed...@googlegroups.com

Dear Sir/Madam,

 

I have just started to use PLUMED for my simulation but I got stuck during compilation.  Previously, I can successfully compile the lmp_serial with the SMD package.  However, I cannot compile lammps successfully even I followed the manual and the readme file.  I got a bunch or error messages.

 

In the manual, it said:

==============================

1.          tar xvf lamps-15Jan10.tar

2.          cd lammps-15Jan10

3.          Edit ./src/MAKE/Makefile.openmpi to suit your machine.

4.          export plumedir=PLUMED_root

5.          cp $plumedir/patches/plumedpatch_lammps_15-01-2010.sh ./

6.          Edit ./plumdpatch_lammps_15-01-2010.sh to set myarch to openmpi

7.          ./plumedpatch_lammps_15-01-2010.sh –patch

8.          cd src

9.          make openmpi

==============================

 

In step 1, I don’t know how to edit the makefile.openmpi to suit my machine.  However, in step 4, I have set myarch to openmpi and I can successfully run the command in step 5.  The folder “USER-PLUMED” was successfully built in ~/lamps-15Jan10/src/.  However, when I type “make openmpi”, there are lots of errors.  Would you mind telling me how to edit the makefile.openmpi in a bit detail?  Any comments from you are greatly appreciated.

 

Thank you very much for your attention.  I am looking forward to your reply.

 

Best regards,

Denvid

 

=================================================

Denvid Lau

Ph.D. Candidate

Department of Civil and Environmental Engineering

Massachusetts Institute of Technology

77 Massachusetts Avenue

Cambridge MA 02139

Phone: 617-715-4204

http://web.mit.edu/istgroup/ist/people/denvid.htm

=================================================

 

Davide Branduardi

unread,
Oct 12, 2010, 4:38:56 PM10/12/10
to plumed...@googlegroups.com
Hi Denvid, 
FIrst, I assume that compiling parallel lammps gives no problem.
If this is not the case, maybe the best place to ask for help is the LAMMPS mailing list.
Let me first be precise : the passage in which you do

export plumedir=PLUMED_root
you have to substitute PLUMED_root with the directory in which you have plumed
so if you untar plumed in  /home/myuser
then it should be something like  /home/myuser/PLUMED-1.2
so:
export plumedir= /home/myuser/PLUMED-1.2
would be the right command in this case. 
Please check if you are doing what is mentioned above first.
Going a bit in detail about /src/MAKE/Makefile.openmpi after patching
on my laptop it looks something like:


CC =            mpic++
CCFLAGS =  -DLAMMPS_PLUMED      -O2 \
                -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized  -DFFT_FFTW -I/sw/include
DEPFLAGS =      -M
LINK =          mpic++
LINKFLAGS =     -O -L/Users/chicco/Programs/g95-install/lib/gcc-lib/i386-apple-darwin9.7.0/4.0.3/ -lf95
LIB =           -lstdc++

where you can see that the patch included now the preprocessing flag 
-DLAMMPS_PLUMED
and this should be the only modification introduced by the patching procedure.

Please, first check if compiling the LAMMPS code as downloaded from the web works.
Good luck

D


**************************************************************
Davide Branduardi
Post Doc- Computational Chemistry
Drug Discovery and Development
ISTITUTO ITALIANO DI TECNOLOGIA
Via Morego 30, 16163 - Genova, Italy
Phone: +39 010 71781573              Room: 1/27
Fax:   +39 010 7170187

e-mail:
davide.b...@iit.it
davide.b...@gmail.com

-- 
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To post to this group, send email to plumed...@googlegroups.com.
To unsubscribe from this group, send email to plumed-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/plumed-users?hl=en.

Denvid Lau

unread,
Oct 13, 2010, 11:51:20 PM10/13/10
to PLUMED users
Dear Davide,

Thank you very much for your reply. I am using LAMMPS in parallel
with reax package without problems during compilation. When I look
into the makefile corresponding to the parallel version of LAMMPS with
reax function. I noticed that the system-specific settings are very
different.

The details of the makefile which can be succesfully compiled with
reax is:

CC = g++
CCFLAGS = -g -O -I../../lib/reax -I/home/Denvid/mpich-1.2.7pl/include -
I/home/Denvid/bin/lib/fftw2/include \
-DFFT_FFTW -DLAMMPS_GZIP -DMPICH_IGNORE_CXX_SEEK
DEPFLAGS = -M
LINK = g++
LINKFLAGS = -g -O -L../../lib/reax -L/usr/libexec/gcc/x86_64-redhat-
linux/4.1.2 -L/home/Denvid/mpich-1.2.7pl/lib \
-L/home/Denvid/bin/lib/fftw2/lib
USRLIB = -lfftw -lmpich -lreax
SYSLIB = -lpthread -lgfortran
ARCHIVE = ar
ARFLAGS = -rc
SIZE = size

However, when I saw the makefile.openmpi after successfully applied
the patch and putting the command "export plumedir=/home/Denvid/
PLUMED-1.2.0/ in my .bashrc. I saw the details as follows:

CC = mpic++
CCFLAGS = -DLAMMPS_PLUMED -O2 -funroll-loops -DFFT_FFTW -DLAMMPS_GZIP
\
-fstrict-aliasing -Wall -W -Wno-uninitialized
NOALIAS = -fno-strict-aliasing
DEPFLAGS = -M
LINK = mpic++
LINKFLAGS =
USRLIB = -lfftw
SYSLIB =
ARCHIVE = ar
ARFLAGS = rcsv
SIZE = size

When I type make openmpi under the folder ../src, I got a series of
error message, such as:
"Makefile:84: xdr_compat.d: No such file or directory"
"/bin/sh: mpic++ command not found"
"make[1]: *** [xdr_compat.d] Error 127"
"make[1]: Leaving directory '/home/Denvid/lammps-4Aug09/src/
Obj_openmpi'
"make: *** [openmpi] Error 2"

I think the problem is probably the path error, as well as the mpic+
+. When I use g++ in my parallel LAMMPS version with reax, it can be
compiled without any problems.

Thank you very much for your kind attention. Any of your comments are
greatly appreciated.

Best regards,
Denvid


On Oct 12, 4:38 pm, Davide Branduardi <davide.brandua...@gmail.com>
wrote:
> Phone:+39 010 71781573begin_of_the_skype_highlighting              +39 010 71781573      end_of_the_skype_highlighting             Room: 1/27
> Fax:   +39 010 7170187
>
> e-mail:
> davide.brandua...@iit.it
> davide.brandua...@gmail.com

Paolo Raiteri

unread,
Oct 14, 2010, 12:31:35 AM10/14/10
to plumed...@googlegroups.com
Dear Denvid,

Your makefile that is working and the one that plumed patched are totally different.

Before patching LAMMPS you have to modify the plumedpatch_lammps_8-12-2009.sh file and change the variable myarch to the appropriate value.

The examples in the PLUMED distribution works in case you compile LAMMPS with the command "make openmpi" and therefore PLUMED seeks for Makefile.openmpi. However, if you compile LAMMPS with "make linux"
you have to change myarch inside plumedpatch_lammps_8-12-2009.sh to linux otherwise PLUMED will patch the wrong file.

Hope it helps
Paolo

davide branduardi

unread,
Oct 14, 2010, 3:25:15 AM10/14/10
to plumed...@googlegroups.com
Hey Denvid,
 The problem to me seems related to the fact that the "clean" and functioning makefile
is not parallel while the patching stuff of PLUMED is only working for the Makefile.openmpi.
Anyway, if you do not want to go for the parallel stuff (as your first Makefile suggests: here you do not have
any mpic++) just add the -DLAMMPS in the CCFLAGS in your Makefile.myworkingarch after having patched.
Check if there are other "plumed related" things in the makefile but I suspect  that is all.
Ciao

D
--
**************************************************************
Davide Branduardi
Post Doc- Computational Chemistry
Drug Discovery and Development
ISTITUTO ITALIANO DI TECNOLOGIA
Via Morego 30, 16163 - Genova, Italy
Phone: +39 010 71781573              Room: 1/27

Fax:   +39 010 7170187

e-mail:
davide.b...@iit.it
davide.b...@gmail.com

Denvid Lau

unread,
Oct 14, 2010, 5:34:06 PM10/14/10
to PLUMED users
Dear Davide and Paolo,

Thank you very much for your reply. I can now successfully compile
LAMMPS with PLUMED plugin. I greatly appreciate your help!

Best regards,
Denvid

On Oct 14, 3:25 am, davide branduardi <davide.brandua...@gmail.com>
wrote:
> > plumed-users...@googlegroups.com<plumed-users%2Bunsu...@googlegroups.com>
> > .
> > > > For more options, visit this group athttp://
> > groups.google.com/group/plumed-users?hl=en.
>
> > --
> > You received this message because you are subscribed to the Google Groups
> > "PLUMED users" group.
> > To post to this group, send email to plumed...@googlegroups.com.
> > To unsubscribe from this group, send email to
> > plumed-users...@googlegroups.com<plumed-users%2Bunsu...@googlegroups.com>
> > .
> > For more options, visit this group at
> >http://groups.google.com/group/plumed-users?hl=en.
>
> --
> **************************************************************
> Davide Branduardi
> Post Doc- Computational Chemistry
> Drug Discovery and Development
> ISTITUTO ITALIANO DI TECNOLOGIA
> Via Morego 30, 16163 - Genova, Italy

Denvid Lau

unread,
Oct 19, 2010, 3:12:18 PM10/19/10
to PLUMED users
Hi, I have one question about running the regtest script for LAMMPS.

I have modified the dir_base and the lammps_prefix in
do_regtest_lammps.sh as:

dir_base=/home/Denvid/PLUMED-1.2.0/tests/lammps
lammps_prefix=/home/Denvid/bin/lmp_SMD_parallel_reax_plumed

As I stored the PLUMED-1.2.0 in the path /home/Denvid/, hence I think
dir_base should be /home/Denvid/PLUMED-1.2.0/tests/lammps
As I successfully compiled the LAMMPS with PLUMED and I made a copy of
it in my bin folder, so I think lammps_prefix should be /home/Denvid/
bin/lmp_SMD parallel_reax_plumed, where lmp_SMD_parallel_reax_plumed
is the name of the executable.

After this modification, I type ./do_regtest_lammps.sh in the folder /
home/Denvid/PLUMED-1.2.0/tests/lammps and I got the follow error
message:

[Denvid@LAMM-11 lammps]$ ./do_regtest_lammps.sh
*************************** testing started
******************************
started on Tue Oct 19 14:54:03 EDT 2010
-------------------------regtesting
lammps----------------------------------
Starting tests in /home/Denvid/PLUMED-1.2.0/tests/lammps/torsion
[0] MPI Abort by user Aborting program !
[0] Aborting program!
tail: cannot open `/home/Denvid/PLUMED-1.2.0/tests/lammps/TEST-lammps/
torsion/input.out' for reading: No such file or directory
[0] MPI Abort by user Aborting program !
[0] Aborting program!
tail: cannot open `/home/Denvid/PLUMED-1.2.0/tests/lammps/TEST-lammps/
torsion/input.out' for reading: No such file or directory
>>>>>>>>>>>>>>>>> /home/Denvid/PLUMED-1.2.0/tests/lammps/torsion
torsion/input RUNTIME
FAIL TYPE
torsion/input RUNTIME
FAIL TYPE
<<<<<<<<<<<<<<<<< /home/Denvid/PLUMED-1.2.0/tests/lammps/torsion
--------------------------------------------------------------------------
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/home/Denvid/PLUMED-1.2.0/tests/lammps/TEST-lammps/torsion/input.out
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
/home/Denvid/PLUMED-1.2.0/tests/lammps/TEST-lammps/torsion/input.out
xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
--------------------------------- summary
--------------------------------
number of FAILED tests 2
number of WRONG tests 0
number of CORRECT tests 0
number of NEW tests 0
number of tests 2
--------------------------------------------------------------------------
Tue Oct 19 14:54:05 EDT 2010
*************************** testing ended
********************************

Did I make any mistakes in between? Or the paths that I enter in
dir_base and lammps_prefix are wrong?

Thank you very much for your kind attention.

Best regards,
Denvid

Davide Branduardi

unread,
Oct 19, 2010, 8:25:08 PM10/19/10
to plumed...@googlegroups.com
Ciao Denvid,

what I fing strange is the first error you get, which is

0] MPI Abort by user Aborting program !

It sounds like there is something not working in the mpi version you are using.

note that the command that launch it is in the script

( ${lammps_prefix} < ${input_file} > std_out )

does this work ?
In order to know this you can add two lines to the command above in do_regtest_lammps.sh
which are

pwd
echo "${lammps_prefix} < ${input_file} > std_out "
( ${lammps_prefix} < ${input_file} > std_out )

then you can enter the directory given by pwd and try to run yourself the command and single out why this is not working.
Please note that some MPI distributions require a daemon running on your machine (orted?). Make sure that
it is running otherwise your program won't run as well.

Hope this may help!


Davide

**************************************************************
Davide Branduardi
Post Doc- Computational Chemistry
Drug Discovery and Development
ISTITUTO ITALIANO DI TECNOLOGIA
Via Morego 30, 16163 - Genova, Italy

Phone: +39 010 71781573 Room: 1/27
Fax: +39 010 7170187

e-mail:
davide.b...@iit.it
davide.b...@gmail.com

> To unsubscribe from this group, send email to plumed-users...@googlegroups.com.

Denvid Lau

unread,
Oct 19, 2010, 9:10:37 PM10/19/10
to PLUMED users
Dear Davide,

Thank you so much for your reply. In fact, the error of "[0] MPI
Abort by user Aborting program !" occurs in both of my machines (one
workstation and one supercomputer) which have no problem in running
MPI so far. I think the problem may come from incorrectly amending
the do_regtest_lammps.sh.

I understand the format "${lammps_prefix} < ${input_file} > std_out"
when I really run the simulation for my concerned system. However, in
order to run the test files, I need to modify the do_regtest_lammps.sh

I have followed your recommendations for the two extra step, and it is
the result:
[Denvid@LAMM-11 lammps]$ pwd
/home/Denvid/PLUMED-1.2.0/tests/lammps

[Denvid@LAMM-11 lammps]$ echo "${lammps_prefic} <${input_file}>
std_out"
<> std_out

In fact, I don't really get the meaning of the line: echo "$
{lammps_prefic} <${input_file}> std_out"

Would you mind elaborating more about the steps how to run the test
files for LAMMPS? Thank you very much for your kind help.

Best regards,
Denvid

On Oct 19, 8:25 pm, Davide Branduardi <davide.brandua...@gmail.com>
wrote:
> Ciao Denvid,
>
> what I fing strange is the first error you get, which is
>
> 0] MPI Abort by user Aborting program !
>
> It sounds like there is something not working in the mpi version you are using.
>
> note that the command that launch it is  in the script
>
>  ( ${lammps_prefix} < ${input_file} > std_out  )
>
> does this work ?
> In order to know this you can add two lines to the command above in do_regtest_lammps.sh
> which are
>
> pwd
> echo "${lammps_prefix} < ${input_file} > std_out "
>  ( ${lammps_prefix} < ${input_file} > std_out  )
>
> then you can enter the directory given by pwd and try to run yourself the command and single out why this is not working.
> Please note that some MPI distributions require a daemon running on your machine (orted?). Make sure that
> it is running otherwise your program won't run as well.
>
> Hope this may help!
>
> Davide
>
> **************************************************************
> Davide Branduardi
> Post Doc- Computational Chemistry
> Drug Discovery and Development
> ISTITUTO ITALIANO DI TECNOLOGIA
> Via Morego 30, 16163 - Genova, Italy
> ...
>
> read more »

davide branduardi

unread,
Oct 20, 2010, 4:06:10 AM10/20/10
to plumed...@googlegroups.com
Hi Denvid,
what I mean is that, in order to debug the do_regtest_lammps.sh
script you should add those two lines in the script and run it again.
The meaning of this is that they will show you what the $lammps_prefix
and the $input_file variables contain by telling you where the command
is executed and what command is executed. If the variables in the script
give you empty values or completely wrong (in particular the
path to $lammps_prefix  should contain the executable, eventually with mpirun
if needed and I think that the problem comes from this side) then you should readapt the script itself
to your need.
I then would enter the directory (echoed by pwd) and execute the command you see below.

Hope this may be of some help.

Davide



--
You received this message because you are subscribed to the Google Groups "PLUMED users" group.
To post to this group, send email to plumed...@googlegroups.com.
To unsubscribe from this group, send email to plumed-users...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/plumed-users?hl=en.




--
**************************************************************
Davide Branduardi
Post Doc- Computational Chemistry
Drug Discovery and Development
ISTITUTO ITALIANO DI TECNOLOGIA
Via Morego 30, 16163 - Genova, Italy
Phone: +39 010 71781573              Room: 1/27

Fax:   +39 010 7170187

e-mail:
davide.b...@iit.it
davide.b...@gmail.com

Denvid Lau

unread,
Oct 20, 2010, 1:23:37 PM10/20/10
to PLUMED users
Dear Davide,

Thank you very much for your reply. Do you mean that I should first
enter the following commands in the script of do_regtest_lammps.sh?

pwd
echo "${lammps_prefix} < ${input_file} > std_out "
( ${lammps_prefix} < ${input_file} > std_out )

Or should I just add
pwd
echo "${lammps_prefix} < ${input_file} > std_out "?

Should these command be added before defining the dir_base and
$lammp_prefix?

In fact, before running the do_regtest_lammps, I can't see the
folder../TEST-lammps/. After running the regtest, I saw the folder
(probably just created) but there are no input file as shown in the
folder TEST-lammps/torsion/input.out. I am wondering if I should
create the input file on my own or the do_regtest_lammps.sh can
generate an input file on its own.

I am sorry for the inconvenience caused. I greatly appreciate your
help.

Best regards,
Denvid

On Oct 20, 4:06 am, davide branduardi <davide.brandua...@gmail.com>
wrote:
> Hi Denvid,
> what I mean is that, in order to debug the do_regtest_lammps.sh
> script you should add those two lines in the script and run it again.
> The meaning of this is that they will show you what the $lammps_prefix
> and the $input_file variables contain by telling you where the command
> is executed and what command is executed. If the variables in the script
> give you empty values or completely wrong (in particular the
> path to $lammps_prefix  should contain the executable, eventually with
> mpirun
> if needed and I think that the problem comes from this side) then you should
> readapt the script itself
> to your need.
> I then would enter the directory (echoed by pwd) and execute the command you
> see below.
>
> Hope this may be of some help.
>
> Davide
>
> ...
>
> read more »
Reply all
Reply to author
Forward
0 new messages