Git Product home page Git Product logo

Comments (16)

molpopgen avatar molpopgen commented on August 14, 2024

I'm unable to reproduce this with the current 'dev' branch:
I modified the script like this:

import fwdpp_boost_python
import sys
SEED=10
gsl_rng=fwdpp_boost_python.GSLrng(SEED)
NSAM=20
N=500
GENS=int(sys.argv[1])
THETA=50
RHO=THETA
mu=THETA/(4.*N)
r=RHO/(4.*N)

XX=fwdpp_boost_python.evolve(gsl_rng,N,GENS,mu,r)
XX.sfs=fwdpp_boost_python.sfs(gsl_rng,XX,NSAM)

print(XX.sfs)

I ran it like this and got no errors:

for i in $(seq 1 1 1000); do python Issue13.py $i; done

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Probably fair to close this since it seems specific to my Mac OS 10.10.3 / homebrew build environment.

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

I would be great to see a backtrace on your system. Sadly, I'm not sure how to do that for a boost.python library. I'd like to know if the problem is somewhere in fwdpp, in the boost.python function I wrote to return the sfs, or elsewhere.

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Yeah, I spent some time trying to get a backtrace, but to no avail. I got gdb running, but it would not work with python and I couldn't immediately figure out how to use lldb for that task.

I find some pattern though in the assertion failure. It was happening for generations before there was a single fixation, so the "fixation_times" vector had size 0 and returned failure on exiting the "evolve" function with

Assertion failed: (this->m_holder.m_size > n), function operator[], file /usr/local/include/boost/container/vector.hpp, line 1488.

When I increased the generations enough for "fixation_times" to have size one, the program completed successfully.

Strangely, this seemed tied to returning the population object from the function evolve. When I instead instantiated the "poptype" object in python and passed the object to the function by reference (and instead returned wbar), the program completed successfully no matter how few generations I ran it.

This still sounds like some kind of funky stuff with my boost/python setup, but thought at least I'd pass this info on.

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

Can you try it with this line commented out:

#define FWDPP_SUGAR_USE_BOOST

That'll tell us if the problem is with boost containers. I'd be surprised, but it is worth checking.

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

Some hints on debugging with gdb: http://www.boost.org/doc/libs/1_46_0/libs/python/doc/v2/faq.html

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Yes, that gets rid of the "Assertion failed:"!

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

Fascinating/disturbing. I'd suggest going "scorched earth" on your existing system:

brew unlink boost
brew uninstall boost
brew uninstall boost-python
sudo rm -rf /usr/local/lib/libboost* /usr/local/include/boost*
#etc.
#Then re-install with brew

I'm suspicious that you may have some non-brew-installed boost on your system? I had an issue w/that. I'm used to installing boost from source, so I've only recently tried homebrew, and I had to totally nuke my old installs.

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

I removed boost/boost-python and looked for anything boost related in my paths with locate/mdfind. After rebuilding (installing with --c++11 option), I still have the error. Oi.

In related news, I was stupid and gdb was actually working (it was giving a SIGABRT and I though that was a problem, but I just had to hit continue and the python prompt appeared). Here is the backtrace from gdb:

>>> SEED=10
>>> gsl_rng=fwdpp_boost_python.GSLrng(SEED)
>>> NSAM=20
>>> N=500
>>> GENS=100
>>> THETA=50
>>> RHO=THETA
>>> mu=THETA/(4.*N)
>>> r=RHO/(4.*N)
>>>
>>> XX=fwdpp_boost_python.evolve(gsl_rng,N,GENS,mu,r)
Assertion failed: (this->m_holder.m_size > n), function operator[], file /usr/local/include/boost/container/vector.hpp, line 1488.

Program received signal SIGABRT, Aborted.
0x00007fff8bfd9286 in __pthread_kill () from /usr/lib/system/libsystem_kernel.dylib
(gdb) bt
#0  0x00007fff8bfd9286 in __pthread_kill () from /usr/lib/system/libsystem_kernel.dylib
#1  0x00007fff8328c42f in pthread_kill () from /usr/lib/system/libsystem_pthread.dylib
#2  0x00007fff8da79b53 in abort () from /usr/lib/system/libsystem_c.dylib
#3  0x00007fff8da41c39 in __assert_rtn () from /usr/lib/system/libsystem_c.dylib
#4  0x0000000102807ef5 in KTfwd::deserialize::operator()<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder>, KTfwd::mutation_reader<KTfwd::mutation>, KTfwd::diploidIOplaceholder> ()
   from /Users/vancleve/science/code/fwdpp/python_examples/fwdpp_boost_python.so
#5  0x0000000102807932 in KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder>::singlepop_serialized(KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder> const&) () from /Users/vancleve/science/code/fwdpp/python_examples/fwdpp_boost_python.so
---Type <return> to continue, or q <return> to quit---
#6  0x0000000102807476 in boost::python::objects::class_cref_wrapper<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder>, boost::python::objects::make_instance<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder>, boost::python::objects::value_holder<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder> > > >::convert(KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_u---Type <return> to continue, or q <return> to quit---
ser_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder> const&) () from /Users/vancleve/science/code/fwdpp/python_examples/fwdpp_boost_python.so
#7  0x0000000102803c90 in boost::python::detail::caller_arity<5u>::impl<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder> (*)(KTfwd::GSLrng_t<KTfwd::sugar::GSL_RNG_TYPE_TAG<(KTfwd::sugar::GSL_RNG_TYPE)0> >&, unsigned int const&, unsigned int const&, double const&, double const&), boost::python::default_call_policies, boost::mpl::vector6<KTfwd::sugar::singlepop_serialized<KTfwd::mutation, KTfwd::mutation_writer, KTfwd::mutation_reader<KTfwd::mutation>, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::list<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::pool_allocator<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, boost::container::vector<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> >, boost::container::new_allocator<std::__1::pair<boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false>, boost::container::container_detail::iterator_from_iiterator<boost::intrusive::list_iterator<boost::intrusive::bhtraits<boost::container::container_detail::list_node<KTfwd::gamete_base<KTfwd::mutation, boost::container::list<KTfwd::mutation, boost::pool_allocator<KTfwd::mutation, boost::default_user_allocator_new_delete, boost::mutex, 32u, 0u> >, KTfwd::tags::gamete_type_tag<(KTfwd::tags::gamete_type)0> >, void*>, boost::intrusive::list_node_traits<void*>, (boost::intrusive::link_mode_type)0, boost::intrusive::dft_tag, 1u>, false>, false> > > >, boost::container::vector<KTfwd::mutation, boost::container::new_allocator<KTfwd::mutation> >, boost::container::vector<unsigned int, boost::container::new_allocator<unsigned int> >, boost::unordered::unordered_set<double, boost::hash<double>, KTfwd::equal_eps, std::__1::allocator<double> >, KTfwd::diploidIOplaceholder, KTfwd::diploidIOplaceholder>, KTfwd::GSLrng_t<KTfwd::sugar::GSL_RNG_TYPE_TAG<(KTfwd::sugar::GSL_RNG_TYPE)0> >&, unsigned int const&, unsigned int const&, double const&, double const&> >::operator()(_object*, _object*) () from /Users/vancleve/science/code/fwdpp/python_examples/fwdpp_boost_python.so
#8  0x000000010285fe3a in boost::python::objects::function::call(_object*, _object*) const () from /usr/local/lib/libboost_python.dylib
#9  0x00000001028621aa in boost::detail::function::void_function_ref_invoker0<boost::python::objects::(anonymous namespace)::bind_return, void>::invoke(boost::detail::function::function_buffer&) ()
   from /usr/local/lib/libboost_python.dylib
#10 0x0000000102869941 in boost::python::handle_exception_impl(boost::function0<void>) () from /usr/local/lib/libboost_python.dylib
#11 0x0000000102861bd3 in boost::python::objects::function_call(_object*, _object*, _object*) () from /usr/local/lib/libboost_python.dylib
#12 0x000000010000f0ea in PyObject_Call () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#13 0x000000010008bbd2 in PyEval_EvalFrameEx () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#14 0x0000000100088d7a in PyEval_EvalCodeEx () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#15 0x00000001000887f3 in PyEval_EvalCode () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
---Type <return> to continue, or q <return> to quit---
#16 0x00000001000a88a2 in run_mod () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#17 0x00000001000a86be in PyRun_InteractiveOneFlags () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#18 0x00000001000a81cd in PyRun_InteractiveLoopFlags () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#19 0x00000001000a8077 in PyRun_AnyFileExFlags () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#20 0x00000001000b9c5b in Py_Main () from /usr/local/Cellar/python/2.7.9/Frameworks/Python.framework/Versions/2.7/Python
#21 0x00007fff84e955c9 in start () from /usr/lib/system/libdyld.dylib
#22 0x00007fff84e955c9 in start () from /usr/lib/system/libdyld.dylib
#23 0x0000000000000000 in ?? ()

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

OK. That may tell us something. Please pull the dev_Issue13 branch, which has this potential fix: 633f71b

The last function called is the call operator (operator()) for KTfwd::deserialize. When there are zero fixations, there is nothing to read in. I suppose there is a vague chance that attempting to read in 0 bytes is causing a failure on your system. If so, it is still really weird that we can't reproduce it elsewhere.

Anyhow, let me know.

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Yes, that seems to work!

Very weird that is doesn't happen on other systems. Also, shouldn't this failure come up in KTfwd::serialize too?

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

So that works with the macro NOT commented out? In other words, boost is being used for containers?

It shouldn't be failing for either function, but I'll go back and read up on them tomorrow, and decide if any changes are needed.

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Yes, if I checkout fe430a0 and do make clean and make I get the Assertion failed whereas I get successful output after checking out 633f71b and doing make clean and make. This is the case for both fwdpp_boost_python and social_evol.

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

I've added some extra safety to KTfwd::serialized and merged all changes into dev. I'm guessing this really is "closed" now.

from fwdpp.

vancleve avatar vancleve commented on August 14, 2024

Thanks! That seems to do it. I even tried reinstalling the brew version of python to see if that helped (XCode updated today, so it seemed like a reasonable thing to do), which it didn't. The only other thing would be to use the system python, which I could do fairly easily I think by unlinking brew's python and rebuilding boost, but I'm tired of installing/reinstalling for the moment :-)

from fwdpp.

molpopgen avatar molpopgen commented on August 14, 2024

That's interesting--I'm using the system python, which is 2.7.6.

Given that we think the error was triggered by trying to read 0 bytes within a C++ routine, I'm not sure what role python could play, if any.

from fwdpp.

Related Issues (20)

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.