compilation issue?

I am trying to update lammps and am having a bit of trouble. I went ahead and just started with a clean install, because doing a git pull wasn’t working.

I precompiled the packages in the lib.
I execute the following
make yes-standard
make package-update
then make openmpi

The last few lines of output from the make are given here below. There are pages and pages of similar output preceding this:

pair_yukawa_gpu.h:16:1: error: expected unqualified-id before âelseâ
In file included from style_pair.h:241:0,
from force.cpp:165:
pair_yukawa.h:16:1: error: expected unqualified-id before âelseâ
In file included from style_pair.h:242:0,
from force.cpp:165:
pair_yukawa_omp.h:20:1: error: expected unqualified-id before âelseâ
force.cpp:168:3: error: expected unqualified-id before âelseâ
force.cpp:169:3: error: expected unqualified-id before âreturnâ
force.cpp:170:1: error: expected declaration before â}â token
force.cpp: In member function âLAMMPS_NS::Pair* LAMMPS_NS::Force::new_pair(const char*, const char*, int&)â:
force.cpp:156:3: warning: control reaches end of non-void function [-Wreturn-type]
make[1]: *** [force.o] Error 1

Any ideas?

Hmmm ... I don't see this problem.
Is this with the most current version tarball?
The corrupted characters like âelseâ
are odd. Can anyone else verify a build
issue with the most current tarball? Maybe
Axel has an idea ...

Steve

Hmmm ... I don't see this problem.
Is this with the most current version tarball?
The corrupted characters like âelseâ
are odd. Can anyone else verify a build

they are not odd, they are a consequence
of cut-n-paste from a UTF-8 encoded native
language setting to a plain ASCII application.
basically all current linux distributions use NLS.
this can be avoided by using the C locale via:

export LC_ALL=C

issue with the most current tarball? Maybe
Axel has an idea ...

i think the issue is the unneeded
make package-update

if i remember correctly, the GPU package
doesn't handle this well, since it provides
files that require user packages. i would
try to do:
make no-gpu
make yes-gpu
and see if that fixes the issue.

the real error has to be earlier in the output
from what was shown.

axel.

See comments below.

Hmmm … I don’t see this problem.
Is this with the most current version tarball?
The corrupted characters like âelseâ
are odd. Can anyone else verify a build

they are not odd, they are a consequence
of cut-n-paste from a UTF-8 encoded native
language setting to a plain ASCII application.
basically all current linux distributions use NLS.
this can be avoided by using the C locale via:

export LC_ALL=C

Yes, this fixed the funny characters. I am logging in to my machine remotely using putty which caused this.

issue with the most current tarball? Maybe
Axel has an idea …

I just got the file with git before I started. So yes, it is the most current. Did a git pull too which said package is up to date.

i think the issue is the unneeded
make package-update

if i remember correctly, the GPU package
doesn’t handle this well, since it provides
files that require user packages. i would
try to do:
make no-gpu
make yes-gpu
and see if that fixes the issue.

Nope, doesn’t work. I tried this. I also tried

make no-all
make yes-standard
make no-kim

When I do a
make package-status
it shows that I am missing all kinds of files with in both cuda and gpu packages

Installed YES: package GPU
src/pair_lj_sdk_coul_long_gpu.cpp does not exist
src/pair_lj_sdk_gpu.cpp does not exist
src/pair_lj_sdk_coul_long_gpu.h does not exist
src/pair_lj_sdk_gpu.h does not exist

Installed YES: package USER-CUDA
src/pair_lj_sdk_coul_cut_cuda.cpp does not exist
src/pair_lj_sdk_coul_debye_cuda.cpp does not exist
src/pair_lj_sdk_coul_long_cuda.cpp does not exist
src/pair_lj_sdk_cuda.cpp does not exist
src/pair_lj_sdk_coul_cut_cuda.h does not exist
src/pair_lj_sdk_coul_debye_cuda.h does not exist
src/pair_lj_sdk_coul_long_cuda.h does not exist
src/pair_lj_sdk_cuda.h does not exist

making from this point now gives me a different error: (is that progress?)

verlet_cuda.cpp: In member function ‘void LAMMPS_NS::VerletCuda::test_atom(int, char*)’:
verlet_cuda.cpp:1075:145: warning: format ‘%i’ expects argument of type ‘int’, but argument 4 has type ‘LAMMPS_NS::bigint {aka long int}’ [-Wformat]
make[1]: *** [verlet_cuda.o] Error 1

the real error has to be earlier in the output
from what was shown.

There were so many errors that I am filling the terminal buffer. Is there a way to dump compilation output to a file? The obvious make foo > filename doesn’t seem to work. I should be able to increase the buffer size when I am on the actual computer at work, my remote terminal won’t let me.

export LC_ALL=C

Yes, this fixed the funny characters. I am logging in to my machine remotely
using putty which caused this.

yup. i have learned to hate NLS.
at least in science, computers should
speak plain 7-bit ASCII and english.
everything else creates a gazillion
of unexpected problems. i've been
through some crazy stuff myself.

I just got the file with git before I started. So yes, it is the most
current. Did a git pull too which said package is up to date.

try: git status
or: git diff

the up-to-date from git pull only means that you have
checked out the up-to-date repository. with the big
whitespace patch from a couple days ago, things
could get a little ticklish if you have local modifications.

Nope, doesn't work. I tried this. I also tried

make no-all
make yes-standard
make no-kim

When I do a
make package-status
it shows that I am missing all kinds of files with in both cuda and gpu
packages

Installed YES: package GPU
src/pair_lj_sdk_coul_long_gpu.cpp does not exist
src/pair_lj_sdk_gpu.cpp does not exist
src/pair_lj_sdk_coul_long_gpu.h does not exist
src/pair_lj_sdk_gpu.h does not exist

Installed YES: package USER-CUDA
src/pair_lj_sdk_coul_cut_cuda.cpp does not exist
src/pair_lj_sdk_coul_debye_cuda.cpp does not exist
src/pair_lj_sdk_coul_long_cuda.cpp does not exist
src/pair_lj_sdk_cuda.cpp does not exist
src/pair_lj_sdk_coul_cut_cuda.h does not exist
src/pair_lj_sdk_coul_debye_cuda.h does not exist
src/pair_lj_sdk_coul_long_cuda.h does not exist
src/pair_lj_sdk_cuda.h does not exist

this is fine. these are the problematic files that
will mess up things when you do a
make package-update
since they are dependent on a user package
(USER-GC-CMM). i've been able to fix this
issue for USER-OMP (which has components
for many optional packages) with some crazy
shell scripting, but i have not had the time to
apply this to those other packages.

making from this point now gives me a different error: (is that progress?)

verlet_cuda.cpp: In member function 'void
LAMMPS_NS::VerletCuda::test_atom(int, char*)':
verlet_cuda.cpp:1075:145: warning: format '%i' expects argument of type
'int', but argument 4 has type 'LAMMPS_NS::bigint {aka long int}' [-Wformat]
make[1]: *** [verlet_cuda.o] Error 1

this is just a warning. USER-CUDA could use a few little
tweaks. i have them fixed in LAMMPS-ICMS, btw, but
have not gotten around to feed it to christian.

nevertheless, there has to be something else.
just try compiling w/o USER-CUDA for now.

i personally never compile in GPU and USER-CUDA
at the same time and have separate settings for
them (since USER-CUDA requires run-time type
information, which results in a significant slowdown
for the rest of the code. compiling with -fno-rtti and
-fno-exceptions is highly recommended, if you need
to squeeze out every little bit of performance.).

the real error has to be earlier in the output
from what was shown.

There were so many errors that I am filling the terminal buffer. Is there a
way to dump compilation output to a file? The obvious make foo > filename
doesn't seem to work. I should be able to increase the buffer size when I am
on the actual computer at work, my remote terminal won't let me.

that redirects only the standard output. errors are sent to the standard error,
which is file descriptor 2 and not 1. in bash or (t)csh you can do

make foo >& mk.out

otherwise in bourne/korn shells:

make out > mk.out 2>&1

standard unix stuff...

HTH,
    axel.

See below. In summary make no-user-cuda failed.

I just got the file with git before I started. So yes, it is the most
current. Did a git pull too which said package is up to date.

try: git status
or: git diff

the up-to-date from git pull only means that you have
checked out the up-to-date repository. with the big
whitespace patch from a couple days ago, things
could get a little ticklish if you have local modifications.

Well, I started fresh with a new clone first (rather than just updating), so I assume I got the latest greatest w/o any modifications anywhere.

nevertheless, there has to be something else.
just try compiling w/o USER-CUDA for now.

Okay so I tried:

make no-user-cuda
Uninstalling package user-cuda

then when I
do make package-status

it says:
Installed YES: package USER-CUDA
src/atom_vec_angle_cuda.cpp does not exist
src/atom_vec_atomic_cuda.cpp does not exist
etc…

so that’s weird. It looks like it still thinks it should compile the package, but all the files are gone.

then when I make it dies because it can’t find cuda files.

mpic++ -O2 -funroll-loops -fstrict-aliasing -Wall -W -Wno-uninitialized -DLAMMPS_GZIP -I…/…/lib/reax -I…/…/lib/poems -I…/…/lib/meam -DFFT_FFTW -c force.cpp
In file included from style_pair.h:15:0,
from force.cpp:22:
pair_cg_cmm_coul_cut_cuda.h:33:34: fatal error: pair_cg_cmm_coul_cut.h: No such file or directory
compilation terminated.

i personally never compile in GPU and USER-CUDA
at the same time and have separate settings for
them (since USER-CUDA requires run-time type
information, which results in a significant slowdown
for the rest of the code. compiling with -fno-rtti and
-fno-exceptions is highly recommended, if you need
to squeeze out every little bit of performance.).

the real error has to be earlier in the output
from what was shown.

There were so many errors that I am filling the terminal buffer. Is there a
way to dump compilation output to a file? The obvious make foo > filename
doesn’t seem to work. I should be able to increase the buffer size when I am
on the actual computer at work, my remote terminal won’t let me.

that redirects only the standard output. errors are sent to the standard error,
which is file descriptor 2 and not 1. in bash or (t)csh you can do

make foo >& mk.out

otherwise in bourne/korn shells:

make out > mk.out 2>&1

standard unix stuff…

I figured there was a trick…

Ha ha, even make no-all leaves cuda installed. I think I am on to something.

Ha ha, even make no-all leaves cuda installed. I think I am on to something.

yes. this is one of the issues that i have fixed in LAMMPS-ICMS.
for now do:

cd src
rm *cuda.{cpp,h}

axel.

Success!!!

Why am I not seeing any of these issues with
the current version? I can include/exclude the
USER-CUDA package with no problems.

Steve