d-seams / seams-core Goto Github PK
View Code? Open in Web Editor NEWThe d-SEAMS C++ core engine
Home Page: https://dseams.info
License: MIT License
The d-SEAMS C++ core engine
Home Page: https://dseams.info
License: MIT License
The current CI does not build the meson
variant. This could be fixed.
We ship 7, but only test 1.
MacOS fixes (arm64) for pyseams
to use seams-core
as a dependency requires C++14.
This is a little complicated, `sol2` v.3 requires at-least C++17.
Originally posted by @HaoZeke in #40 (comment)
Here is the error message from build via `nix-build .`
builder for '/nix/store/vb245y6zalkacd779w8yd6h00f2fhs7d-yodaStruct.drv' failed with exit code 2
It gives the same output when I use nix-env if .
to install.
Could anyone give me some hint to fix it?
Thanks in advance.
Scanning dependencies of target yodaStruct
Scanning dependencies of target yodaStruct_test
[ 56%] Building CXX object src/CMakeFiles/yodaStruct.dir/main.cpp.o
[ 58%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/main.cpp.o
[ 60%] Linking CXX executable ../yodaStruct
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `main':
main.cpp:(.text+0x2f28): undefined reference to `fmt::v9::vformat[abi:cxx11](fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: main.cpp:(.text+0x2fe4): undefined reference to `fmt::v9::vformat[abi:cxx11](fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: main.cpp:(.text+0x308e): undefined reference to `fmt::v9::vformat[abi:cxx11](fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: main.cpp:(.text+0x3138): undefined reference to `fmt::v9::vformat[abi:cxx11](fmt::v9::basic_string_view<char>, fmt::v9::basic_format_args<fmt::v9::basic_format_context<fmt::v9::appender, char> >)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `YAML::detail::node& YAML::detail::node_data::get<char [11]>(char const (&) [11], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA11_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA11_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `YAML::detail::node& YAML::detail::node_data::get<char [10]>(char const (&) [10], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA10_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA10_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `YAML::detail::node& YAML::detail::node_data::get<char [4]>(char const (&) [4], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA4_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA4_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `YAML::detail::node& YAML::detail::node_data::get<char [5]>(char const (&) [5], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA5_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA5_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o: in function `YAML::detail::node& YAML::detail::node_data::get<char [20]>(char const (&) [20], std::shared_ptr<YAML::detail::memory_holder>)':
main.cpp:(.text._ZN4YAML6detail9node_data3getIA20_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA20_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): undefined reference to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)'
/nix/store/p792j5f44l3f0xi7ai5jllwnxqwnka88-binutils-2.31.1/bin/ld: CMakeFiles/yodaStruct.dir/main.cpp.o:main.cpp:(.text._ZN4YAML6detail9node_data3getIA28_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE[_ZN4YAML6detail9node_data3getIA28_cEERNS0_4nodeERKT_St10shared_ptrINS0_13memory_holderEE]+0x102): more undefined references to `YAML::detail::node_data::convert_to_map(std::shared_ptr<YAML::detail::memory_holder> const&)' follow
clang-7: error: linker command failed with exit code 1 (use -v to see invocation)
make[2]: *** [src/CMakeFiles/yodaStruct.dir/build.make:106: yodaStruct] Error 1
make[1]: *** [CMakeFiles/Makefile2:191: src/CMakeFiles/yodaStruct.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 63%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/franzblau-test.cpp.o
[ 65%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/topo_one_dim-test.cpp.o
[ 68%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/topo_bulk-test.cpp.o
[ 70%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/absor-test.cpp.o
[ 73%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/franzblau.cpp.o
[ 75%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/topo_one_dim.cpp.o
[ 78%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/topo_bulk.cpp.o
[ 80%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/ring.cpp.o
[ 82%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/neighbours.cpp.o
[ 85%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/mol_sys.cpp.o
[ 87%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/absOrientation.cpp.o
[ 90%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/seams_input.cpp.o
[ 92%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/seams_output.cpp.o
[ 95%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/pntCorrespondence.cpp.o
[ 97%] Building CXX object tests/CMakeFiles/yodaStruct_test.dir/__/src/bulkTUM.cpp.o
[100%] Linking CXX executable ../yodaStruct_test
[100%] Built target yodaStruct_test
make: *** [Makefile:160: all] Error 2
error: builder for '/nix/store/vb245y6zalkacd779w8yd6h00f2fhs7d-yodaStruct.drv' failed with exit code 2
Originally posted by @Clarkszw in #12 (comment)
This seems to be happening in PR runs as well. Hints towards a deeper issue with the dependency pinning. Looks like a linker
issue for fmt
and yaml-cpp
.
The function named "keepAxialRingsOnly" is unused and not defined in any file but it is declared in "topo_one_dim.hpp".
Describe the bug
I was trying to work with d-seams in linux as it did not work with M1 macos.
To Reproduce
I was trying to build d-seams using the following commands:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DCMAKE_INSTALL_PREFIX:PATH=$CONDA_PREFIX ../
make -j$(nproc)
Expected behavior
It was supposed to work in linux, but it gave an error stating fmt==9 was undefined.
Screenshots
Desktop (please complete the following information):
Additional context
The problem here was my linux machine had fmt==10 version installed and the code didn't support fmt==10 version and is restricted to fmt==9.
Spack took me 5 hours to install the dependencies to a new VM..
I was stopped in the last step of the spack path, here is the report:
$ cmake --build build
[1/42] Building CXX object src/CMakeFiles/yodaLib.dir/seams_input.cpp.o
FAILED: src/CMakeFiles/yodaLib.dir/seams_input.cpp.o
/usr/bin/c++ -DBOOST_ERROR_CODE_HEADER_ONLY -DyodaLib_EXPORTS -I/home/clarkszw/seams-core/src/include/internal -I/home/clarkszw/seams-core/src/include/external -I/home/clarkszw/spack/opt/spack/linux-ubuntu20.04-x86_64_v4/gcc-9.4.0/boost-1.81.0-mrcd6ui7dmzh3vlv2tmmk2uxhbywq3qs/include -pg -fsanitize=address -O2 -g -DNDEBUG -fPIC -std=gnu++17 -MD -MT src/CMakeFiles/yodaLib.dir/seams_input.cpp.o -MF src/CMakeFiles/yodaLib.dir/seams_input.cpp.o.d -o src/CMakeFiles/yodaLib.dir/seams_input.cpp.o -c /home/clarkszw/seams-core/src/seams_input.cpp
In file included from /home/clarkszw/seams-core/src/seams_input.cpp:15:
/home/clarkszw/seams-core/src/include/internal/generic.hpp:26:10: fatal error: eigen3/Eigen/Core: No such file or directory
26 | #include <eigen3/Eigen/Core>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
[2/42] Building CXX object src/CMakeFiles/yodaStruct.dir/main.cpp.o
FAILED: src/CMakeFiles/yodaStruct.dir/main.cpp.o
/usr/bin/c++ -DBOOST_ERROR_CODE_HEADER_ONLY -I/home/clarkszw/seams-core/src/include/internal -I/home/clarkszw/seams-core/src/include/external -I/home/clarkszw/spack/opt/spack/linux-ubuntu20.04-x86_64_v4/gcc-9.4.0/boost-1.81.0-mrcd6ui7dmzh3vlv2tmmk2uxhbywq3qs/include -pg -fsanitize=address -O2 -g -DNDEBUG -std=gnu++17 -MD -MT src/CMakeFiles/yodaStruct.dir/main.cpp.o -MF src/CMakeFiles/yodaStruct.dir/main.cpp.o.d -o src/CMakeFiles/yodaStruct.dir/main.cpp.o -c /home/clarkszw/seams-core/src/main.cpp
In file included from /home/clarkszw/seams-core/src/include/internal/seams_output.hpp:21,
from /home/clarkszw/seams-core/src/include/internal/ring.hpp:33,
from /home/clarkszw/seams-core/src/include/internal/seams_input.hpp:21,
from /home/clarkszw/seams-core/src/include/internal/bond.hpp:33,
from /home/clarkszw/seams-core/src/main.cpp:28:
/home/clarkszw/seams-core/src/include/internal/generic.hpp:26:10: fatal error: eigen3/Eigen/Core: No such file or directory
26 | #include <eigen3/Eigen/Core>
| ^~~~~~~~~~~~~~~~~~~
compilation terminated.
[3/42] Building CXX object src/CMakeFiles/yodaLib.dir/mol_sys.cpp.o
ninja: build stopped: subcommand failed.
I have clone the latest repository this morning.
Originally posted by @Clarkszw in #12 (reply in thread)
Describe the bug
luarocks is not directly available to download through micromamba.
To Reproduce
So I tried to download it manually by using the following commands:
$ wget https://luarocks.org/releases/luarocks-3.9.2.tar.gz
$ tar zxpf luarocks-3.9.2.tar.gz
$ cd luarocks-3.9.2
$ ./configure && make && sudo make install
$ sudo luarocks install luasocket
$ lua
Lua 5.3.5 Copyright (C) 1994-2018 Lua.org, PUC-Rio
> require "socket"
Expected behavior
This worked with a little bit of path change with 'conda'.
Desktop (please complete the following information):
Additional context
It was successfully installed in the M1 macos but it doesn't build. when I tried to use the following commands:
mkdir build
cd build
cmake -DCMAKE_BUILD_TYPE=Release -DCMAKE_EXPORT_COMPILE_COMMANDS=YES -DCMAKE_INSTALL_PREFIX:PATH=$CONDA_PREFIX ../
make -j$(nproc)
It gave me the following error:
Is your feature request related to a problem? Please describe.
Currently it is difficult to keep track of which tests are present and which should be implemented.
Describe the solution you'd like
C++
project, it makes sense to use lcov
As the title states, this is the GSoC'23 relevant segment of #29.
Describe the bug
When I try to install via micromamba, this is the response.
Is this meaning something wrong in the yaml file?
(base) clarkszw@aiida:~/seams-core$ micromamba create -f environment.yml
Command ' ' not found, but can be installed with:
sudo apt install mailutils-mh # version 1:3.7-2.1, or
sudo apt install meshio-tools # version 4.0.4-1
sudo apt install mmh # version 0.4-2
sudo apt install nmh # version 1.7.1-6
sudo apt install termtris # version 1.3-1
Ubuntu 20.04.1
x86_64
In dSEAMS raw pointers have been used, but in pybind11 when I bind a function with raw pointers. It gives segmentation error. Here is the git commit I made. The error it shows when I try to use ipython is as follows:
In [1]: cyoda.clearPointCloud(mpt)
Out[1]: <bbdir.cyoda.PointCloudDouble at 0x7f72d1e91130>
In [2]: mpt = cyoda.clearPointCloud(mpt)
In [3]: mpt
Out[3]: <bbdir.cyoda.PointCloudDouble at 0x7f72d1c333f0>
In [4]: cyoda.readXYZ("conftest.xyz", mpt)
Stack trace (most recent call last):
#31 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e8aa08d, in _PyRun_SimpleFileObject
#30 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e8aa70f, in
#29 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e895772, in
#28 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e899369, in
#27 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e87a9de, in PyEval_EvalCode
#26 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e87b325, in
#25 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c73ce, in _PyEval_EvalFrameDefault
#24 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7efc70, in PyObject_Call
#23 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e806802, in
#22 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e806a73, in
#21 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c385c, in _PyEval_EvalFrameDefault
#20 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7d04cb, in PyObject_Vectorcall
#19 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7ee728, in
#18 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e88f996, in
#17 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e88edb8, in
#16 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c6478, in _PyEval_EvalFrameDefault
#15 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e88edb8, in
#14 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c6478, in _PyEval_EvalFrameDefault
#13 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e88edb8, in
#12 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c385c, in _PyEval_EvalFrameDefault
#11 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7d04cb, in PyObject_Vectorcall
#10 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7d05de, in
#9 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e89208d, in
#8 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e87a9de, in PyEval_EvalCode
#7 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e87b325, in
#6 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7c385c, in _PyEval_EvalFrameDefault
#5 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7b6e12, in _PyObject_MakeTpCall
#4 Object "/users/home/ruhila/micromamba/envs/dseams/bin/python3.11", at 0x56400e7d6d45, in
#3 Object "/users/home/ruhila/Git/Github/dSEAMS/pyseams/bbdir/cyoda.cpython-311-x86_64-linux-gnu.so", at 0x7f72d1be08a7, in
#2 Object "/users/home/ruhila/Git/Github/dSEAMS/pyseams/bbdir/cyoda.cpython-311-x86_64-linux-gnu.so", at 0x7f72d1be94a3, in
#1 Object "/users/home/ruhila/micromamba/envs/dseams/lib/libyodaLib.so", at 0x7f72d1aef46c, in sinp::readXYZ(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> >, molSys::PointCloud<molSys::Point<double>, double>*)
#0 Object "/lib64/libc.so.6", at 0x7f72e1700e0b, in
Segmentation fault (Address not mapped to object [0x30])
Segmentation fault (core dumped)
The C++ function code takes the input and process the object in place, returning an integer status code. The pybind11 documentation notes that there are issues with changes to native containers. The simplest solution would be to change the seams-core function to take a single input string (filename) and return a populated PointCloud object instead of an int.
Warning: The `save-state` command is deprecated and will be disabled soon. Please upgrade to using Environment Files. For more information see: https://github.blog/changelog/2022-10-11-github-actions-deprecating-save-state-and-set-output-commands/
Cachix: installing
/usr/bin/bash -c nix-env --quiet -j[8](https://github.com/d-SEAMS/seams-core/actions/runs/5308074653/jobs/9607199482?pr=27#step:6:9) -iA cachix -f https://cachix.org/api/v1/install
Cachix: using cache dseams
Error: Action failed with error: Error: Unable to locate executable file: cachix. Please verify either the file path exists or the file can be found within a directory specified by the PATH environment variable. Also check the file mode to verify the file is executable.
Needs an update. Would be nice to perhaps step away from nix
for now..
Little larger than appropriate, but I guess its ok.
Originally posted by @HaoZeke in #8 (comment)
Or consider dvc
for them.
Since the refactors for #35, the lua
bindings to functions have stopped working. This is expected, the lua
bindings relied on objects being constructed in C++ and provided to the lua
environment. With pyseams
however, this is no longer required.
As currently written, the functions.lua
files are used to call C++ functions, but they can be removed, the CLI should be used with the lua
variables and yaml
files to run the analysis in functions.lua
.
For backwards compatibility I would propose adding these C++ only workflows to the CLI while removing the lua
bindings.
Currently the runs fail on valid PRs which is confusing.
Tests that are built with CMake
are not built with meson
.
Even as we move away from lua
, the sol2
requirement pins the build system to 5.2
which is hard to enforce. Upgrading makes sense just to be able to build more robustly for the future.
I like meson
. Also beyond that, as shown in pypotlib meson
subprojects make wrapper generation easier by:
git
submodules)The last one is subjective, but regardless, I think moving away from cmake
would be a good step in modularity. Some considerations will probably come up in the migration related to the way meson
handles sub-directories. @RuhiRG this could be a good starting point or a parallel task while you work on the bindings with existing installations :)
We need this repository to be a pure library, which means that the Python bindings should live elsewhere as discussed with @RuhiRG.
Might want to deprecate `external` in favor of `meson` wraps or something.
Originally posted by @HaoZeke in #8 (comment)
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.