Giter Club home page Giter Club logo

libconviqt's Introduction

libconviqt

A library implementing beam convolution on a sphere based on

G. Prézeau and M. Reinecke:
Algorithm for the Evaluation of Reduced Wigner Matrices,
APJS 190 (2010) 267, arXiv:1002.1050

Installation

To compile, test and install the C++ library with C-bindings:

./autogen.sh
./configure
make && make check && make install

To install and test the Python wrapper

cd python
python setup.py install
python setup.py test

libconviqt's People

Contributors

keskitalo avatar tskisner avatar ziotom78 avatar stephenmsachs avatar

Stargazers

Raul Naranjo Romero avatar Brodi avatar  avatar Jon E Gudmundsson avatar

Watchers

 avatar  avatar Julian Borrill avatar  avatar James Cloos avatar Jon E Gudmundsson avatar  avatar paper2code - bot avatar

libconviqt's Issues

libsharp-based implementation?

I just found this project ... hadn't realized that conviqt also exists on github now :)

I'm not sure if you are aware that there is a version of conviqt which uses libsharp's SHT transforms at different spins to compute the convolution. Since libsharp supports vector instructions up to AVX512f now and also has an improved recurrence for the Wigner matrix elements, this should be more than twice as fast as the older version used here. If you are interested in switching, please let me know!

Unable to install Libvconviqt on MacOS

Hi,

I am trying to install Libconviqt on my MacOS system but I get the next errors when I try to build and install the library:

Making all in levels
Making all in c_utils
make[3]: Nothing to be done for `all'.
Making all in cxxsupport
make[3]: Nothing to be done for `all'.
Making all in libfftpack
make[3]: Nothing to be done for `all'.
Making all in Healpix_cxx
make[3]: Nothing to be done for `all'.
make[3]: Nothing to be done for `all-am'.
Making all in src
/bin/sh ../libtool  --tag=CXX   --mode=compile mpic++ -DHAVE_CONFIG_H -I. -I..  -I../levels/c_utils -I../levels/libfftpack -I../levels/cxxsupport -I../levels/Healpix_cxx -I../src  -DUSE_MPI   -O3 -std=gnu++11  -MT conviqt_math.lo -MD -MP -MF .deps/conviqt_math.Tpo -c -o conviqt_math.lo conviqt_math.cpp
libtool: compile:  mpic++ -DHAVE_CONFIG_H -I. -I.. -I../levels/c_utils -I../levels/libfftpack -I../levels/cxxsupport -I../levels/Healpix_cxx -I../src -DUSE_MPI -O3 -std=gnu++11 -MT conviqt_math.lo -MD -MP -MF .deps/conviqt_math.Tpo -c conviqt_math.cpp  -fno-common -DPIC -o .libs/conviqt_math.o
conviqt_math.cpp:709:13: error: use of undeclared identifier 'omp_get_thread_num'
        if (omp_get_thread_num() == 0) {
            ^
conviqt_math.cpp:726:21: error: use of undeclared identifier 'omp_get_thread_num'
                if (omp_get_thread_num() == 0) {
                    ^
conviqt_math.cpp:965:13: error: use of undeclared identifier 'omp_get_thread_num'
        if (omp_get_thread_num() == 0) {
            ^
conviqt_math.cpp:982:21: error: use of undeclared identifier 'omp_get_thread_num'
                if (omp_get_thread_num() == 0) {
                    ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:192:42: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    explicit arrT(tsize sz) : arr_ref<T>(stm.alloc(sz),sz), own(true) {}
                                         ^
../levels/cxxsupport/ls_arr.h:338:36: note: in instantiation of member function 'levels::arrT<levels::svec<double, 2>, levels::alignAlloc__<levels::svec<double, 2>, 16>>::arrT' requested here
    explicit arr_align(tsize sz) : arrT<T,alignAlloc__<T,align> >(sz) {}
                                   ^
../levels/cxxsupport/ls_wigner.h:174:50: note: in instantiation of member function 'levels::arr_align<levels::svec<double, 2>, 16>::arr_align' requested here
      : wignergen_scalar (lmax_,thetas,epsilon), result2(lmax_+1) {}
                                                 ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:192:42: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    explicit arrT(tsize sz) : arr_ref<T>(stm.alloc(sz),sz), own(true) {}
                                         ^
../levels/cxxsupport/ls_arr.h:309:30: note: in instantiation of member function 'levels::arrT<levels::xcomplex<float>, levels::normalAlloc__<levels::xcomplex<float>>>::arrT' requested here
    explicit arr(tsize sz) : arrT<T,normalAlloc__<T> >(sz) {}
                             ^
../levels/Healpix_cxx/ls_alm.h:97:32: note: in instantiation of member function 'levels::arr<levels::xcomplex<float>>::arr' requested here
      : Alm_Base(lmax_,mmax_), alm (Num_Alms(lmax,mmax)) {}
                               ^
./conviqt.hpp:40:5: note: in instantiation of member function 'levels::Alm<levels::xcomplex<float>>::Alm' requested here
    beam() { normalized_ = false; }
    ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:195:50: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    arrT(tsize sz, const T &inival) : arr_ref<T>(stm.alloc(sz),sz), own(true)
                                                 ^
../levels/cxxsupport/ls_arr.h:312:38: note: in instantiation of member function 'levels::arrT<int, levels::normalAlloc__<int>>::arrT' requested here
    arr(tsize sz, const T &inival) : arrT<T,normalAlloc__<T> >(sz,inival) {}
                                     ^
conviqt_math.cpp:288:14: note: in instantiation of member function 'levels::arr<int>::arr' requested here
    arr<int> my_hits(nbin, 0), hits(nbin, 0);
             ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:211:41: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    arrT (const arrT &orig): arr_ref<T>(stm.alloc(orig.s),orig.s), own(true)
                                        ^
../levels/cxxsupport/ls_arr.h:327:28: note: in instantiation of member function 'levels::arrT<int, levels::normalAlloc__<int>>::arrT' requested here
    arr (const arr &orig): arrT<T,normalAlloc__<T> >(orig) {}
                           ^
conviqt_math.cpp:451:26: note: in instantiation of member function 'levels::arr<int>::arr' requested here
        levels::arr<int> offset2(inOffset);
                         ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:192:42: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    explicit arrT(tsize sz) : arr_ref<T>(stm.alloc(sz),sz), own(true) {}
                                         ^
../levels/cxxsupport/ls_arr.h:309:30: note: in instantiation of member function 'levels::arrT<double, levels::normalAlloc__<double>>::arrT' requested here
    explicit arr(tsize sz) : arrT<T,normalAlloc__<T> >(sz) {}
                             ^
conviqt_math.cpp:673:25: note: in instantiation of member function 'levels::arr<double>::arr' requested here
    levels::arr<double> rthetas(my_ntheta);
                        ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:192:42: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    explicit arrT(tsize sz) : arr_ref<T>(stm.alloc(sz),sz), own(true) {}
                                         ^
../levels/cxxsupport/ls_arr.h:309:30: note: in instantiation of member function 'levels::arrT<levels::xcomplex<double>, levels::normalAlloc__<levels::xcomplex<double>>>::arrT' requested here
    explicit arr(tsize sz) : arrT<T,normalAlloc__<T> >(sz) {}
                             ^
../levels/cxxsupport/ls_arr.h:585:44: note: in instantiation of member function 'levels::arr<levels::xcomplex<double>>::arr' requested here
    arr3() : s1(0), s2(0), s3(0), s2s3(0), d(0) {}
                                           ^
conviqt_math.cpp:681:38: note: in instantiation of member function 'levels::arr3<levels::xcomplex<double>>::arr3' requested here
    levels::arr3< xcomplex<double> > my_Cmm1, my_Cmm2, my_tod1, my_tod2;
                                     ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:195:50: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    arrT(tsize sz, const T &inival) : arr_ref<T>(stm.alloc(sz),sz), own(true)
                                                 ^
../levels/cxxsupport/ls_arr.h:312:38: note: in instantiation of member function 'levels::arrT<levels::xcomplex<double>, levels::normalAlloc__<levels::xcomplex<double>>>::arrT' requested here
    arr(tsize sz, const T &inival) : arrT<T,normalAlloc__<T> >(sz,inival) {}
                                     ^
conviqt_math.cpp:1200:41: note: in instantiation of member function 'levels::arr<levels::xcomplex<double>>::arr' requested here
        levels::arr< xcomplex<double> > Cmsky(nphi, 0);
                                        ^
In file included from conviqt_math.cpp:1:
In file included from ./conviqt.hpp:15:
In file included from ../levels/Healpix_cxx/ls_alm.h:37:
../levels/cxxsupport/ls_arr.h:211:41: warning: field 'stm' is uninitialized when used here [-Wuninitialized]
    arrT (const arrT &orig): arr_ref<T>(stm.alloc(orig.s),orig.s), own(true)
                                        ^
../levels/cxxsupport/ls_arr.h:327:28: note: in instantiation of member function 'levels::arrT<double, levels::normalAlloc__<double>>::arrT' requested here
    arr (const arr &orig): arrT<T,normalAlloc__<T> >(orig) {}
                           ^
conviqt_math.cpp:1298:22: note: in instantiation of member function 'levels::arr<double>::arr' requested here
        itheta0SetUp(outpntarr1, ntod1, NThetaIndex1, itheta0_1,
                     ^
8 warnings and 4 errors generated.
make[2]: *** [conviqt_math.lo] Error 1
make[1]: *** [all-recursive] Error 1
make: *** [all] Error 2

It seems like I am missing some package but I am not able to guess which one.

Thanks in advance,
Guillermo

configure fails to find cfitsio

The configure script fails to work with recent versions of cfitsio, even if the location of the library explicitly passed to it:

...
checking fitsio.h usability... yes
checking fitsio.h presence... yes
checking for fitsio.h... yes
checking for ffopen in user specified location... no
checking for ffopen in default location... no
configure: error: Could not find the CFITSIO library!

I think this is because cfitsio needs to be linked with -lcurl.

python wrapper not properly installed

Hello,
trying to install libconviqt on Perlmutter , followed these steps :
to avoid conflicting modules, i loaded only the necessary ones :

module purge 
module load PrgEnv-gnu/8.3.3 
module load python 
module use /global/common/software/m3169/perlmutter/modulefiles 
module load openmpi 

then i 've installed cfitsio and libconviqt with the steps as in the README

 ./autogen.sh  
  ./configure  --prefix=/pscratch/sd/g/giuspugl/software_pkgs/ --with-cfitsio=/path/to/cfitsiolib
 make && make check && make install 

after installing the wrapper (that seems to be successfully done) , , i.e. :

   cd python/
   python setup.py install

i get an error when running the test suite:

   python setup.py test

ImportError: Failed to import test module: tests.test_libconviqt
Traceback (most recent call last):
 File "/pscratch/sd/g/giuspugl/software_pkgs/litebird/lib/python3.11/unittest/loader.py", line 407, in _find_test_path
   module = self._get_module_from_name(name)
            ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
 File "/pscratch/sd/g/giuspugl/software_pkgs/litebird/lib/python3.11/unittest/loader.py", line 350, in _get_module_from_name
   __import__(name)
 File "/pscratch/sd/g/giuspugl/software/libconviqt/python/tests/test_libconviqt.py", line 19, in <module>
   class ConviqtTest(TestCase):
 File "/pscratch/sd/g/giuspugl/software/libconviqt/python/tests/test_libconviqt.py", line 46, in ConviqtTest
   beam = conviqt.Beam(beamlmax, beammmax, pol, beamfile, comm)
          ^^^^^^^^^^^^
AttributeError: module 'libconviqt_wrapper' has no attribute 'Beam'

Also, when reinstalling TOAST with libconviqt installed, it seems that conviqt is not successfully linked as the tests in test_ops_sim_tod_conviqt are not passing because libconviqt isn't available. Thus it seems that the wrapper's not properly installed.

could you please check what's wrong ?

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.