[CP2K-user] [CP2K:12283] Running Cp2k in parallel using thread in a PC
Chn
chen... at gmail.com
Mon Sep 30 03:31:19 UTC 2019
Hi Pierre,
The six files were obtained by using cp2k.psmp and when I used .ssmp it
output only one file named *-r-0.out. The number of files seems like to be
connected with the threads I used, but I don't know that is it a parallel
run job.
regrads,
chn
在 2019年9月28日星期六 UTC+8下午8:14:54,Pierre-André Cazade写道:
>
> Hi Nikhil,
>
> As you are using a mix of MPI and OpenMP, you have to use the executable
> with the extension psmp.
>
> You can find a table describing all the executables in the section 3 of
> the “how to compile” page:
>
> https://www.cp2k.org/howto:compile
>
> Yet, it does not explain why your calculation behaved as if there were 6
> independent calculations.
>
> Please try the same calculation with the psmp executable and let me know
> how it goes.
>
> Regards,
> Pierre
>
> Get Outlook for iOS <https://aka.ms/o0ukef>
>
> ------------------------------
> *From:* c... at googlegroups.com <javascript:> on behalf of Chn <
> ch... at gmail.com <javascript:>>
> *Sent:* Saturday, September 28, 2019 3:03 a.m.
> *To:* cp2k
> *Subject:* Re: [CP2K:12283] Running Cp2k in parallel using thread in a PC
>
> Hi Pierre,
> I tried to combine openMP with MPI as you mentioned above when I do
> vibrational analysis. I required 6 MPI threads and got 6 output files named
> as *-r-number.out, however in each file it printed that:
> GLOBAL| Total number of message passing processes
> 1
> GLOBAL| Number of threads for this process
> 1
> GLOBAL| This output is from process
> 0
> also I used 'top' command and found that only 6 cores were busy.
> I use 2 x 24 core processor, and set:
> export OMP_NUM_THREADS=8
> mpirun -n 6 /lib/CP2K/cp2k/exe/local/cp2k.popt -i project.inp -o output.out
> Any suggestion will be greatly appreciated..
>
>
>
> 在 2019年9月20日星期五 UTC+8下午10:45:55,Pierre Cazade写道:
>>
>> Hello Nikhil,
>>
>> Withe command "mpirun -n 42 cp2k.pop -i inp.inp -o -out.out", you are
>> requesting 42 MPI threads and not 42 OpenMP threads. MPI usually relies on
>> replicated data which means that, for a poorly program software, it will
>> request a total amount of memory which the amount of memory required by a
>> scalar execution times the number of threads. This can very quickly become
>> problematic, in particular for QM calculations. OpenMP, however relies on
>> shared memory, the data is normally not replicated but shared between
>> threads and therefore, in an ideal scenario, the amount of memory needed
>> for 42 OpenMP threads is the same as a single one.
>>
>> This might explains why you calculation freezes. You are out of memory.
>> On your workstation, you should only use the executable "cp2k.ssmp" which
>> is the OpenMP version. Then you don't need the mpirun command:
>>
>> cp2k.ssmp -i inp.inp -o -out.out
>>
>> To control the number of OpenMP threads, set the env variable:
>> OMP_NUM_THREADS, e.g. in bash, export OMP_NUM_THREADS=48
>>
>> Now, if you need to balance between MPI and OpenMP, you should use the
>> executable named cp2k.psmp. Here is such an example:
>>
>> export OMP_NUM_THREADS=24
>> mpirun -n 2 cp2k.psmp -i inp.inp -o -out.out
>>
>> In this example, I am requesting two MPI threads and each of them can use
>> up to 24 OpenMP threads.
>>
>> Hope this clarifies things for you.
>>
>> Regards,
>> Pierre
>>
>> On 20/09/2019 14:09, Nikhil Maroli wrote:
>>
>> Dear all,
>>
>> I have installed all the versions of CP2K in my workstation with 2 x 12
>> core processor, total thread=48
>>
>> I wanted to run cp2k in parallel using 42 threads, can anyone share the
>> commands that i can use.
>>
>> I have tried
>>
>> mpirun -n 42 cp2k.pop -i inp.inp -o -out.out
>>
>> After this command there is a rise in memory to 100 % and the whole
>> system freezes. (i have 128GB ram).
>>
>> Any suggestion will be greatly appreciated,
>> --
>> You received this message because you are subscribed to the Google Groups
>> "cp2k" group.
>> To unsubscribe from this group and stop receiving emails from it, send an
>> email to c... at googlegroups.com.
>> To view this discussion on the web visit
>> https://groups.google.com/d/msgid/cp2k/39284c57-f6eb-463e-81a6-3a123596a9f2%40googlegroups.com
>> <https://groups.google.com/d/msgid/cp2k/39284c57-f6eb-463e-81a6-3a123596a9f2%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>>
>>
>> --
>> Dr Pierre Cazade, PhD
>> AD3-023, Bernal Institute,
>> University of Limerick,
>> Plassey Park Road,
>> Castletroy, co. Limerick,
>> Ireland
>>
>> --
> You received this message because you are subscribed to the Google Groups
> "cp2k" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to c... at googlegroups.com <javascript:>.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/cp2k/2d26c264-d73a-44de-af89-13ff0ac86f69%40googlegroups.com
> <https://groups.google.com/d/msgid/cp2k/2d26c264-d73a-44de-af89-13ff0ac86f69%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.cp2k.org/archives/cp2k-user/attachments/20190929/062960e8/attachment.htm>
More information about the CP2K-user
mailing list