Problem using the newly introduced KPOINTS_ OPT file.

Queries about input and output files, running specific calculations, etc.


Moderators: Global Moderator, Moderator

Post Reply
Message
Author
bikash.patra
Newbie
Newbie
Posts: 10
Joined: Thu Jun 23, 2022 6:02 am

Problem using the newly introduced KPOINTS_ OPT file.

#1 Post by bikash.patra » Tue Oct 11, 2022 6:43 pm

Dear experts,

I am trying to calculate the band structure using SCAN metaGGA functional
using the KPOINTS_OPT file. I took Si as an example. Although, It ran
successfully but no PROCAR_OPT file was written as an output file as described
here -
wiki/index.php/KPOINTS_OPT.
I have attached all the input and output files.

with regards,
Bikash Patra,
TIFR, Mumbai
You do not have the required permissions to view the files attached to this post.

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#2 Post by fabien_tran1 » Fri Oct 14, 2022 9:50 pm

Hi,

There is indeed a bug in the code (the use of an array that is not allocated) that is active when KPOINTS_OPT is considered. Depending on the compiler, the bug may show up or not. It may be the reason why PROCAR_OPT is not created. We will try to fix the bug as soon as possible and let you know. Thanks for reporting this problem.

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#3 Post by fabien_tran1 » Mon Oct 17, 2022 9:12 pm

In the file sphpro.F, replace (at lines 1639 and 1640)

IF (PRESENT(PHAS_OUT)) PHAS_OUT = PHAS
IF ((LORBIT==12.OR.LORBIT==13) .AND. (LFINAL .OR. PRESENT(PHAS_OUT))) DEALLOCATE(PHAS)

by

IF (PRESENT(PHAS_OUT).AND.ALLOCATED(PHAS)) PHAS_OUT = PHAS
IF (ALLOCATED(PHAS)) DEALLOCATE(PHAS)

and recompile. Please, tell us if this solves the problem.

bikash.patra
Newbie
Newbie
Posts: 10
Joined: Thu Jun 23, 2022 6:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#4 Post by bikash.patra » Tue Oct 18, 2022 5:49 am

I changed the file sphpro.F according to your instruction and recompiled it.
But, still, it is not writing the PROCAR_OPT file.

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#5 Post by fabien_tran1 » Tue Oct 18, 2022 6:51 am

Have you really used the newly compiled executable? Is there the same problem with LORBIT=10 or 12?

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#6 Post by fabien_tran1 » Tue Oct 18, 2022 11:13 am

If the problem persists, then you could give us more details about the compiler and the way you are running the job (e.g., via a script for a queuing system).

bikash.patra
Newbie
Newbie
Posts: 10
Joined: Thu Jun 23, 2022 6:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#7 Post by bikash.patra » Wed Oct 19, 2022 1:15 pm

Yes, I used the newly compiled executable. I also checked with
LORBIT=10 and 12, but it's not working. I used intel oneapi to
compile the package. My job script which I use to
submit the job in a queue system is the following-
------------------------------------------------------------------------------------
#/bin/sh
#PBS -N si
#PBS -o mpi-out
#PBS -e mpi-error
#PBS -l select=1:ncpus=32:mem=120gb
#PBS -q large
cd $PBS_O_WORKDIR
source /home/apps/intel-oneapi/setvars.sh
export PATH=$PATH:/home/bikash.patra/code/vasp632/vasp.6.3.2/bin
#echo -n "Job $INPUT began \c"
#date
mpirun -np 32 vasp_std > out1
#echo -n "Job $INPUT ended \c"
##date
--------------------------------------------------------------------------------------

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#8 Post by fabien_tran1 » Wed Oct 19, 2022 1:27 pm

If you can do it, execute
mpirun -np 1 /home/bikash.patra/code/vasp632/vasp.6.3.2/bin/vasp_std > out1
on the command line. Is PROCAR_OPT still not generated?

bikash.patra
Newbie
Newbie
Posts: 10
Joined: Thu Jun 23, 2022 6:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#9 Post by bikash.patra » Wed Oct 19, 2022 1:59 pm

I tried from the command line. Still, it is not generated.

fabien_tran1
Global Moderator
Global Moderator
Posts: 419
Joined: Mon Sep 13, 2021 11:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#10 Post by fabien_tran1 » Wed Oct 19, 2022 2:41 pm

By looking again at the source code, another bug has been found. In the file linear_response.F there are blocks delimited with "#ifdef VASP_HDF5" and "#endif", and one of them was not ok. What is in between lines 1804 and 1827 should be replaced by what is below:

Code: Select all

#ifdef VASP_HDF5
   CALL VH5_WRITE_DOS(IH5OUTFILEID, WDES_INTER, KPOINTS_INTER, DOS, DOSI, DOSPAR, EFERMI, &
                      T_INFO%NIONP, -1,SUBGROUP="electron_dos_kpoints_opt")
   CALL VH5_WRITE_EIGENVAL(IH5OUTFILEID, WDES_INTER, W_INTER, KPOINTS_INTER, &
                           SUBGROUP="electron_eigenvalues_kpoints_opt")
#endif

   ! Write projections
   IF (JOBPAR/=0 .OR. IO%LORBIT>=10) THEN
#ifdef VASP_HDF5
     IF (IO%LORBIT==11.OR.IO%LORBIT==12) THEN
       CALL VH5_WRITE_PROJECTORS(IH5OUTFILEID, T_INFO, WDES_INTER, W_INTER, IO%LORBIT, LPAR, PAR_INTER, LMCHAR, PHAS_INTER, &
                                 SUBGROUP="projectors_kpoints_opt")
     ELSE
       CALL VH5_WRITE_PROJECTORS(IH5OUTFILEID, T_INFO, WDES_INTER, W_INTER, IO%LORBIT, LPAR, PAR_INTER, LCHAR, PHAS_INTER, &
                                 SUBGROUP="projectors_kpoints_opt")
     ENDIF
#endif
     IF (IO%IU6>=0) THEN
       CALL XML_PROCAR(PAR, W_INTER%CELTOT, W_INTER%FERTOT, WDES_INTER%NB_TOT, WDES_INTER%NKPTS, LPAR,&
                     T_INFO%NIONP, WDES_INTER%NCDIJ, TAG="projected_kpoints_opt")
       OPEN(UNIT=99,FILE='PROCAR_OPT',STATUS='UNKNOWN')
       CALL WRITE_PROCAR(99,W_INTER,WDES_INTER,IO%LORBIT,LPAR,LMDIMP,PAR_INTER,PHAS_INTER,T_INFO,KPOINTS%EMIN,KPOINTS%EMAX)
       CLOSE(99)
     ENDIF
   ENDIF
Make this modification and recompile. Hopefully this should solve the problem. Please, tell us if this is the case.

I could not reproduce the problem because I compiled VASP with the option -DVASP_HDF5 (see wiki/index.php/Precompiler_options#-DVASP_HDF5), which is not the case for you it seems. Thanks again for having reported the problem.

bikash.patra
Newbie
Newbie
Posts: 10
Joined: Thu Jun 23, 2022 6:02 am

Re: Problem using the newly introduced KPOINTS_ OPT file.

#11 Post by bikash.patra » Wed Oct 19, 2022 3:37 pm

Yes, this solves the problem.
You are right. I didn't compile vasp with the HDF5 option.

Post Reply