Page 1 of 1
Problem using the newly introduced KPOINTS_ OPT file.
Posted: Tue Oct 11, 2022 6:43 pm
by bikash.patra
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
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Fri Oct 14, 2022 9:50 pm
by fabien_tran1
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.
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Mon Oct 17, 2022 9:12 pm
by fabien_tran1
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.
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Tue Oct 18, 2022 5:49 am
by bikash.patra
I changed the file sphpro.F according to your instruction and recompiled it.
But, still, it is not writing the PROCAR_OPT file.
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Tue Oct 18, 2022 6:51 am
by fabien_tran1
Have you really used the newly compiled executable? Is there the same problem with LORBIT=10 or 12?
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Tue Oct 18, 2022 11:13 am
by fabien_tran1
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).
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Wed Oct 19, 2022 1:15 pm
by bikash.patra
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
--------------------------------------------------------------------------------------
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Wed Oct 19, 2022 1:27 pm
by fabien_tran1
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?
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Wed Oct 19, 2022 1:59 pm
by bikash.patra
I tried from the command line. Still, it is not generated.
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Wed Oct 19, 2022 2:41 pm
by fabien_tran1
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.
Re: Problem using the newly introduced KPOINTS_ OPT file.
Posted: Wed Oct 19, 2022 3:37 pm
by bikash.patra
Yes, this solves the problem.
You are right. I didn't compile vasp with the HDF5 option.