christophkirst / simkernel Goto Github PK
View Code? Open in Web Editor NEWSimKernel controls parameter scans and iterations for any given C++ code
SimKernel controls parameter scans and iterations for any given C++ code
Here's the compiler output:
g++ -I./include -O3 -MD obj/sim.o obj/sim_io.o obj/sim_signals.o obj/sim_io_manager.o obj/expression.o obj/expression_basic.o obj/expression_sim.o obj/expression_extra.o obj/expression_parser.o test/main.o -o test/test -lgsl -lgslcblas -L. -lrt
test/main.o: In functionbool Sim::get<double>(std::string const&, double&, SimSignal const&)': main.cpp:(.text._ZN3Sim3getIdEEbRKSsRT_RK9SimSignal[_ZN3Sim3getIdEEbRKSsRT_RK9SimSignal]+0x3b): undefined reference to
Sim::get_expr_nothrow(std::string const&, ExpressionPtr&, SimSignal const&, bool&)'
collect2: error: ld returned 1 exit status
Makefile:58: recipe for target 'exe' failed
make: *** [exe] Error 1
Specifically, if in file src/sim.cpp the inline attribute of
bool Sim::get_expr_nothrow(const ExprNameT& n, ExprPtrT& e, const SimSignal& sig, bool& eo)
is removed, the build completes without errors.
Is it possible that it's similar to this http://stackoverflow.com/questions/4769479/c-inlining-class-methods-causes-undefined-reference ?
I'm on Arch linux using gcc 4.9.1
Dear all,
i am trying to use SimKernel in combination with the transferentropy computation from OlavOlav. During compilation by using make, I am runing into the following error:
src/sim.cpp:304:2: fatal error: opening dependency file mpi/sim.d: No such file or directory
and compilation gets terminated.
I have this issue on mac 10.10.3 and on a Ubuntu 14.04.
I have no clue why this happens, and i am not so advanced with unix operation system. Would be perfect if you could suport me.
I haven't checked when this was introduced, but the Kernel does not exit anymore in such a case. Instead for an undefined variable var
, it prints:
Sim: It 1: Warning: Cannot get value for var! Not Defined!
I do believe that I have seen the value of such variables being not set at all, completely undefined, but testing it just now I couldn't confirm that (var
was set to zero).
(Feature request copied from SoureceForge repository)
long is okay, unsigned int is okay, but unsigned int is no good for the linker. blow is an example:
g++ -c -O3 -g te-global.cpp -o maketemp/te-global.o
../../../Sonstiges/SimKernel/expression_basic.h: In function ‘void ExprToValue(const ExprPtrT&, T&) [with T = long unsigned int]’:
../../../Sonstiges/SimKernel/sim.hpp:22: instantiated from ‘bool Sim::get(const ExprNameT&, T&, const SimSignal&) [with T = long unsigned int]’
te-global.cpp:124: instantiated from here
../../../Sonstiges/SimKernel/expression_basic.h:2503: error: conversion from ‘Expression’ to ‘long unsigned int’ is ambiguous
../../../Sonstiges/SimKernel/expression.h:210: note: candidates are: virtual Expression::operator bool() const
../../../Sonstiges/SimKernel/expression.h:208: note: virtual Expression::operator int() const
../../../Sonstiges/SimKernel/expression.h:207: note: virtual Expression::operator double() const
make: *** [maketemp/te-global.o] Error 1
Hello again,
I hope I am annoying you not to much, with all the questions. I tried to run one of the tutorial skips by using
make tutorial_sim_iterated
the first error I received was that he could not include "../sim_main.h". Therefore I changed the hello_world_sim_iterated.cpp line 2
#include <sim_main.h>
and include the following paths into ~/.profile
export PATH="/usr/local/include/sim:$PATH"
export PATH="/usr/local/libc:$PATH"
export PATH="/usr/local/lib/libsim:$PATH"
Now I run into the following:
Undefined symbols for architecture x86_64:
"toExprString(char const*)", referenced from:
bool Sim::get<std::basic_string<char, std::char_traits<char>, std::allocator<char> >, char [6]>(std::basic_string<char, std::char_traits<char>, std::allocator<char> > const&, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&, char const (&) [6], SimSignal const&) in ccBhzTjU.o
"Endl(SimIO&)", referenced from:
SimControl<Kernel>::simulate(int, char**) in ccBhzTjU.o
"ExprParser::parse_file(char const*, std::basic_string<char, std::char_traits<char>, std::allocator<char> >&)", referenced from:
SimControl<Kernel>::simulate(int, char**) in ccBhzTjU.o
..... two more pages of complains
std::basic_string<char, std::char_traits<char>, std::allocator<char> > ExprToValueErrorDescription<std::basic_string<char, std::char_traits<char>, std::allocator<char> > >(ExpressionPtr const&) in ccBhzTjU.o
ld: symbol(s) not found for architecture x86_64
collect2: error: ld returned 1 exit status
make: *** [tutorial_sim_iterated] Error 1
Do you know what I am doing wrong? If i remember right, that this is also the problem when i am running the te_causality_master from olavolav. Did i forget to add some paths?
Bye the way the ./test input
works like a charm
Thanks again for all your help.
Dirk
It would be great to have some preprocessing in SimKernel control files. For instance, one could have a file for the general options and then a number of more specific control files (that only include the necessary bits which are not in the general one) that reference the general control file.
(Request copied from the SourceForge repository)
As discussed here, there seems to be a problem when installing SimKernel on OSX Mavericks.
Since it seems to be a SimKernel problem, I have closed the issue there, and let's continue the discussion here.
Javier have you tried the latest (library-style) version of SimKernel from Christoph's repository? (my changes have recently been merged)
edit: See specifically the error message here.
I met the following two errors when I tried to build and install the package by typing "make"
Error 1: src/sim.cpp:192:76: error: no match for ‘operator<<’ (operand types are ‘std::basic_ostream’ and ‘std::stringstream’ {aka ‘std::__cxx11::basic_stringstream’})
192 | str << "Sim: process = " << process() << " iteration = " << iteration() <<
| ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~ ^~
Error 2: /usr/include/c++/9/ostream:691:5: error: no type named ‘type’ in ‘struct std::enable_if<false, std::basic_ostream&>’
make: *** [Makefile:83: obj/sim.o] Error 1
Any help?
Thanks
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.