LAMMPS WWW Site - LAMMPS Documentation - LAMMPS Mailing List Archives
Re: [lammps-users] LAMMPS COUPLE in SERIAL
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [lammps-users] LAMMPS COUPLE in SERIAL


From: Axel Kohlmeyer <akohlmey@...24...>
Date: Fri, 4 May 2018 09:04:08 -0400

On Fri, May 4, 2018 at 6:25 AM, Jonathan <jonathan.bean@...7603...> wrote:
> Dear Axel
>
> Thanks for the info about the command line output.
>
> On the STUBS library it works ok for just one instance of lammps but say if
> I want to run many serial instances of lammps. Is it possible to force
> lammps to only use a processor id which is set in a parent function.

you have to provide more details about what you are doing and how you
detect, that things are not working the way you expect.

the easiest way to make certain that each LAMMPS instance uses a
specific processor is to use MPI in the top level software, the use
MPI_Comm_split() to generate subcommunicators (in the most extreme
case one for each MPI rank) and then pass those to the lammps_open()
function, provide the LAMMPS library was compiled using the *same* MPI
library (you cannot mix and match).

axel.

>
> Jonathan
>
>
> On 02/05/18 18:07, Axel Kohlmeyer wrote:
>
> LAMMPS always is compiled against an MPI library, but you can use the dummy
> library in the src/STUBS folder to run in serial (see Makefile.serial).
>
> You can turn off screen/log file output via command line flags, which can
> also be passed to the library init.
>
> Axel
>
>
>
> --
> Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
> College of Science & Technology, Temple University, Philadelphia PA, USA
> International Centre for Theoretical Physics, Trieste. Italy.
>
> On Wed, May 2, 2018, 12:02 Jonathan <jb2191@...1167...> wrote:
>>
>> Dear All
>>
>> There is a quite nice example in the lammps "examples" directory of
>> showing how to use lammps as a library within c/c++.
>>
>>
>> https://github.com/lammps/lammps/blob/master/examples/COUPLE/simple/simple.cpp
>>
>> However this is in MPI, does anybody know whether it is possible to
>> force lammps to run in serial in this mode. There is a function in the
>> previous file
>>
>> "lmp = new LAMMPS(0, NULL, comm_lammps)"
>>
>> which I'm assuming changes this behaviour.
>>
>> In addition using lammps in this way is quite fast but is significantly
>> slowed down by printing to standard output. Does anybody know how to
>> suppress the output to only gather the result?
>>
>> Thanks
>>
>> Jonathan
>>
>>
>>
>> ------------------------------------------------------------------------------
>> Check out the vibrant tech community on one of the world's most
>> engaging tech sites, Slashdot.org! http://sdm.link/slashdot
>> _______________________________________________
>> lammps-users mailing list
>> lammps-users@lists.sourceforge.net
>> https://lists.sourceforge.net/lists/listinfo/lammps-users
>
>
>
> .....
> HonourTree | HonourTree.co.uk
>
>
> This communication, issued by HonourTree, is confidential and may be
> privileged or otherwise protected. Additionally, all opinions herein
> contained are the sole opinion of the named sender and may not be relied
> upon to represent the opinion of HonourTree. If you have received this
> message by mistake please let us know by reply and then delete it from your
> system; you should not copy it or disclose its contents to anyone. All
> messages sent to and from HonourTree may be monitored to ensure compliance
> with internal policies and to protect our business. Emails are not secure
> and cannot be guaranteed to be without error as they can be intercepted,
> amended, lost or destroyed, or contain viruses. Anyone who communicates with
> us by email is taken to accept these risks. HonourTree is registered in
> England.



-- 
Dr. Axel Kohlmeyer  akohlmey@...24...  http://goo.gl/1wk0
College of Science & Technology, Temple University, Philadelphia PA, USA
International Centre for Theoretical Physics, Trieste. Italy.