Compilation warning

بسم الله الرحمن الرحيم

Hello,

I compiled LAMMPS using intel compiler and I got a warning says

"
…/pair_list.cpp(52): warning #47: incompatible redefinition of macro “_noalias” (declared at line 196 of “…/lmptype.h”)
#define _noalias __restrict
^
"
the pair_list lines are ( from 193 to 201 ):

"
// declaration to lift aliasing restrictions

#if defined(__INTEL_COMPILER)
#define _noalias restrict ( this is the line 196 )
#elif defined(GNUC)
#define _noalias __restrict
#else
#define _noalias
#endif
"

is there any mistake in this line, like restrict must have a “__” before it ?

Thanks

بسم الله الرحمن الرحيم

Hello,

I compiled LAMMPS using intel compiler and I got a warning says

"
../pair_list.cpp(52): warning #47: incompatible redefinition of macro
"_noalias" (declared at line 196 of "../lmptype.h")
  #define _noalias __restrict
             ^
"
the pair_list lines are ( from 193 to 201 ):

"
// declaration to lift aliasing restrictions

#if defined(__INTEL_COMPILER)
#define _noalias restrict ( this is the line 196 )
#elif defined(__GNUC__)
#define _noalias __restrict
#else
#define _noalias
#endif
"

is there any mistake in this line, like restrict must have a "__" before it

no. the mistake is in your compiler flags.
as has been explained *many* times on this mailing list: when using
the intel compiler you *must* use the -restrict flag.

axel.

بسم الله الرحمن الرحيم

Hello,

Thanks for your replay.

I used one of the make file that included in LAMMPS which is intelmpi with a change in it, and the restrict flag appear in the make file.

I attached the file to you

also I got this warning

"
…/manifold_gaussian_bump.cpp(371): warning #268: the format string ends before this argument
gg, nn[0], nn[1], nn[2] );
^
"

Thanks

Makefile.nbiophysics (3.52 KB)

بسم الله الرحمن الرحيم

Hello,

Thanks for your replay.

I used one of the make file that included in LAMMPS which is intelmpi with a
change in it, and the restrict flag appear in the make file.

which version of LAMMPS is this with?
how did you obtain/download it?

axel.

بسم الله الرحمن الرحيم

Hello,

the latest version 11Aug17.

i downloaded it from the LAMMPS website ( as a tarball ).

Thanks

بسم الله الرحمن الرحيم

Hello,

the latest version 11Aug17.

FYI, this is the latest *stable* version. the *latest* version is 22 Sep 2017.

i downloaded it from the LAMMPS website ( as a tarball ).

ok. i'll have to have a closer look.

axel.

بسم الله الرحمن الرحيم

بسم الله الرحمن الرحيم

Hello,

Mr. Kohlmeyer i am sorry i found the reason of this warning ( noalise warning ).

the reason is that i added an external package to lammps which is written to fit the 10Aug15 version of lammps and this package edits the file pair_list and return it to the old plus and it contains these lines

"
#if defined(GNUC)
#define _noalias __restrict
#else
#define _noalias
#endif
"

as i think, this is the reason.

i will reedit this file to fit the new version of lammps

but the second warning which is

"
…/manifold_gaussian_bump.cpp(371): warning #268: the format string ends before this argument
gg, nn[0], nn[1], nn[2] );
^
"

still appearing.

i am sorry again and thanks

بسم الله الرحمن الرحيم

Hello,

[...]

but the second warning which is

"
../manifold_gaussian_bump.cpp(371): warning #268: the format string ends
before this argument
               gg, nn[0], nn[1], nn[2] );
                              ^
"

still appearing.

unless you are planning to do development in the USER-MANIFOLD
package, you should not worry about it.
it is a bug, but not a critical one. it only affects function
generating test output for developers.

axel.

بسم الله الرحمن الرحيم

Thanks a lot

...

>
> but the second warning which is
>
> "
> ../manifold_gaussian_bump.cpp(371): warning #268: the format string
ends
> before this argument
> gg, nn[0], nn[1], nn[2] );
> ^
> "
>
> still appearing.

unless you are planning to do development in the USER-MANIFOLD
package, you should not worry about it.
it is a bug, but not a critical one. it only affects function
generating test output for developers.

axel.

Indeed. FYI, it is fixed in later versions but it is pretty much harmless.
If you are in fact using USER-MANIFOLD you might want to update to the
latest version because there were some issues with the Gaussian bump
manifold that got fixed in later versions. Otherwise there's no real harm.

...

...

>
> but the second warning which is
>
> "
> ../manifold_gaussian_bump.cpp(371): warning #268: the format string
> ends
> before this argument
> gg, nn[0], nn[1], nn[2] );
> ^
> "
>
> still appearing.

unless you are planning to do development in the USER-MANIFOLD
package, you should not worry about it.
it is a bug, but not a critical one. it only affects function
generating test output for developers.

axel.

Indeed. FYI, it is fixed in later versions but it is pretty much harmless.

FYI, this one is not (yet) fixed:
https://github.com/akohlmey/lammps/commit/836a6d292c10a4c1d8a77b3586d2ebeb2858cf27

axel.

Me and my big mouth. I apparently fixed it locally but never propagated it upstream. The function was never called anywhere anyway so it’s mostly a change to get rid of a compiler warning, but still, thanks for cleaning up.

بسم الله الرحمن الرحيم

Hello,

Thanks for your replay.

i downloaded the latest version which is 22Spe17 and the issue was not fixed in this version.

Thanks