STEllAR-GROUP / phylanx

An Asynchronous Distributed C++ Array Processing Toolkit
Boost Software License 1.0
75 stars 76 forks source link

Asking for performance on two functions triggers assert #1077

Open stevenrbrandt opened 4 years ago

stevenrbrandt commented 4 years ago

The following code triggers an assertion failure:

from phylanx import Phylanx

@Phylanx(performance="X")
def fib(n):
  if n < 2:
    return n
  else:
    return fib(n-1)+fib(n-2)

fib(10)

@Phylanx(performance="X")
def fib(n):
  if n < 2:
    return n
  else:
    return fib(n-1)+fib(n-2)

fib(10)

Output is

{config}:
Core library:
  HPX_WITH_ACTION_BASE_COMPATIBILITY=ON
  HPX_WITH_AGAS_DUMP_REFCNT_ENTRIES=OFF
  HPX_WITH_APEX=TRUE
  HPX_WITH_APEX_NO_UPDATE=OFF
  HPX_WITH_ATTACH_DEBUGGER_ON_TEST_FAILURE=OFF
  HPX_WITH_AUTOMATIC_SERIALIZATION_REGISTRATION=ON
  HPX_WITH_COROUTINE_COUNTERS=OFF
  HPX_WITH_CXX14_RETURN_TYPE_DEDUCTION=TRUE
  HPX_WITH_DEPRECATION_WARNINGS=ON
  HPX_WITH_GOOGLE_PERFTOOLS=OFF
  HPX_WITH_HPXMP=OFF
  HPX_WITH_IO_COUNTERS=ON
  HPX_WITH_IO_POOL=ON
  HPX_WITH_ITTNOTIFY=OFF
  HPX_WITH_LOGGING=ON
  HPX_WITH_MORE_THAN_64_THREADS=ON
  HPX_WITH_NATIVE_TLS=ON
  HPX_WITH_NETWORKING=ON
  HPX_WITH_PAPI=OFF
  HPX_WITH_PARCELPORT_ACTION_COUNTERS=OFF
  HPX_WITH_PARCELPORT_LIBFABRIC=OFF
  HPX_WITH_PARCELPORT_MPI=OFF
  HPX_WITH_PARCELPORT_MPI_MULTITHREADED=OFF
  HPX_WITH_PARCELPORT_TCP=ON
  HPX_WITH_PARCELPORT_VERBS=OFF
  HPX_WITH_PARCEL_COALESCING=ON
  HPX_WITH_PARCEL_PROFILING=ON
  HPX_WITH_SANITIZERS=OFF
  HPX_WITH_SCHEDULER_LOCAL_STORAGE=OFF
  HPX_WITH_SPINLOCK_DEADLOCK_DETECTION=OFF
  HPX_WITH_STACKOVERFLOW_DETECTION=ON
  HPX_WITH_STACKTRACES=ON
  HPX_WITH_SWAP_CONTEXT_EMULATION=OFF
  HPX_WITH_TESTS_DEBUG_LOG=OFF
  HPX_WITH_THREAD_BACKTRACE_ON_SUSPENSION=OFF
  HPX_WITH_THREAD_CREATION_AND_CLEANUP_RATES=OFF
  HPX_WITH_THREAD_CUMULATIVE_COUNTS=ON
  HPX_WITH_THREAD_DEBUG_INFO=OFF
  HPX_WITH_THREAD_DESCRIPTION_FULL=OFF
  HPX_WITH_THREAD_GUARD_PAGE=ON
  HPX_WITH_THREAD_IDLE_RATES=OFF
  HPX_WITH_THREAD_LOCAL_STORAGE=OFF
  HPX_WITH_THREAD_MANAGER_IDLE_BACKOFF=ON
  HPX_WITH_THREAD_QUEUE_WAITTIME=OFF
  HPX_WITH_THREAD_STACK_MMAP=ON
  HPX_WITH_THREAD_STEALING_COUNTS=OFF
  HPX_WITH_THREAD_TARGET_ADDRESS=OFF
  HPX_WITH_TIMER_POOL=ON
  HPX_WITH_TUPLE_RVALUE_SWAP=ON
  HPX_WITH_VALGRIND=OFF
  HPX_WITH_VERIFY_LOCKS=OFF
  HPX_WITH_VERIFY_LOCKS_BACKTRACE=OFF
  HPX_WITH_VERIFY_LOCKS_GLOBALLY=OFF

  HPX_PARCEL_MAX_CONNECTIONS=512
  HPX_PARCEL_MAX_CONNECTIONS_PER_LOCALITY=4
  HPX_AGAS_LOCAL_CACHE_SIZE=4096
  HPX_HAVE_MALLOC=system
  HPX_PREFIX (configured)=
  HPX_PREFIX=/usr/local

Module algorithms:
  HPX_ALGORITHMS_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_ALGORITHMS_WITH_DEPRECATION_WARNINGS=OFF
  HPX_ALGORITHMS_WITH_TESTS=OFF

Module allocator_support:
  HPX_ALLOCATOR_SUPPORT_WITH_COMPATIBILITY_HEADERS=ON
  HPX_ALLOCATOR_SUPPORT_WITH_DEPRECATION_WARNINGS=ON
  HPX_ALLOCATOR_SUPPORT_WITH_TESTS=OFF

Module assertion:
  HPX_ASSERTION_WITH_COMPATIBILITY_HEADERS=ON
  HPX_ASSERTION_WITH_DEPRECATION_WARNINGS=ON
  HPX_ASSERTION_WITH_TESTS=OFF

Module basic_execution:
  HPX_BASIC_EXECUTION_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_BASIC_EXECUTION_WITH_DEPRECATION_WARNINGS=OFF
  HPX_BASIC_EXECUTION_WITH_TESTS=OFF

Module cache:
  HPX_CACHE_WITH_COMPATIBILITY_HEADERS=ON
  HPX_CACHE_WITH_DEPRECATION_WARNINGS=ON
  HPX_CACHE_WITH_TESTS=OFF

Module collectives:
  HPX_COLLECTIVES_WITH_COMPATIBILITY_HEADERS=ON
  HPX_COLLECTIVES_WITH_DEPRECATION_WARNINGS=ON
  HPX_COLLECTIVES_WITH_TESTS=OFF

Module compute:
  HPX_COMPUTE_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_COMPUTE_WITH_DEPRECATION_WARNINGS=ON
  HPX_COMPUTE_WITH_TESTS=OFF

Module compute_cuda:
  HPX_COMPUTE_CUDA_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_COMPUTE_CUDA_WITH_DEPRECATION_WARNINGS=ON
  HPX_COMPUTE_CUDA_WITH_TESTS=OFF

Module concepts:
  HPX_CONCEPTS_WITH_COMPATIBILITY_HEADERS=ON
  HPX_CONCEPTS_WITH_DEPRECATION_WARNINGS=ON
  HPX_CONCEPTS_WITH_TESTS=OFF

Module concurrency:
  HPX_CONCURRENCY_WITH_COMPATIBILITY_HEADERS=ON
  HPX_CONCURRENCY_WITH_DEPRECATION_WARNINGS=ON
  HPX_CONCURRENCY_WITH_TESTS=OFF

Module config:
  HPX_CONFIG_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_CONFIG_WITH_DEPRECATION_WARNINGS=OFF
  HPX_CONFIG_WITH_TESTS=OFF

Module coroutines:
  HPX_COROUTINES_WITH_COMPATIBILITY_HEADERS=ON
  HPX_COROUTINES_WITH_DEPRECATION_WARNINGS=ON
  HPX_COROUTINES_WITH_TESTS=OFF

Module datastructures:
  HPX_DATASTRUCTURES_WITH_ADAPT_STD_TUPLE=ON
  HPX_DATASTRUCTURES_WITH_COMPATIBILITY_HEADERS=ON
  HPX_DATASTRUCTURES_WITH_DEPRECATION_WARNINGS=ON
  HPX_DATASTRUCTURES_WITH_TESTS=OFF

Module debugging:
  HPX_DEBUGGING_WITH_COMPATIBILITY_HEADERS=ON
  HPX_DEBUGGING_WITH_DEPRECATION_WARNINGS=ON
  HPX_DEBUGGING_WITH_TESTS=OFF

Module errors:
  HPX_ERRORS_WITH_COMPATIBILITY_HEADERS=ON
  HPX_ERRORS_WITH_DEPRECATION_WARNINGS=ON
  HPX_ERRORS_WITH_TESTS=OFF

Module execution:
  HPX_EXECUTION_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_EXECUTION_WITH_DEPRECATION_WARNINGS=OFF
  HPX_EXECUTION_WITH_TESTS=OFF

Module filesystem:
  HPX_FILESYSTEM_WITH_BOOST_FILESYSTEM_COMPATIBILITY=OFF
  HPX_FILESYSTEM_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_FILESYSTEM_WITH_DEPRECATION_WARNINGS=OFF
  HPX_FILESYSTEM_WITH_TESTS=OFF

Module format:
  HPX_FORMAT_WITH_COMPATIBILITY_HEADERS=ON
  HPX_FORMAT_WITH_DEPRECATION_WARNINGS=ON
  HPX_FORMAT_WITH_TESTS=OFF

Module functional:
  HPX_FUNCTIONAL_WITH_COMPATIBILITY_HEADERS=ON
  HPX_FUNCTIONAL_WITH_DEPRECATION_WARNINGS=ON
  HPX_FUNCTIONAL_WITH_TESTS=OFF

Module hardware:
  HPX_HARDWARE_WITH_COMPATIBILITY_HEADERS=ON
  HPX_HARDWARE_WITH_DEPRECATION_WARNINGS=ON
  HPX_HARDWARE_WITH_TESTS=OFF

Module hashing:
  HPX_HASHING_WITH_COMPATIBILITY_HEADERS=ON
  HPX_HASHING_WITH_DEPRECATION_WARNINGS=ON
  HPX_HASHING_WITH_TESTS=OFF

Module iterator_support:
  HPX_ITERATOR_SUPPORT_WITH_COMPATIBILITY_HEADERS=ON
  HPX_ITERATOR_SUPPORT_WITH_DEPRECATION_WARNINGS=ON
  HPX_ITERATOR_SUPPORT_WITH_TESTS=OFF

Module logging:
  HPX_LOGGING_WITH_COMPATIBILITY_HEADERS=ON
  HPX_LOGGING_WITH_DEPRECATION_WARNINGS=ON
  HPX_LOGGING_WITH_TESTS=OFF

Module memory:
  HPX_MEMORY_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_MEMORY_WITH_DEPRECATION_WARNINGS=ON
  HPX_MEMORY_WITH_TESTS=OFF

Module plugin:
  HPX_PLUGIN_WITH_COMPATIBILITY_HEADERS=ON
  HPX_PLUGIN_WITH_DEPRECATION_WARNINGS=ON
  HPX_PLUGIN_WITH_TESTS=OFF

Module preprocessor:
  HPX_PREPROCESSOR_WITH_COMPATIBILITY_HEADERS=ON
  HPX_PREPROCESSOR_WITH_DEPRECATION_WARNINGS=ON
  HPX_PREPROCESSOR_WITH_TESTS=OFF

Module program_options:
  HPX_PROGRAM_OPTIONS_WITH_BOOST_PROGRAM_OPTIONS_COMPATIBILITY=ON
  HPX_PROGRAM_OPTIONS_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_PROGRAM_OPTIONS_WITH_DEPRECATION_WARNINGS=OFF
  HPX_PROGRAM_OPTIONS_WITH_TESTS=OFF

Module resiliency:
  HPX_RESILIENCY_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_RESILIENCY_WITH_DEPRECATION_WARNINGS=OFF
  HPX_RESILIENCY_WITH_TESTS=OFF

Module segmented_algorithms:
  HPX_SEGMENTED_ALGORITHMS_WITH_COMPATIBILITY_HEADERS=OFF
  HPX_SEGMENTED_ALGORITHMS_WITH_DEPRECATION_WARNINGS=OFF
  HPX_SEGMENTED_ALGORITHMS_WITH_TESTS=OFF

Module serialization:
  HPX_SERIALIZATION_WITH_BOOST_TYPES=ON
  HPX_SERIALIZATION_WITH_COMPATIBILITY_HEADERS=ON
  HPX_SERIALIZATION_WITH_DEPRECATION_WARNINGS=ON
  HPX_SERIALIZATION_WITH_TESTS=OFF

Module statistics:
  HPX_STATISTICS_WITH_COMPATIBILITY_HEADERS=ON
  HPX_STATISTICS_WITH_DEPRECATION_WARNINGS=ON
  HPX_STATISTICS_WITH_TESTS=OFF

Module testing:
  HPX_TESTING_WITH_COMPATIBILITY_HEADERS=ON
  HPX_TESTING_WITH_DEPRECATION_WARNINGS=ON
  HPX_TESTING_WITH_TESTS=OFF

Module thread_support:
  HPX_THREAD_SUPPORT_WITH_COMPATIBILITY_HEADERS=ON
  HPX_THREAD_SUPPORT_WITH_DEPRECATION_WARNINGS=ON
  HPX_THREAD_SUPPORT_WITH_TESTS=OFF

Module timing:
  HPX_TIMING_WITH_COMPATIBILITY_HEADERS=ON
  HPX_TIMING_WITH_DEPRECATION_WARNINGS=ON
  HPX_TIMING_WITH_TESTS=OFF

Module topology:
  HPX_TOPOLOGY_WITH_COMPATIBILITY_HEADERS=ON
  HPX_TOPOLOGY_WITH_DEPRECATION_WARNINGS=ON
  HPX_TOPOLOGY_WITH_TESTS=OFF

Module type_support:
  HPX_TYPE_SUPPORT_WITH_COMPATIBILITY_HEADERS=ON
  HPX_TYPE_SUPPORT_WITH_DEPRECATION_WARNINGS=ON
  HPX_TYPE_SUPPORT_WITH_TESTS=OFF

Module util:
  HPX_UTIL_WITH_COMPATIBILITY_HEADERS=ON
  HPX_UTIL_WITH_DEPRECATION_WARNINGS=ON
  HPX_UTIL_WITH_TESTS=OFF

{version}: V1.4.0-trunk (AGAS: V3.0), Git: 44edfdd662
{boost}: V1.69.0
{build-type}: debug
{date}: Nov  8 2019 06:10:34
{platform}: linux
{compiler}: GNU C++ version 9.2.1 20190827 (Red Hat 9.2.1-1)
{stdlib}: GNU libstdc++ version 20190827
{env}: 17 entries:
  AH_VER=4.6.0
  DISTTAG=f31-updates-candidatecontainer
  FBR=f31-updates-candidate
  FGC=f31-updates-candidate
  HARMONY_HOME=/usr/local/activeharmony
  HOME=/home/jovyan
  HOSTNAME=ee7fedf256e1
  LD_LIBRARY_PATH=/home/jovyan/install/phylanx/lib64:/usr/local/lib64:/home/jovyan/install/phylanx/lib/phylanx:/usr/lib64/openmpi/lib
  OLDPWD=/traveler-integrated
  OTF2_VER=2.1.1
  PATH=/usr/local/lib:/home/jovyan/phylanx/build/lib:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
  PWD=/home/jovyan
  PYVER=3.6.8
  SHLVL=1
  TERM=xterm
  USER=jovyan
  _=/usr/local/bin/python3
{stack-trace}: 4 frames:
0x7fdf2def6a27  : ??? + 0x7fdf2def6a27 in /usr/local/lib64/libhpxd.so.1
0x7fdf2def6aef  : ??? + 0x7fdf2def6aef in /usr/local/lib64/libhpxd.so.1
0x7fdf2def3cfb  : hpx::detail::custom_exception_info(std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, long, std::__cxx11::basic_string<char, std::char_traits<char>, std::allocator<char> > const&) + 0x51 in /usr/local/lib64/libhpxd.so.1
0x7fdf2df1c205  : ??? + 0x7fdf2df1c205 in /usr/local/lib64/libhpxd.so.1
{locality-id}: 0
{hostname}: [ ]
{process-id}: 156
{os-thread}: 0, worker-thread#0
{thread-id}: 00000000ec3d8350
{thread-description}: <unknown>
{state}: state_running
{auxinfo}:
{file}: /home/jovyan/phylanx/src/util/performance_data.cpp
{line}: 255
{function}: std::map<std::__cxx11::basic_string<char>, std::vector<long int> > phylanx::util::retrieve_counter_data(const std::vector<std::__cxx11::basic_string<char> >&, const std::vector<std::__cxx11::basic_string<char> >&, const hpx::naming::id_type&)
{what}: Assertion 'static_cast<std::size_t>(r.second - r.first) < counter_values[i].size()' failed: HPX(assertion_failure)
hkaiser commented 4 years ago

@stevenrbrandt does this happen even if you use different names for the functions?

stevenrbrandt commented 4 years ago

@hkaiser yes, it does.