risi-kondor / snob2 Goto Github PK
View Code? Open in Web Editor NEWLicense: Mozilla Public License 2.0
License: Mozilla Public License 2.0
I was unable to make the tests on Ubuntu 20.04. Here is the error I got:
clang -o testIntegerPartition testIntegerPartition.cpp -std=c++11 -O3 -ferror-limit=1 -I/home/shawn/cnine//include -I/home/shawn/cnine//include/cmaps -I/home/shawn/cnine//objects/backendA -I/home/shawn/cnine//objects/backendB -I/home/shawn/cnine//objects/scalar -I/home/shawn/cnine//objects/tensor -I/home/shawn/cnine//objects/tensor_views -I/home/shawn/cnine//objects/tensor_array -I/home/shawn/cnine//objects/tensor_array/cell_ops -I/home/shawn/GElib/include -I/home/shawn/GElib/objects/SO3 -I/home/shawn/GElib/objects/SO2 -I/home/shawn/Snob2/combinatorial -I/home/shawn/Snob2/Sn -I/home/shawn/Snob2/include -lstdc++ -lm -lpthread
In file included from testIntegerPartition.cpp:13:
In file included from /home/shawn/Snob2/combinatorial/CombinatorialClasses.hpp:21:
/home/shawn/Snob2/combinatorial/IntegerPartitions.hpp:43:15: error: use of undeclared identifier '_combibank'
lambda=&_combibank->get_IntegerPartitions(n);
^
fatal error: too many errors emitted, stopping now [-ferror-limit=]
2 errors generated.
make: *** [Makefile:34: testIntegerPartition] Error 1
It looks like it "_combibank" is referenced before it is defined somewhere? Although it may also just be some issue with how I've configured things.
I apologize if this is already supported, but I couldn't really tell from the docs. Are Fourier transforms of complex functions supported? Thank you in advance.
Hello again Risi,
I encounter an error (pasted below) while installing Snob2.
The problem is a file not found:
../include/Snob2_base.cpp: No such file or directory.
It is strange, as in the setup.py the directory ../include is correctly included in the project.
This is the error:
llowing ninja to set a default number of workers... (overridable by setting the environment variable MAX_JOBS=N)
[1/1] /hpctmp/classicwuongo/envs/sage310/bin/x86_64-conda-linux-gnu-c++ -MMD -MF /home/svu/cccales/Snob2/python/build/temp.linux-x86_64-cpython-310/bindings/Snob2_bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -fPIC -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /hpctmp/classicwuongo/envs/sage310/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -fPIC -I../../cnine -I../../cnine/include -I../../cnine/modules -I../../cnine/combinatorial -I../../cnine/containers -I../../cnine/math -I../../cnine/objects/backendA -I../../cnine/objects/backendB -I../../cnine/objects/scalar -I../../cnine/objects/tensor -I../../cnine/objects/tensor_views -I../../cnine/objects/tensor_views/functions -I../include -I../combinatorial -I../Sn -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/TH -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/THC -I/hpctmp/classicwuongo/envs/sage310/include/python3.10 -c -c /home/svu/cccales/Snob2/python/bindings/Snob2_bindings.cpp -o /home/svu/cccales/Snob2/python/build/temp.linux-x86_64-cpython-310/bindings/Snob2_bindings.o -std=c++14 -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-variable -Wno-reorder -Wno-reorder-ctor -Wno-overloaded-virtual -D_WITH_ATEN -DCNINE_RANGE_CHECKING -DCNINE_SIZE_CHECKING -DCNINE_DEVICE_CHECKING -DWITH_FAKE_GRAD -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=snob_base -D_GLIBCXX_USE_CXX11_ABI=0
FAILED: /home/svu/cccales/Snob2/python/build/temp.linux-x86_64-cpython-310/bindings/Snob2_bindings.o
/hpctmp/classicwuongo/envs/sage310/bin/x86_64-conda-linux-gnu-c++ -MMD -MF /home/svu/cccales/Snob2/python/build/temp.linux-x86_64-cpython-310/bindings/Snob2_bindings.o.d -Wno-unused-result -Wsign-compare -DNDEBUG -fwrapv -O2 -Wall -fPIC -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -fPIC -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -march=nocona -mtune=haswell -ftree-vectorize -fPIC -fstack-protector-strong -fno-plt -O2 -ffunction-sections -pipe -isystem /hpctmp/classicwuongo/envs/sage310/include -DNDEBUG -D_FORTIFY_SOURCE=2 -O2 -isystem /hpctmp/classicwuongo/envs/sage310/include -fPIC -I../../cnine -I../../cnine/include -I../../cnine/modules -I../../cnine/combinatorial -I../../cnine/containers -I../../cnine/math -I../../cnine/objects/backendA -I../../cnine/objects/backendB -I../../cnine/objects/scalar -I../../cnine/objects/tensor -I../../cnine/objects/tensor_views -I../../cnine/objects/tensor_views/functions -I../include -I../combinatorial -I../Sn -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/torch/csrc/api/include -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/TH -I/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/include/THC -I/hpctmp/classicwuongo/envs/sage310/include/python3.10 -c -c /home/svu/cccales/Snob2/python/bindings/Snob2_bindings.cpp -o /home/svu/cccales/Snob2/python/build/temp.linux-x86_64-cpython-310/bindings/Snob2_bindings.o -std=c++14 -Wno-sign-compare -Wno-deprecated-declarations -Wno-unused-variable -Wno-reorder -Wno-reorder-ctor -Wno-overloaded-virtual -D_WITH_ATEN -DCNINE_RANGE_CHECKING -DCNINE_SIZE_CHECKING -DCNINE_DEVICE_CHECKING -DWITH_FAKE_GRAD -DTORCH_API_INCLUDE_EXTENSION_H '-DPYBIND11_COMPILER_TYPE="_gcc"' '-DPYBIND11_STDLIB="_libstdcpp"' '-DPYBIND11_BUILD_ABI="_cxxabi1011"' -DTORCH_EXTENSION_NAME=snob_base -D_GLIBCXX_USE_CXX11_ABI=0
/home/svu/cccales/Snob2/python/bindings/Snob2_bindings.cpp:17:10: fatal error: ../include/Snob2_base.cpp: No such file or directory
17 | #include "../include/Snob2_base.cpp"
| ^~~~~~~~~~~~~~~~~~~~~~~~~~~
compilation terminated.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File "/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/torch/utils/cpp_extension.py", line 1893, in _run_ninja_build
subprocess.run(
File "/hpctmp/classicwuongo/envs/sage310/lib/python3.10/subprocess.py", line 526, in run
raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['ninja', '-v']' returned non-zero exit status 1.
I take this opportunity to signal that:
setup.sty
file anymore, but setup.pypython setup.py install
This is the warning at about python setup.py install
python setup.py install
running install
/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: SetuptoolsDeprecationWarning: setup.py install is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` directly.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://blog.ganssle.io/articles/2021/10/setup-py-deprecated.html for details.
********************************************************************************
!!
self.initialize_options()
/hpctmp/classicwuongo/envs/sage310/lib/python3.10/site-packages/setuptools/_distutils/cmd.py:66: EasyInstallDeprecationWarning: easy_install command is deprecated.
!!
********************************************************************************
Please avoid running ``setup.py`` and ``easy_install``.
Instead, use pypa/build, pypa/installer or other
standards-based tools.
See https://github.com/pypa/setuptools/issues/917 for details.
********************************************************************************
classic
import snob
fft=snob.ClausenFFT(3)
gives
AttributeError Traceback (most recent call last)
Cell In[1], line 2
1 import snob
----> 2 fft=snob.ClausenFFT(3)
AttributeError: module 'snob' has no attribute 'ClausenFFT'
and
dir(snob)
returns
['ConvolveFn',
'IntegerPartition',
'IntegerPartitions',
'InvFn',
'LeftTranslateFn',
'Permutation',
'RightTranslateFn',
'Sn',
'SnCClass',
'SnCharacter',
'SnElement',
'SnFunction',
'SnIrrep',
'SnType',
'StandardYoungTableaux',
'YoungTableau',
'__builtins__',
'__cached__',
'__doc__',
'__file__',
'__loader__',
'__name__',
'__package__',
'__path__',
'__spec__',
'device_id',
'torch']
Did I miss anything?
Thanks! Looking forward to playing around with this!
Hi Risi, I've been trying to use Snob2 from (main) to implement your QAP-solver from 2010 but I've been encountering some errors. I'm new to C++ so I've found it difficult to tell where in the source the issue lies. I've attached a jupyter notebook with examples of all the errors in snob (imported as Snob2), followed by the same code implemented in snob_base (imported as Snob1) if it is resolved by making the change.
The issues are mainly around retrieving specific values SnFunction, SnVec, SnPart might take, and also an issue with ClausenFFT not working on SnFunction from Snob2 but only on Snob1.
This is also the first time I've submitted an issue on GitHub, so I hope this is enough information about the errors! If you don't get the same errors I can send through exactly what happens on my end.
Here's the Jupyter file detailing the issues:
Errors in Snob.zip
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.