Page 1 of 1

compilation of VASP5

Posted: Wed Aug 30, 2023 2:45 am
by IBRAHIM
Dear VASP admin,

During compilation of VASP5.4.4.pl2, we noticed this warning:
davidson.F(685): warning #15552: loop was not vectorized with "simd"

And the compilation complete without any error.

Is our compilation OK?

Attached is the last part of the compilation report.

Thanks

Re: compilation of VASP5

Posted: Wed Aug 30, 2023 8:10 am
by ferenc_karsai
Around that line there is the command "!DIR$ SIMD" to vectorize for SIMD capable processors.
Either you don't have a SIMD capable processor or if you have one it's not recognized correctly.

That part is anyway completely changed in the latest VASP version (SIMD part is completely removed and replaced by GEMM calls), so I would strongly advise to upgrade to the latest version.

Re: compilation of VASP5

Posted: Wed Aug 30, 2023 8:21 am
by IBRAHIM
What is the effect on the compiled version?

The compilation finished without error.


Thanks

Re: compilation of VASP5

Posted: Wed Aug 30, 2023 10:12 am
by ferenc_karsai
If you don't have simd then nothing. Otherwise if simd is not used then that part is not simd vectorized, hence slower in execution time.

Re: compilation of VASP5

Posted: Wed Aug 30, 2023 10:17 am
by IBRAHIM
So, it affects only on the execution time?
and no effect on the accuracy of the compiled version?

Thanks

Re: compilation of VASP5

Posted: Wed Aug 30, 2023 11:04 am
by ferenc_karsai
No effect, but if you are unsure then run the testsuite.

Re: compilation of VASP5

Posted: Fri Sep 22, 2023 12:00 am
by IBRAHIM
Hi,

The admin of our server recommended the following changes in davidson.F:

!DIR$ SIMD

to:

!$OMP SIMD


and the compilation process finished without warning. Is it OK? Please find the report attached.

Thanks

Re: compilation of VASP5

Posted: Thu Oct 05, 2023 9:46 am
by IBRAHIM
Dear VASP admin,

Could you please check if the compilation is OK? including the changes in davidson.F:

!DIR$ SIMD

to:

!$OMP SIMD

Thanks

Re: compilation of VASP5

Posted: Thu Oct 05, 2023 12:11 pm
by andreas.singraber
Hello!

Yes, the compilation is ok, the VASP binaries were successfully compiled. This was also the case for your initial build. The compiler warning was only notifying you that the explicit vectorization directive !DIR$ SIMD did not trigger a vectorization of the next loop. Meaning that this particular loop may not be executed in an optimal manner, i.e., without benefiting from SIMD vectorization. There can be many reasons why the compiler decided not to vectorize this loop, it may even depend on your compiler version and hardware you are using. Maybe it even did, but not because of the directive but in some other compilation stage. Whether this loop is ultimately vectorized one may find out with the qopt-report flag of current Intel compilers (I am unsure whether Intel 2018 which you are using already had that flag). However, even if this one loop may be slower this does not affect any other portion of the code or the accuracy of results, you still got valid VASP binaries. Before digging too deep into compiler diagnostics I would suggest to try both versions you have compiled now and only investigate further if you have the impression that VASP is very slow compared to other builds (e.g. with GNU compiler or older builds).

Regarding your second build with the updated directive: I suspect that the warning is now gone because you did not compile with OpenMP support, hence the !$OMP SIMD directive was completely ignored and has no effect.

All the best,
Andreas Singraber