[Wien] Installation of wienk

Peter Blaha pblaha at theochem.tuwien.ac.at
Wed Aug 21 09:26:53 CEST 2019


Details matter !!!   You have to be exact in your description in order 
to give us a hint where we can help.

a) How did you install wien2k ??? Did you say a shared memory machine or 
not in siteconfig ??
You can check it in $WIENROOT/parallel_options. Both, USE_REMOTE and 
MPI_REMOTE should be set to zero for your case.

b) Please copy $WIENROOT/SRC_templates/.machines as a template for a 
.machines file and read the instructions about parallelization in the UG.

c) In general I'd most likely set   OMP_NUM_THREAD=2 or 4 in your 
.bashrc file. This will then use by default 2 (or 4) cores always.

d) Check, understand and test various options in the .machines file.

k-parallel:  The syntax is (provided that "localhost" works on your system):

1:localhost
1:localhost

(you cannot type only "localhost" as indicated in your mail). This spans 
2 k-parallel jobs, each of them will run on 2 (4) cores due to openMP. 
If you add more lines, you span more jobs and can use all your 20 cores.

HOWEVER: This will run 20 times slower for your TiC example, because we 
have a short delay between spanning new processes, and this delay is 
LONGER than the actual lapw1 job takes.

Alternatively, you could put:

1:localhost:20
omp_global:1

This would not use openMP, but a mpi-job (lapw1_mpi) on 20 cores would 
be started. Again, this would run MUCH longer (or even crash ?) for TiC.

In essence: parallelization, and in particular how to parallelize most 
efficiently, depends crucial on the SPECIFIC test case. And TiC CANNOT 
be efficiently parallelized on 20 cores.




On 8/20/19 7:08 PM, Israel Omar Perez Lopez wrote:
> Thanks for your reply
> 
> 
> The virtual machine we are using is VMmare esxi 6.0. Linux is installed 
> in this VM and reconizes the 20 cores Intel(R) Xeon(R) CPU E5-2690 v4 @ 
> 2.60GHz,  we have 98 GB of RAM, one thread per core, one socket per 
> core, 20 sockets, and 2 NUMA nodes, 10 cores per node. This is what it 
> reads from linux terminal.
> 
> 
> When a virtual machine is installed, the CPUs are assigned to this VM, 
> as well as the RAM. There should be no problem with RAM sharing.
> 
> 
> Regarding the variable OMP_THREAD, I was mistaken, I wanted to say 
> OMP_NUM_THREADS; this variable is set to 1 during userconfig. After 
> executing testpara, only two CPUs are recognized.
> 
> 
> I have checked the UG section 5.5 and that is why I tried those options.
> 
> 
> I am aware that TiC is a small system, but I used it just to check 
> parallelization, later I will check timing in the different modes. As of 
> now I want to make sure how to run the 20 cores in parallel.
> 
> 
> So, what is the correct way to configure Wien2k or the .machines file, 
> so the 20 cores work?
> 
> 
> Or is it that parallelization does not work in virtual machines? Has any 
> one installed Wien2k in a virtual machine?
> 
> 
> Regards
> 
> 
> Dr. Israel Pérez
> 
> Institute of Engineering and Technology
> 
> Department of Physics and Mathematics,
> 
> Universidad Autónoma de Ciudad Juárez
> 
> Av. del Charro 450 Nte., Col. Partido Romero,
> 
> Ciudad Juárez, Juarez Chihuahua. Mexico C. P. 32310
> 
> Tel: +52 (656) 688 4887
> 
> 
> National Council of Science and Technology
> 
> Insurgentes Sur No. 1582,
> 
> Col. Crédito Constructor,  C.P. 03940
> 
> Del. Benito Juárez, México D. F.
> 
> ------------------------------------------------------------------------
> *From:* Wien <wien-bounces at zeus.theochem.tuwien.ac.at> on behalf of 
> Gavin Abo <gsabo at crimson.ua.edu>
> *Sent:* Tuesday, August 20, 2019 12:05:08 AM
> *To:* wien at zeus.theochem.tuwien.ac.at <wien at zeus.theochem.tuwien.ac.at>
> *Subject:* Re: [Wien] Installation of wienk
> 
> What virtual machine (Virtual Box, VMware, etc. [1])? Seems to matter 
> according to [2,3].
> 
> 
> Since a virtual machine tends to be an operating system running on top 
> of another operating system (OS), there will most likely be a 
> performance loss to your calculations [4].  Perhaps the calculation will 
> run slower [disk caching due to lack of random access memory (RAM), CPU 
> sharing between both OS) or structures that can be calculated could be 
> limited by the loss of free RAM (two OS using RAM instead of just one OS 
> + RAM used by virtual machine software].
> 
> 
> TiC case is fine for first learning mpi parallel but is known that it 
> can be slower than just doing a serial calculation for it as it is too 
> small a case (e.g., to few nonequivalent atomic positions) [5,6].
> 
> 
> Your statement below "... calculations take longer than in series ..." 
> seems to confirm this.
> 
> 
> "... one processor for the variable OMP_THREAD (instead of 20 cores) 
> ..." <- Don't confuse a thread and a core, they should be different 
> [7,8,9].  For example, look at the specifications for an i7-8700K 
> processor [10] which shows that Intel processor has # of cores as 6 and 
> # of threads as 12.
> 
> 
> Is OMP_THREAD a special variable particular to your system?  If not, you 
> might want to check your .bashrc (within the block created by 
> userconfig_lapw) and the WIEN2k 19.1 UG (section "5.5.3 How to use 
> WIEN2k as a parallel program" on page 86) [11] as a different 
> environmental variable might be needed.
> 
> 
> username at computername:~$ grep THREAD ~/.bashrc
> export OMP_NUM_THREADS=1
> 
> 
> [1] https://en.wikipedia.org/wiki/Virtual_machine#Full_virtualization
> 
> [2] 
> https://superuser.com/questions/1035010/what-is-the-performance-difference-of-a-virtual-machine-vs-the-physical-host
> 
> [3] 
> https://www.researchgate.net/post/Why_there_is_a_performance_variation_between_physical_machine_and_virtual_machine_with_same_number_of_cores_and_memory
> 
> [4] 
> https://hetmanrecovery.com/recovery_news/how-to-speed-up-the-operation-of-a-virtual-machine.htm
> 
> [5] 
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg05622.html
> 
> [6] 
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg02976.html
> 
> [7] 
> https://bitsum.com/tips-and-tweaks/what-is-the-difference-between-a-thread-and-a-core/
> 
> [8] 
> https://www.intel.com/content/www/us/en/architecture-and-technology/hyper-threading/hyper-threading-technology.html
> 
> [9] 
> https://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/msg08702.html
> 
> [10] 
> https://ark.intel.com/content/www/us/en/ark/products/126684/intel-core-i7-8700k-processor-12m-cache-up-to-4-70-ghz.html
> 
> [11] http://susi.theochem.tuwien.ac.at/reg_user/textbooks/usersguide.pdf
> 
> 
> On 8/19/2019 10:00 PM, Israel Omar Perez Lopez wrote:
>>
>> Dear mailing list
>>
>>
>> I have a virtual machine with 20 cores running in linux mint (linux 
>> recognizes that the computer has 20 cores divided in two nodes 10 
>> each, however, there is only one physical node). How can I use Wien2k 
>> to do parallel calculations in a virtual machine so the 
>> parallelization uses the 20 cores. As far as I know, wien2k 19.1 has 
>> three modes of parallelization: MPI, k-point and OMP (according to the 
>> UG only for computers with less than 8 cores). I have already 
>> installed intel parallel studio 2019 and wien2k but when I do the 
>> userconfig the system only detects one processor for the variable 
>> OMP_THREAD (instead of 20 cores). Since it is only one machine, what 
>> is the best configuration in the .machines file to use the 20 cores? 
>> Based on the UG I have tried three configurations for TiC in 
>> .machines: 1) localhost:20, 2) MPI parallelization implemented as: 
>> localhost, localhost, ....localhost 20 times, and 3) k-point 
>> implemented as:
>>
>> localhost
>>
>> localhost
>>
>> ....
>>
>> 20 times
>>
>>
>> For the first and second case, the computations do not stop, it does 
>> not even compute lapw0, so I have to cancel the job with cancel_lapw. 
>> For the third case the calculations are carried out, but it seems that 
>> the 20 cores do not work at the same time, they work one after another 
>> and at the end, thecalculations take longer than in series. I checked 
>> this with testpara1.
>>
>>
>> I would be glad if you could give a helpful comment on how to use the 
>> 20 cores in this machine.
>>
>>
>> Regards
>>
>>
>> Dr. Israel Pérez
>>
>> Institute of Engineering and Technology
>>
>> Department of Physics and Mathematics,
>>
>> Universidad Autónoma de Ciudad Juárez
>>
>> Av. del Charro 450 Nte., Col. Partido Romero,
>>
>> Ciudad Juárez, Juarez Chihuahua. Mexico C. P. 32310
>>
>> Tel: +52 (656) 688 4887
>>
>>
>> National Council of Science and Technology
>>
>> Insurgentes Sur No. 1582,
>>
>> Col. Crédito Constructor,  C.P. 03940
>>
>> Del. Benito Juárez, México D. F.
>>
> 
> 
> _______________________________________________
> Wien mailing list
> Wien at zeus.theochem.tuwien.ac.at
> http://zeus.theochem.tuwien.ac.at/mailman/listinfo/wien
> SEARCH the MAILING-LIST at:  http://www.mail-archive.com/wien@zeus.theochem.tuwien.ac.at/index.html
> 

-- 

                                       P.Blaha
--------------------------------------------------------------------------
Peter BLAHA, Inst.f. Materials Chemistry, TU Vienna, A-1060 Vienna
Phone: +43-1-58801-165300             FAX: +43-1-58801-165982
Email: blaha at theochem.tuwien.ac.at    WIEN2k: http://www.wien2k.at
WWW:   http://www.imc.tuwien.ac.at/TC_Blaha
--------------------------------------------------------------------------


More information about the Wien mailing list