Page 1 of 1

compilation error (pointers in wave.f90) vasp 6.1.0

Posted: Thu Apr 09, 2020 9:20 pm
by eduardo_berrios
hi,

this is my first post in the forum :) i´m trying to compile vasp 6.1.0 using gnu compiler 8.3.1 with openmpi 4.0.1 and MKL libraries (btw I had vasp 5.4 installed in my machine compiled with gcc 4.8.5 and it worked all right).

I got an error while compiling wave.f90:

"Error: Assignment to contiguous pointer from non-contiguous target at (1)
wave.f90:521:20:

WDW%CPTWFP=> W%CPTWFP(:,:,:,2)
1"



I´m guessing the problem is the gnu compiler version because older versions (which I want to try to avoid) didn´t point out as an error this assignment.
Is there any way around it? It´d be great if it isn´t necessary to go back to a previous gnu compiler version.

Any help will be appreciate it,
cheers
Eduardo

Re: compilation error (pointers in wave.f90) vasp 6.1.0

Posted: Fri Apr 10, 2020 8:49 am
by merzuk.kaltak
This issue is an ongoing discussion as you can read here: https://www.mail-archive.com/gcc-bugs@g ... 54941.html

Please understand that we are hesitant to provide users with any fix as long as we are not sure that this is a compiler problem rather than a vasp bug.
If you follow the discussion on the aforementioned thread and check other websites and codes for this "bug",
you will see that, on the one hand, there are several codes that have the same problem.

On the other hand, there is already an "inofficial" patch for gfortran-8 at following website with no guarantee on our side: https://patches-gcc.linaro.org/patch/10355/.
It seems that in gfortran-9 the behavior concerning contiguous pointers pointing to non-contiguous targets has been changed again and follows the policy of other compilers, such as
intel, cray, IBM or NAG compilers.

In the meanwhile, please use an older version of gfortran (for instance 7 or 6 have been tested successfully by us), try the newest release of gfortran or use an other compiler.