Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

LAMMPS compilation error when including AWSEM src files #21

Open
rlindsa2 opened this issue Mar 2, 2023 · 6 comments
Open

LAMMPS compilation error when including AWSEM src files #21

rlindsa2 opened this issue Mar 2, 2023 · 6 comments

Comments

@rlindsa2
Copy link

rlindsa2 commented Mar 2, 2023

Hello,

I am attempting to compile LAMMPS with AWSEM-MD by following the instructions on the 'Getting Started' Github page (https://github.com/adavtyan/awsemmd/wiki) and am getting a compilation error involving some of the AWESEM source files.
Part of the error output is below; the primary error is "error: 'int LAMMPS_NS::NeighRequest::id' is protected within this context":

./compute_property_local.cpp
g++ -g -O3 -std=c++11 -DLAMMPS_GZIP -DLAMMPS_MEMALIGN=64 -I../STUBS -c ../fix_backbone.cpp
../fix_backbone.cpp: In member function 'virtual void LAMMPS_NS::FixBackbone::init()':
../fix_backbone.cpp:1618:33: error: 'int LAMMPS_NS::NeighRequest::id' is protected within this context
1618 | neighbor->requests[irequest]->id = 1;
| ^~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:35:7: note: declared protected here
35 | int id; // ID of request as stored by requestor
| ^~
../fix_backbone.cpp:1619:33: error: 'int LAMMPS_NS::NeighRequest::pair' is protected within this context
1619 | neighbor->requests[irequest]->pair = 0;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:46:7: note: declared protected here
46 | int pair; // pair is set by default
| ^~~~
../fix_backbone.cpp:1620:33: error: 'int LAMMPS_NS::NeighRequest::fix' is protected within this context
1620 | neighbor->requests[irequest]->fix = 1;
| ^~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:47:7: note: declared protected here
47 | int fix;
| ^~~
../fix_backbone.cpp:1621:33: error: 'int LAMMPS_NS::NeighRequest::half' is protected within this context
1621 | neighbor->requests[irequest]->half = 1;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:55:7: note: declared protected here
55 | int half; // half neigh list (set by default)
| ^~~~
../fix_backbone.cpp:1622:33: error: 'int LAMMPS_NS::NeighRequest::full' is protected within this context
1622 | neighbor->requests[irequest]->full = 0;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:56:7: note: declared protected here
56 | int full; // full neigh list
| ^~~~
../fix_backbone.cpp:1626:38: error: 'int LAMMPS_NS::NeighRequest::id' is protected within this context
1626 | neighbor->requests[irequest_full]->id = 2;
| ^~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:35:7: note: declared protected here
35 | int id; // ID of request as stored by requestor
| ^~
../fix_backbone.cpp:1627:38: error: 'int LAMMPS_NS::NeighRequest::pair' is protected within this context
1627 | neighbor->requests[irequest_full]->pair = 0;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:46:7: note: declared protected here
46 | int pair; // pair is set by default
| ^~~~
../fix_backbone.cpp:1628:38: error: 'int LAMMPS_NS::NeighRequest::fix' is protected within this context
1628 | neighbor->requests[irequest_full]->fix = 1;
| ^~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:47:7: note: declared protected here
47 | int fix;
| ^~~
../fix_backbone.cpp:1629:38: error: 'int LAMMPS_NS::NeighRequest::half' is protected within this context
1629 | neighbor->requests[irequest_full]->half = 0;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:55:7: note: declared protected here
55 | int half; // half neigh list (set by default)
| ^~~~
../fix_backbone.cpp:1630:38: error: 'int LAMMPS_NS::NeighRequest::full' is protected within this context
1630 | neighbor->requests[irequest_full]->full = 1;
| ^~~~
In file included from ../fix_backbone.cpp:25:
../neigh_request.h:56:7: note: declared protected here
56 | int full; // full neigh list
| ^~~~
../fix_backbone.cpp: In function 'double atan2(double, double)':
../fix_backbone.cpp:1732:17: warning: converting to non-pointer type 'double' from NULL [-Wconversion-null]
1732 | else return NULL;
| ^~~~
../fix_backbone.cpp: In member function 'double LAMMPS_NS::FixBackbone::compute_native_ixn(double, int, int, int, int, double, double)':
../fix_backbone.cpp:5050:1: warning: control reaches end of non-void function [-Wreturn-type]
5050 | }
| ^
make[1]: *** [Makefile:114: fix_backbone.o] Error 1
make[1]: Leaving directory '/mnt/home/jlindsay/programs/LAMMPS/lammps-23Jun2022/src/Obj_serial'
make: *** [Makefile:393: serial] Error 2

Thanks,
Justin Lindsay

@drelatgithub
Copy link

drelatgithub commented Mar 2, 2023

Seems there were interface changes following, for example, lammps/lammps#3159, where LAMMPS_NS::NeighRequest::id was changed from public to protected. I guess the codes for setting neighbor requests should be changed from

neighbor->requests[irequest]->id = 1;

to something like

neighbor->requests[irequest]->set_id(1);

@rlindsa2
Copy link
Author

rlindsa2 commented Mar 2, 2023

Is this something that could be resolved using a previous version of LAMMPS, and which version would you recommend?

Thank you

@adavtyan
Copy link
Owner

adavtyan commented Mar 2, 2023 via email

@ArmaanAhmed22
Copy link

Hello,

This is also of interest to me! Could you open an experimental branch with such changes?

Sincerely,

Armaan Ahmed

@agoliaei
Copy link

Any help would be appreciated. I am interested as well.
Thanks.

@adavtyan
Copy link
Owner

adavtyan commented Feb 5, 2024

I just made some updates and created the release that is fully compatible with stable_29Oct2020 LAMMPS version. In the coming weeks this should be updated to the latest 23 stable release

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants