Compiling VASP with bdrpro.F

Bader charge density analysis

Moderator: moderators

Post Reply
forsdan
Posts: 15
Joined: Sat Jun 27, 2009 5:49 pm

Compiling VASP with bdrpro.F

Post by forsdan »

Dear Sir,

I'm trying to compile VASP with bdrpro.F added, but I have encountered a problem:

During the linking I end up with an error message:

bdrpro.o: In function `mbdrpro_mp_bdrpro_':
bdrpro.f90:(.text+0x142f): undefined reference to `setwav__'

I searched for the "CALL SETWAV" in all *.F files and I found that only in bdrpro.F "CALL SETWAV_()" is used while in the other *.F-files "CALL SETWAV()" is used. So I removed the underscore in bdrpro.F, but I then end up with another error

./preprocess <bdrpro.F | /usr/bin/cpp -P -C -traditional >bdrpro.f90 -DMPI -DHOST=\"Beda_BaderDOS\" -DIFC -Dkind8 -DCACHE_SIZE=4000 -DPGF90 -Davoidalloc -DNGZhalf -DMPI_BLOCK=8000
mpif90 -FR -lowercase -assume byterecl -O1 -heap-arrays -c bdrpro.f90
bdrpro.f90(237): error #6633: The type of the actual argument differs from the type of the dummy argument. [NB]
CALL SETWAV(W,W1,NB,NK,ISP)
-----------------------^

which I don't know how to handle. Is there way around this issue? I have used intel 11.1.046 and openmpi1.4 for the compilation.

As a side note I had some issues with the subroutine dpbc_car in bdrpro.F, where the logical variable "done" was replaced with 1._q in the f90-file due to the preprocessor. However, it was solved if I changed done to another name, so I guess it was just some issue with the preprocessor.

Best regards,
/Dan
andyfan
Posts: 24
Joined: Tue Dec 08, 2009 6:00 pm

Re: Compiling VASP with bdrpro.F

Post by andyfan »

Hi,
I also have some error messages during the compling process. The error messages are as follows,

PGF90-S-0043-Illegal attempt to redefine symbol lattice (bdrpro.f: 897)
PGF90-S-0044-Multiple declaration for symbol lattice (bdrpro.f: 897)
0 inform, 0 warnings, 2 severes, 0 fatal for read_charge_chgcar
0 inform, 0 warnings, 2 severes, 0 fatal for dpbc_car
0 inform, 0 warnings, 2 severes, 0 fatal for bezero
PGF90/any Linux/x86-64 6.1-6: compilation completed with severe errors
make: *** [bdrpro.o] Error 2

I used pgi6.0 and mpich-1.27 compiler. My vasp version is 4.6.36.

Can anybody give me some suggestions? Thanks.
graeme
Site Admin
Posts: 2256
Joined: Tue Apr 26, 2005 4:25 am
Contact:

Re: Compiling VASP with bdrpro.F

Post by graeme »

We'll have to make a few changes to this new code so that it is compatible with the different versions of vasp. Give us another week to get this sorted out.
forsdan
Posts: 15
Joined: Sat Jun 27, 2009 5:49 pm

Re: Compiling VASP with bdrpro.F

Post by forsdan »

Dear Sir,

Thank you very much for your answer. I found that you have updated the files and procedure so I tried once again. However, I encountered an obstacle in the use of the perl-script mkbdrpro.pl, because when I use it I get an error

Can't locate Vasp.pm in @INC (@INC contains: *list of current library and perl libaries* ) at ./mkbdrpro.pl line 6.
BEGIN failed--compilation aborted at ./mkbdrpro.pl line 6.

However, if I comment out the line "use Vasp" I can create the bdrpro.F file. With the changes to the main.F file and the makefile I can then compile VASP5.2.2 without any warnings or errors.

I then ran VASP without ICHAIN to create a CHGCAR file. Thereafter I created AtIndex.dat with "./bader -p atom_index CHGCAR" (v0.26b was the latest I could find on the homepage) and renamed the file to BDRCAR. I added ICHAIN=5 and LORBIT = 2, RWIGS = 1 (I only have one species) and NPAR = 1 (since I run in parallel). The NGX(Y,Z) is also half of the NGX(Y,Z)F grid since I'm using PREC = Accurate. However, the program now failed during the final writing part with the error

forrtl: severe (64): input conversion error, unit 100, file /beda/users/home/forsdan/DOS_PROJECT/FeVC_Fe_Bulk_DOS/BDRCAR

I also tried with LORBIT = 12 and the default NPAR value, which also fails. While if I comment ICHAIN out, I get my site-projected DOS as expected in both cases.

So my question is if the error could be related to the commenting out of "use Vasp" in the mkbdrpro.pl file (what does "use Vasp" actually do here?), or if it's a compilation or usage issue.

Best regards,
/Dan
forsdan
Posts: 15
Joined: Sat Jun 27, 2009 5:49 pm

Re: Compiling VASP with bdrpro.F

Post by forsdan »

Update:

If I remove the line with the atomic symbols in the BDRCAR, the issue goes away and the DOS projection in the Bader volumes is completed. I do however obtain some very strange DOS results where the number of states are completely different for atoms in the same enviroment, but I will look into it in more details and create a new thread if I can't resolve it.

Nevertheless, it would be interesting to know whether or not commenting of "use Vasp" change any functionality or if it's just connected to the path of the library.

Best regards,
/Dan
Wenjie
Posts: 32
Joined: Sat Mar 10, 2007 7:11 pm

Re: Compiling VASP with bdrpro.F

Post by Wenjie »

I've updated the mkbdrpro.pl script and remove the line that use Vasp.pm. This change will not affect the creation of bdrpro.F.

For the problem with BDRCAR, I think it is because the subroutine only reads vasp4 type CHGCAR. I've updated the bdr_changes file so that can read in vasp5 type CHGCAR.

The latest information about the code can be found in: http://theory.cm.utexas.edu/vtsttools/dos/
Post Reply