Re: [gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Mark Abraham

On 25/03/2011 8:36 AM, Adam Herbst wrote:

Thank you all for your help!  I ran

  make distclean

and re-configured in the GROMACS source folder via

  sudo ./configure --prefix=$SOFT --with-gsl --enable-threads 
CFLAGS="$CFLAGS -I$SOFT/include" LDFLAGS="$LDFLAGS -L$SOFT/lib"

  sudo make -j $NCPU
  sudo make install


As a general rule, one should minimize the use of super-user accounts. 
You never know when some idiot has messed up the configure script, and 
running it as super-user can trash your machine. It is safer to maintain 
the source code in a directory writable by whoever will be building it. 
Now "configure" and "make" can be run as a normal user. Only the step 
that needs write access to system areas needs sudo, i.e. "make install".


Another good idea is to keep separate an unmodified version of GROMACS 
and your modified one. Now you you just source the GMXRC from the 
version you want to use. Then if you run into some problem, you can 
sometimes immediately establish that it wasn't the fault of your changed 
code. Alternatively or additionally, using "./configure --suffix=_m" (or 
whatever) gives you confirmation of which version you are using every 
time you use it.


Mark

where SOFT is the installation directory for FFTW3 and GSL, and NCPU 
is the number of processors (24) in my machine.  I found if I didn't 
specify the CFLAGS and LDFLAGS when running configure (even if they 
were already environment variables with the proper paths), I got an 
error that the FFTW3 header file or library couldn't be found.


Now when I run mdrun, it automatically uses multiple threads and goes 
just as fast as before my changes.  Thanks again,


Adam


On Thu, Mar 24, 2011 at 9:00 AM, Mark Abraham > wrote:


On 24/03/2011 11 :51 PM, Adam Herbst wrote:

Dear GROMACS users,
I successfully installed GROMACS 4.5.1 several months ago on a
Mac Pro with 12 CPUs, and the "mdrun" command (not "mpirun
mdrun_mpi") allows parallel simulations--it automatically uses
multiple processors, while the number of processors can be
manually specified as N with the flag "mdrun -nt N".  I
understand that this is a feature of GROMACS 4 and later.


Yes, threading, enabled by default, and mutually incompatible with
MPI.


Now I am making minor changes to the mdrun source code, and I
want to recompile such that the parallel version of mdrun is
updated with my changes.  But when I run:

 make mdrun (or just make)
 make install-mdrun (or just make install)

from the top-level source directory, the only executables that
are updated are the ones with the _mpi suffix, such as
mdrun_mpi.  The version of mdrun in src/kernel/ is updated,
but this one has no -nt flag and cannot seem to run on
multiple processors.  And when I run


Subsequently you have configured with --enable-mpi, so threading
is disabled. Now everything is probably a mess.



 mpirun -np N mdrun_mpi [options],

the same simulation is started separately on each processor,
leading to a crash.  If I use

 mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],

I get an error message that this is not supported on my
computer ("An attempt to set processor affinity has failed").

I can't configure the input .tpr file for parallel because
grompp doesn't have the -np flag in GROMACS 4.

How can I update the parallel-capable "mdrun" executable with
my changes?


Run "make distclean" and then re-configure.

Mark

-- 
gmx-users mailing list gmx-users@gromacs.org


http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the www
interface or send it to gmx-users-requ...@gromacs.org
.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists




-- 
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Re: [gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Adam Herbst
Thank you all for your help!  I ran

  make distclean

and re-configured in the GROMACS source folder via

  sudo ./configure --prefix=$SOFT --with-gsl --enable-threads
CFLAGS="$CFLAGS -I$SOFT/include" LDFLAGS="$LDFLAGS -L$SOFT/lib"
  sudo make -j $NCPU
  sudo make install

where SOFT is the installation directory for FFTW3 and GSL, and NCPU is the
number of processors (24) in my machine.  I found if I didn't specify the
CFLAGS and LDFLAGS when running configure (even if they were already
environment variables with the proper paths), I got an error that the FFTW3
header file or library couldn't be found.

Now when I run mdrun, it automatically uses multiple threads and goes just
as fast as before my changes.  Thanks again,

Adam


On Thu, Mar 24, 2011 at 9:00 AM, Mark Abraham wrote:

> On 24/03/2011 11:51 PM, Adam Herbst wrote:
>
>> Dear GROMACS users,
>> I successfully installed GROMACS 4.5.1 several months ago on a Mac Pro
>> with 12 CPUs, and the "mdrun" command (not "mpirun mdrun_mpi") allows
>> parallel simulations--it automatically uses multiple processors, while the
>> number of processors can be manually specified as N with the flag "mdrun -nt
>> N".  I understand that this is a feature of GROMACS 4 and later.
>>
>
> Yes, threading, enabled by default, and mutually incompatible with MPI.
>
>
>  Now I am making minor changes to the mdrun source code, and I want to
>> recompile such that the parallel version of mdrun is updated with my
>> changes.  But when I run:
>>
>>  make mdrun (or just make)
>>  make install-mdrun (or just make install)
>>
>> from the top-level source directory, the only executables that are updated
>> are the ones with the _mpi suffix, such as mdrun_mpi.  The version of mdrun
>> in src/kernel/ is updated, but this one has no -nt flag and cannot seem to
>> run on multiple processors.  And when I run
>>
>
> Subsequently you have configured with --enable-mpi, so threading is
> disabled. Now everything is probably a mess.
>
>
>
>>  mpirun -np N mdrun_mpi [options],
>>
>> the same simulation is started separately on each processor, leading to a
>> crash.  If I use
>>
>>  mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],
>>
>> I get an error message that this is not supported on my computer ("An
>> attempt to set processor affinity has failed").
>>
>> I can't configure the input .tpr file for parallel because grompp doesn't
>> have the -np flag in GROMACS 4.
>>
>> How can I update the parallel-capable "mdrun" executable with my changes?
>>
>
> Run "make distclean" and then re-configure.
>
> Mark
>
> --
> gmx-users mailing listgmx-users@gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the www interface
> or send it to gmx-users-requ...@gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists
>
-- 
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists

Re: [gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Mark Abraham

On 24/03/2011 11:51 PM, Adam Herbst wrote:

Dear GROMACS users,
I successfully installed GROMACS 4.5.1 several months ago on a Mac Pro 
with 12 CPUs, and the "mdrun" command (not "mpirun mdrun_mpi") allows 
parallel simulations--it automatically uses multiple processors, while 
the number of processors can be manually specified as N with the flag 
"mdrun -nt N".  I understand that this is a feature of GROMACS 4 and 
later.


Yes, threading, enabled by default, and mutually incompatible with MPI.

Now I am making minor changes to the mdrun source code, and I want to 
recompile such that the parallel version of mdrun is updated with my 
changes.  But when I run:


  make mdrun (or just make)
  make install-mdrun (or just make install)

from the top-level source directory, the only executables that are 
updated are the ones with the _mpi suffix, such as mdrun_mpi.  The 
version of mdrun in src/kernel/ is updated, but this one has no -nt 
flag and cannot seem to run on multiple processors.  And when I run


Subsequently you have configured with --enable-mpi, so threading is 
disabled. Now everything is probably a mess.




  mpirun -np N mdrun_mpi [options],

the same simulation is started separately on each processor, leading 
to a crash.  If I use


  mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],

I get an error message that this is not supported on my computer ("An 
attempt to set processor affinity has failed").


I can't configure the input .tpr file for parallel because grompp 
doesn't have the -np flag in GROMACS 4.


How can I update the parallel-capable "mdrun" executable with my changes?


Run "make distclean" and then re-configure.

Mark
--
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.

Can't post? Read http://www.gromacs.org/Support/Mailing_Lists


Re: [gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Carsten Kutzner
Hi,

you could try a make clean, and then configure again with --enable-threads.
It seems for some reason you only build the serial mdrun version.

Carsten


On Mar 24, 2011, at 1:51 PM, Adam Herbst wrote:

> Dear GROMACS users,
> I successfully installed GROMACS 4.5.1 several months ago on a Mac Pro with 
> 12 CPUs, and the "mdrun" command (not "mpirun mdrun_mpi") allows parallel 
> simulations--it automatically uses multiple processors, while the number of 
> processors can be manually specified as N with the flag "mdrun -nt N".  I 
> understand that this is a feature of GROMACS 4 and later.  Now I am making 
> minor changes to the mdrun source code, and I want to recompile such that the 
> parallel version of mdrun is updated with my changes.  But when I run:
> 
>   make mdrun (or just make)
>   make install-mdrun (or just make install)
> 
> from the top-level source directory, the only executables that are updated 
> are the ones with the _mpi suffix, such as mdrun_mpi.  The version of mdrun 
> in src/kernel/ is updated, but this one has no -nt flag and cannot seem to 
> run on multiple processors.  And when I run
> 
>   mpirun -np N mdrun_mpi [options],
> 
> the same simulation is started separately on each processor, leading to a 
> crash.  If I use
> 
>   mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],
> 
> I get an error message that this is not supported on my computer ("An attempt 
> to set processor affinity has failed").
> 
> I can't configure the input .tpr file for parallel because grompp doesn't 
> have the -np flag in GROMACS 4.
> 
> How can I update the parallel-capable "mdrun" executable with my changes?
> Thanks in advance,
> 
> Adam
> -- 
> gmx-users mailing listgmx-users@gromacs.org
> http://lists.gromacs.org/mailman/listinfo/gmx-users
> Please search the archive at 
> http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
> Please don't post (un)subscribe requests to the list. Use the 
> www interface or send it to gmx-users-requ...@gromacs.org.
> Can't post? Read http://www.gromacs.org/Support/Mailing_Lists


--
Dr. Carsten Kutzner
Max Planck Institute for Biophysical Chemistry
Theoretical and Computational Biophysics
Am Fassberg 11, 37077 Goettingen, Germany
Tel. +49-551-2012313, Fax: +49-551-2012302
http://www.mpibpc.mpg.de/home/grubmueller/ihp/ckutzne




--
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists


Re: [gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Justin A. Lemkul



Adam Herbst wrote:

Dear GROMACS users,
I successfully installed GROMACS 4.5.1 several months ago on a Mac Pro 
with 12 CPUs, and the "mdrun" command (not "mpirun mdrun_mpi") allows 
parallel simulations--it automatically uses multiple processors, while 
the number of processors can be manually specified as N with the flag 
"mdrun -nt N".  I understand that this is a feature of GROMACS 4 and 
later.  Now I am making minor changes to the mdrun source code, and I 
want to recompile such that the parallel version of mdrun is updated 
with my changes.  But when I run:


  make mdrun (or just make)
  make install-mdrun (or just make install)

from the top-level source directory, the only executables that are 
updated are the ones with the _mpi suffix, such as mdrun_mpi.  The 
version of mdrun in src/kernel/ is updated, but this one has no -nt flag 
and cannot seem to run on multiple processors.  And when I run




Please post your actual configuration command.  Did you properly --enable-mpi 
and --disable-threads?  What MPI library are you using?  Do other processes 
executed via mpirun work as expected?



  mpirun -np N mdrun_mpi [options],

the same simulation is started separately on each processor, leading to 
a crash.  If I use


  mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],

I get an error message that this is not supported on my computer ("An 
attempt to set processor affinity has failed").


I can't configure the input .tpr file for parallel because grompp 
doesn't have the -np flag in GROMACS 4.




There is no need to do this anymore.  mdrun deals with all aspects of 
parallelization.  A .tpr file can then be run on as many processors as you like.


-Justin


How can I update the parallel-capable "mdrun" executable with my changes?
Thanks in advance,

Adam



--


Justin A. Lemkul
Ph.D. Candidate
ICTAS Doctoral Scholar
MILES-IGERT Trainee
Department of Biochemistry
Virginia Tech
Blacksburg, VA
jalemkul[at]vt.edu | (540) 231-9080
http://www.bevanlab.biochem.vt.edu/Pages/Personal/justin


--
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.

Can't post? Read http://www.gromacs.org/Support/Mailing_Lists


[gmx-users] GROMACS 4.5.1 mdrun re-compile for MPI

2011-03-24 Thread Adam Herbst
Dear GROMACS users,
I successfully installed GROMACS 4.5.1 several months ago on a Mac Pro with
12 CPUs, and the "mdrun" command (not "mpirun mdrun_mpi") allows parallel
simulations--it automatically uses multiple processors, while the number of
processors can be manually specified as N with the flag "mdrun -nt N".  I
understand that this is a feature of GROMACS 4 and later.  Now I am making
minor changes to the mdrun source code, and I want to recompile such that
the parallel version of mdrun is updated with my changes.  But when I run:

  make mdrun (or just make)
  make install-mdrun (or just make install)

from the top-level source directory, the only executables that are updated
are the ones with the _mpi suffix, such as mdrun_mpi.  The version of mdrun
in src/kernel/ is updated, but this one has no -nt flag and cannot seem to
run on multiple processors.  And when I run

  mpirun -np N mdrun_mpi [options],

the same simulation is started separately on each processor, leading to a
crash.  If I use

  mpirun -np 1 -cpus-per-proc N mdrun_mpi [options],

I get an error message that this is not supported on my computer ("An
attempt to set processor affinity has failed").

I can't configure the input .tpr file for parallel because grompp doesn't
have the -np flag in GROMACS 4.

How can I update the parallel-capable "mdrun" executable with my changes?
Thanks in advance,

Adam
-- 
gmx-users mailing listgmx-users@gromacs.org
http://lists.gromacs.org/mailman/listinfo/gmx-users
Please search the archive at 
http://www.gromacs.org/Support/Mailing_Lists/Search before posting!
Please don't post (un)subscribe requests to the list. Use the 
www interface or send it to gmx-users-requ...@gromacs.org.
Can't post? Read http://www.gromacs.org/Support/Mailing_Lists