Top Page > Browsing
Installation of OpenMX Ver. 3.9 on Ubuntu 18.04.4 LTS on WSL on Windows 10 (64bit)
Date: 2021/08/24 21:14
Name: T. Ozaki

Dear all,

I would like to share my experience of installation of OpenMX Ver. 3.9 with patch 3.9.6 on Ubuntu 18.04.4 LTS
on WSL1 and WSL2 on Windows 10 (64bit) as below.

Best regards,

Taisuke Ozaki


-----------------------

1. Installation of Intel oneAPI Base Toolkit + HPC Toolkit

Intel oneAPI Toolkits are now free for all developers at
https://software.intel.com/content/www/us/en/develop/articles/free-intel-software-developer-tools.html
which includes intel compilers, MKL, intel MPI, blacs, ScaLapack, and FFTW: all are required for the OpenMX installation.

Via the website, download l_BaseKit_p_2021.3.0.3219_offline.sh with the following specification:
Operating System: Linux
Distribution: Web&Local (recommended)
Installer Type: Local

and do the following on command line of WSL:
sudo bash l_BaseKit_p_2021.3.0.3219_offline.sh

Also, via the wesite, download l_HPCKit_p_2021.3.0.3230_offline.sh with the following specification:
Operating System: Linux
Distribution: Web&Local (recommended)
Installer Type: Local

and do the following on command line of WSL:
sudo bash l_HPCKit_p_2021.3.0.3230_offline.sh

After the installation of oneAPI Base Toolkit and HPC Toolkit, perform the following on command line:
source /opt/intel/oneapi/setvars.sh

Also, it would be better to add
source /opt/intel/oneapi/setvars.sh
to .bashrc
Then, you can use Intel oneAPI Base Toolkit and HPC Toolkit on Ubuntu 18.04.4 LTS on WSL on Windows 10 64bit.


2. Installation of OpenMX Ver. 3.9 with patch 3.9.6

In the makefile of OpenMX Ver. 3.9 with patch 3.9.6, specify MKLROOT, CC, FC, and LIB as follows:
(As for the installation of OpenMX Ver. 3.9 with patch 3.9.6,
please also refer http://www.openmx-square.org/bugfixed/21Aug21/README.txt )

MKLROOT = /opt/intel/oneapi/mkl/2021.3.0/
CC = mpiicc -O3 -xHOST -ip -no-prec-div -qopenmp -I${MKLROOT}/include -I${MKLROOT}/include/fftw
FC = mpiifort -O3 -xHOST -ip -no-prec-div -qopenmp
LIB= -L${MKLROOT}/lib/intel64 -lmkl_scalapack_lp64 -lmkl_intel_lp64 -lmkl_intel_thread -lmkl_core -lifcore -lmkl_blacs_intelmpi_lp64 -liomp5 -lpthread -lm -ldl

Then, for the installation you can perform as
make all
make install

After the installation, you will get the executable file: openmx in the work directory.
Using 4 cores of Intel(R) Core(TM) i7-8550U CPU@1.8GHz with memory of 15.9 GB, which is my laptop computer,
the runtest results are as follows:

WSL1: mpirun -np 4 ./openmx -runtest -nt 1

1 input_example/Benzene.dat Elapsed time(s)= 10.35 diff Utot= 0.000000000031 diff Force= 0.000000000003
2 input_example/C60.dat Elapsed time(s)= 48.24 diff Utot= 0.000000000000 diff Force= 0.000000000001
3 input_example/CO.dat Elapsed time(s)= 23.61 diff Utot= 0.000000000096 diff Force= 0.000000000262
4 input_example/Cr2.dat Elapsed time(s)= 21.58 diff Utot= 0.000000000944 diff Force= 0.000000000294
5 input_example/Crys-MnO.dat Elapsed time(s)= 84.86 diff Utot= 0.000000000003 diff Force= 0.000000000004
6 input_example/GaAs.dat Elapsed time(s)= 99.17 diff Utot= 0.000000000000 diff Force= 0.000000000000
7 input_example/Glycine.dat Elapsed time(s)= 11.67 diff Utot= 0.000000000001 diff Force= 0.000000000000
8 input_example/Graphite4.dat Elapsed time(s)= 7.99 diff Utot= 0.000000000006 diff Force= 0.000000000127
9 input_example/H2O-EF.dat Elapsed time(s)= 8.70 diff Utot= 0.000000000000 diff Force= 0.000000000002
10 input_example/H2O.dat Elapsed time(s)= 8.13 diff Utot= 0.000000000000 diff Force= 0.000000000011
11 input_example/HMn.dat Elapsed time(s)= 29.00 diff Utot= 0.000000000131 diff Force= 0.000000000021
12 input_example/Methane.dat Elapsed time(s)= 6.54 diff Utot= 0.000000000016 diff Force= 0.000000000001
13 input_example/Mol_MnO.dat Elapsed time(s)= 17.34 diff Utot= 0.000000000370 diff Force= 0.000000000118
14 input_example/Ndia2.dat Elapsed time(s)= 8.71 diff Utot= 0.000000000001 diff Force= 0.000000000000

Total elapsed time (s) 385.90

WSL1: mpirun -np 2 ./openmx -runtest -nt 2

1 input_example/Benzene.dat Elapsed time(s)= 42.82 diff Utot= 0.000000000014 diff Force= 0.000000000000
2 input_example/C60.dat Elapsed time(s)= 111.33 diff Utot= 0.000000000004 diff Force= 0.000000000000
3 input_example/CO.dat Elapsed time(s)= 90.98 diff Utot= 0.000000000095 diff Force= 0.000000003127
4 input_example/Cr2.dat Elapsed time(s)= 136.40 diff Utot= 0.000000000981 diff Force= 0.000000000100
5 input_example/Crys-MnO.dat Elapsed time(s)= 186.73 diff Utot= 0.000000000000 diff Force= 0.000000000092
6 input_example/GaAs.dat Elapsed time(s)= 239.03 diff Utot= 0.000000000011 diff Force= 0.000000000001
7 input_example/Glycine.dat Elapsed time(s)= 110.98 diff Utot= 0.000000000001 diff Force= 0.000000000000
8 input_example/Graphite4.dat Elapsed time(s)= 100.46 diff Utot= 0.000000000009 diff Force= 0.000000000042
9 input_example/H2O-EF.dat Elapsed time(s)= 82.04 diff Utot= 0.000000000002 diff Force= 0.000000000002
10 input_example/H2O.dat Elapsed time(s)= 105.53 diff Utot= 0.000000000001 diff Force= 0.000000000386
11 input_example/HMn.dat Elapsed time(s)= 186.35 diff Utot= 0.000000000151 diff Force= 0.000000000022
12 input_example/Methane.dat Elapsed time(s)= 95.88 diff Utot= 0.000000000000 diff Force= 0.000000000002
13 input_example/Mol_MnO.dat Elapsed time(s)= 194.06 diff Utot= 0.000000000316 diff Force= 0.000000000082
14 input_example/Ndia2.dat Elapsed time(s)= 123.05 diff Utot= 0.000000000001 diff Force= 0.000000000000

Total elapsed time (s) 1805.65

Though the speed is not so fast, one can confirm that OpenMX runs normally in both the MPI and MPI/OpenMP hybrid modes.

I have also tested "runtest" on WSL2 on the same machine, and obtained the following results:

WSL2: mpirun -np 4 ./openmx -runtest -nt 1

1 input_example/Benzene.dat Elapsed time(s)= 8.26 diff Utot= 0.000000000031 diff Force= 0.000000000003
2 input_example/C60.dat Elapsed time(s)= 39.83 diff Utot= 0.000000000000 diff Force= 0.000000000000
3 input_example/CO.dat Elapsed time(s)= 17.06 diff Utot= 0.000000000096 diff Force= 0.000000000272
4 input_example/Cr2.dat Elapsed time(s)= 13.07 diff Utot= 0.000000000943 diff Force= 0.000000000292
5 input_example/Crys-MnO.dat Elapsed time(s)= 42.87 diff Utot= 0.000000000003 diff Force= 0.000000000007
6 input_example/GaAs.dat Elapsed time(s)= 73.80 diff Utot= 0.000000000000 diff Force= 0.000000000000
7 input_example/Glycine.dat Elapsed time(s)= 10.12 diff Utot= 0.000000000001 diff Force= 0.000000000000
8 input_example/Graphite4.dat Elapsed time(s)= 6.38 diff Utot= 0.000000000002 diff Force= 0.000000000053
9 input_example/H2O-EF.dat Elapsed time(s)= 7.05 diff Utot= 0.000000000000 diff Force= 0.000000000002
10 input_example/H2O.dat Elapsed time(s)= 5.54 diff Utot= 0.000000000000 diff Force= 0.000000000011
11 input_example/HMn.dat Elapsed time(s)= 24.60 diff Utot= 0.000000000131 diff Force= 0.000000000021
12 input_example/Methane.dat Elapsed time(s)= 5.25 diff Utot= 0.000000000016 diff Force= 0.000000000001
13 input_example/Mol_MnO.dat Elapsed time(s)= 13.90 diff Utot= 0.000000000370 diff Force= 0.000000000118
14 input_example/Ndia2.dat Elapsed time(s)= 7.57 diff Utot= 0.000000000001 diff Force= 0.000000000000

Total elapsed time (s) 275.30

WSL2: mpirun -np 2 ./openmx -runtest -nt 2

1 input_example/Benzene.dat Elapsed time(s)= 7.58 diff Utot= 0.000000000016 diff Force= 0.000000000003
2 input_example/C60.dat Elapsed time(s)= 44.08 diff Utot= 0.000000000005 diff Force= 0.000000000001
3 input_example/CO.dat Elapsed time(s)= 15.27 diff Utot= 0.000000000095 diff Force= 0.000000003113
4 input_example/Cr2.dat Elapsed time(s)= 10.46 diff Utot= 0.000000000485 diff Force= 0.000000000013
5 input_example/Crys-MnO.dat Elapsed time(s)= 48.64 diff Utot= 0.000000000001 diff Force= 0.000000000029
6 input_example/GaAs.dat Elapsed time(s)= 75.99 diff Utot= 0.000000000011 diff Force= 0.000000000000
7 input_example/Glycine.dat Elapsed time(s)= 9.36 diff Utot= 0.000000000001 diff Force= 0.000000000001
8 input_example/Graphite4.dat Elapsed time(s)= 5.46 diff Utot= 0.000000000000 diff Force= 0.000000000062
9 input_example/H2O-EF.dat Elapsed time(s)= 7.33 diff Utot= 0.000000000000 diff Force= 0.000000000003
10 input_example/H2O.dat Elapsed time(s)= 4.78 diff Utot= 0.000000000000 diff Force= 0.000000003251
11 input_example/HMn.dat Elapsed time(s)= 23.01 diff Utot= 0.000000000151 diff Force= 0.000000000022
12 input_example/Methane.dat Elapsed time(s)= 4.70 diff Utot= 0.000000000001 diff Force= 0.000000000001
13 input_example/Mol_MnO.dat Elapsed time(s)= 13.68 diff Utot= 0.000000000150 diff Force= 0.000000000001
14 input_example/Ndia2.dat Elapsed time(s)= 5.21 diff Utot= 0.000000000001 diff Force= 0.000000000000

Total elapsed time (s) 275.55

WSL2: mpirun -np 1 ./openmx -runtest -nt 4

1 input_example/Benzene.dat Elapsed time(s)= 8.44 diff Utot= 0.000000000034 diff Force= 0.000000000007
2 input_example/C60.dat Elapsed time(s)= 41.34 diff Utot= 0.000000000008 diff Force= 0.000000000001
3 input_example/CO.dat Elapsed time(s)= 14.01 diff Utot= 0.000000000026 diff Force= 0.000000007116
4 input_example/Cr2.dat Elapsed time(s)= 9.90 diff Utot= 0.000000000076 diff Force= 0.000000000126
5 input_example/Crys-MnO.dat Elapsed time(s)= 64.26 diff Utot= 0.000000000002 diff Force= 0.000000000020
6 input_example/GaAs.dat Elapsed time(s)= 103.12 diff Utot= 0.000000000011 diff Force= 0.000000000000
7 input_example/Glycine.dat Elapsed time(s)= 10.61 diff Utot= 0.000000000001 diff Force= 0.000000000001
8 input_example/Graphite4.dat Elapsed time(s)= 4.95 diff Utot= 0.000000000032 diff Force= 0.000000000100
9 input_example/H2O-EF.dat Elapsed time(s)= 7.12 diff Utot= 0.000000000001 diff Force= 0.000000000002
10 input_example/H2O.dat Elapsed time(s)= 5.12 diff Utot= 0.000000000001 diff Force= 0.000000003260
11 input_example/HMn.dat Elapsed time(s)= 26.83 diff Utot= 0.000000000150 diff Force= 0.000000000021
12 input_example/Methane.dat Elapsed time(s)= 4.21 diff Utot= 0.000000000000 diff Force= 0.000000000001
13 input_example/Mol_MnO.dat Elapsed time(s)= 15.21 diff Utot= 0.000000000087 diff Force= 0.000000000092
14 input_example/Ndia2.dat Elapsed time(s)= 5.74 diff Utot= 0.000000000000 diff Force= 0.000000000001

Total elapsed time (s) 320.86


In summary, we see the following results:

WSL1, 4 MPI procs. & 1 OMP threads: 385.90 sec.
WSL1, 2 MPI procs. & 2 OMP threads:1805.65 sec.
WSL2, 4 MPI procs. & 1 OMP threads: 275.30 sec.
WSL2, 2 MPI procs. & 2 OMP threads: 275.55 sec.
WSL2, 1 MPI procs. & 4 OMP threads: 320.86 sec.

The results suggest that WSL2 is faster for the execution of OpenMX Ver. 3.9.6.

メンテ
Page: [1]

Re: Installation of OpenMX Ver. 3.9 on Ubuntu 18.04.4 LTS on WSL on Windows 10 (64bit) ( No.1 )
Date: 2021/08/29 10:52
Name: T. Ozaki

Dear all,

The instruction on how to install OpenMX Ver. 3.9 on WSL on Windows 10 is summarized at

English Version: http://www.openmx-square.org/Installation_OpenMX_WSL_EN.pdf
Japanese Version: http://www.openmx-square.org/Installation_OpenMX_WSL.pdf

Since copying strings from PDF files may not work properly in some cases,
the PPT files are also shared at

English Version: http://www.openmx-square.org/Installation_OpenMX_WSL_EN.ppt
Japanese Version: http://www.openmx-square.org/Installation_OpenMX_WSL.ppt

Any comments to update the materials are welcome.

Best regards,

Taisuke Ozaki

P.S.
The proper choice of WSL1 or WSL2 seems to depend on PC environment.
See the last page of the material for the comparison.
メンテ

Page: [1]

Thread Title (must) Move the thread to the top
Your Name (must)
E-Mail (must)
URL
Password (used in modification of the submitted text)
Comment (must)

   Save Cookie