ccao / wannchi

Calculates susceptibility using wannier functions. RPA and self-energy correction is currently under internal tests.
2 stars 3 forks source link

Compilation and execution problem in wannchi program #1

Open 214786214 opened 1 year ago

214786214 commented 1 year ago

Respected sir, I was looking to learn the calculating lindhard susceptibility and found this code on github. After looking into program, i tried to install the program using requisite libraries. After running "make" command in modules folder. It ended with "mod.a is up to date" Next, i tried the same in src directory which also ended with the same without creating *.o files like it happens in modules directory. I did not get any error while installation. Afer installation, when i execute wannchi.f90 program keeping wannchi.inp and wannier90_hr.dat files in the same folder. It is not compiling and returning with the error as, f951: Fatal Error: Reading module ‘constants’ at line 1 column 2: Unexpected EOF compilation terminated

Kindly look into this issue and help me out to understand the procedure as no template is provided for sequential execution of program.

Thanks & Regards, Vineet Kumar Sharma

ccao commented 1 year ago

Would you please proved your make.sys file, and complete output after you issue make command in both directories?

214786214 commented 1 year ago

Respected sir, This is make.sys file,

.SUFFIXES : .SUFFIXES : .o .f90

.f90.o: $(F90) $(F90FLAGS) -fpp -c -I$(MKLINCLUDE) -I../modules $<

F90=mpiifort F90FLAGS=-D__MPI -O3 -msse3 -axSSE4.2

MKLROOT=/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64 MKLINCLUDE=$(MKLROOT)/include MKLLIBS=-L$(MKLROOT)/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core LAPACK95LIBS=$(MKLROOT)/lib/intel64/libmkl_lapack95_lp64.a

AR = ar ARFLAGS = ruv

RANLIB = ranlib

This is output while executing "make" command in modules directory: mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules constants.f90 mpiifort -D__MPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules banddata.f90 banddata.f90(18): remark #15009: banddata_mp_initband has been targeted for automatic cpu dispatch mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules chidata.f90 mpiifort -D__MPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules para.f90 mpiifort -D__MPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules wanndata.f90 ar ruv mod.a constants.o banddata.o chidata.o para.o wanndata.o ar: u' modifier ignored sinceD' is the default (see `U') ar: creating mod.a a - constants.o a - banddata.o a - chidata.o a - para.o a - wanndata.o ranlib mod.a

This is output of "make" command executed in src directory: make: '../modules/mod.a' is up to date.

Thanks & Regards, Vineet Kumar Sharma

ccao commented 1 year ago

Under src directory, try "make wannchi" instead "make". There are some problems with the Makefile in src directory at the moment.

214786214 commented 1 year ago

Thank you very much sir for your valuable suggestions. This is the output of "make wannchi" command in src direcory: mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules input.f90 input.f90(14): remark #15009: input_mp_readinput has been targeted for automatic cpu dispatch mpiifort -D__MPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules flib.f90 mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules interpolate_bands.f90 interpolate_bands.f90(3): remark #15009: interpolatebands has been targeted for automatic cpu dispatch mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules calc_occ.f90 mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules compute_chi.f90 mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -c -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules output_chi.f90 mpiifort -DMPI -O3 -msse3 -axSSE4.2 -fpp -o wannchi.x wannchi.f90 input.o flib.o interpolate_bands.o calc_occ.o compute_chi.o output_chi.o ../modules/mod.a -I/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/include -I../modules -I. /home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64/libmkl_lapack95_lp64.a -L/home/vineet/intel_compilers/mkl/2021.3.0/lib/intel64 -lmkl_intel_lp64 -lmkl_sequential -lmkl_core

These are files in src directory after compilation: calc_occ.f90 compute_chi.f90 f95_precision.mod flib.o input.mod interpolate_bands.f90 lapack95.mod output_chi.f90 wannchi.f90 calc_occ.o compute_chi.o flib.f90 input.f90 input.o interpolate_bands.o Makefile output_chi.o wannchi.x

Now, I got wannchi.x an executable. Kindly guide me for further step or Shall i try wannchi.inp and wannier90_hr.dat file? Execute this executable to extract the output.

Please help me for next step.

Thanks & Regards, Vineet Kumar Sharma

ccao commented 1 year ago

Yes, you need to use mpirun to invoke wannchi.x to read the input file ( wannchi.inp & wannier90_hr.dat ) and generate the output data.

214786214 commented 1 year ago

Thank you very much sir, Is it ok to try the command as? mpirun -np (no. of processors) /path of executable;wannchi.x

I will try this and update to sir.

Thanks & Regards, Vineet Kumar Sharma

214786214 commented 1 year ago

Respected sir, I have tried with example file given and it generate output like as

WannChi running on 1 nodes...

Reading file wannier90_hr.dat

Dimensions:

 # of orbitals:          10
 # of real-space grid:         845

Done.

Starting interpolation of the original states to

20 x 20 x 20 K-mesh

Fermi level : 7.43565158000000

Done...

After this, i got wannchi.dat file which contains, 0.20000000 0.20000000 0.20000000 3.1452294504831682 0.0000000011040970

It would be really helpful if sir can advice me to understand the meaning of each column.

Thanks & Regards, Vineet Kumar Sharma

214786214 commented 1 year ago

Respected sir, I am getting the output at single Q-point. Kindly help me to understand the output file generated as wannchi.dat. How can i generate output at each Q-point so that it can be easy to track with band structure?

Kindly do the needful.

Thanks & Regards, Vineet Kumar Sharma

ccao commented 1 year ago

Good to see you have generated correct output. In your output,

0.20000000 0.20000000 0.20000000 3.1452294504831682 0.0000000011040970

The first 3 numbers corresponds to the q-vector you are calculating (in direct unit). Followed by the real part and imaginary part of the susceptibility at this specific q.

For a band-structure like calculation, you have to invoke line-mode, which is something like

4 24 0.0 0.0 0.0 0.5 0.0 0.0 0.5 0.5 0.0 0.0 0.0 0.0

after the mode line (line 7). In this case, mode has to be specified to 1 . The first line in this segment specifies the number of high symmetry K-points (4 in this case), and the interpolation between each K-points (24 here, which has to be able to divide nkx / nky / nkz so that the q-points are commensurate to the K-mesh). It is followed by the high symmetry K-points, in this case Gamma-X-M-Gamma for a square lattice.

214786214 commented 1 year ago

Thank you very much sir for your kind advice. I will try as per given suggestions by sir and update.

Thanks & Regards, Vineet Kumar Sharma

214786214 commented 1 year ago

Respected sir, I am getting nagative and positive values of Chi values alternatively. I have tried at 0K and 100K to see the variation. This is output at 0K; 0.00000000 0.00000000 0.00000000 -0.0000000000000000 -0.0000000000000000 0.00000000 0.00781250 0.00000000 -1.8764651696400563 -0.0003309670058663 0.00000000 0.01562500 0.00000000 0.9558779120660917 -0.0000000075003275 0.00000000 0.02343750 0.00000000 -1.8572368206115433 -0.0002939558215544 0.00000000 0.03125000 0.00000000 0.9675340726576731 -0.0000198705959845 0.00000000 0.03906250 0.00000000 -1.8081100687879688 -0.0003268315610055 0.00000000 0.04687500 0.00000000 0.9932088152843461 0.0000000239096207 0.00000000 0.05468750 0.00000000 -1.7448429996737187 -0.0002732997638025 0.00000000 0.06250000 0.00000000 1.0126851144183351 0.0000052890659789 0.00000000 0.07031250 0.00000000 -1.6625457070151204 -0.0002827400023259

This is the output at 100 K; 0.00000000 0.00000000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.00250000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.00500000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.00750000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.01000000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.01250000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.01500000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.01750000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.02000000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.02250000 0.00000000 -0.0000000000000000 0.0000000000000000 0.00000000 0.02500000 0.00000000 -114.7768698943157091 -0.0036532806408313 0.00000000 0.02750000 0.00000000 -114.7768698943157091 -0.0036532806408313 0.00000000 0.03000000 0.00000000 -114.7768698943157091 -0.0036532806408313 0.00000000 0.03250000 0.00000000 -114.7768698943157091 -0.0036532806408313 0.00000000 0.03500000 0.00000000 -114.7768698943157091 -0.0036532806408313

My doubts are: 1) Do i need to multiply with negative sign to the outputs to worry about only magnitude? 2) How to get either positive or negative values? 3) Do I need to generate output at 0K alone or vary the temperature values? 4) I tried with different q-grid, the values are varying. What would be the minimum q-grid set to get conversed output?

Kindly help me to clarify my doubts.

Thanks & Regards, Vineet Kumar Sharma

214786214 commented 1 year ago

Respected sir, Please give your valuable suggestion to my queries.

Thanks & Regards, Vineet Kumar Sharma