Coder Social home page Coder Social logo

Error When Using Version 2.0 about dace HOT 6 CLOSED

dacelib avatar dacelib commented on May 28, 2024
Error When Using Version 2.0

from dace.

Comments (6)

mmassari1974 avatar mmassari1974 commented on May 28, 2024

Thank you for the feedback. Unfortunately the binary version for Windows is targeted at Visual Studio 2017, GCC have a different C++ name mangling convention. Therefore, you will not be able to link usiing the provided binary on Windows using GCC. Moreover, you are using CodelLite and if I remember right CodeLite ships a 32bit version of the GCC toolchain on Windows. The dace binaries are all 64bit.

If you want to use the dace on Windows with the GCC you should download the source and compile it yourself. The Build system is based on CMAKE which should have a generator for CodeLite. However, I'll suggest to move to a 64bit toolchain if possible, the 32bit limit on addressable memory will seriously limit the size of problems that can be addressed. Instead, if you want ot use the provided binary you should move to Visual Studio (the community edition can be freely downloaded form MS website.) or to Linux.

I'll update the release page adding all those information on the Windows Binary.

from dace.

breezeBIT avatar breezeBIT commented on May 28, 2024

Thank you for your help. I have changed my environment to Visual Studio 2017 and All things look to behave normally. However, when I run the example 6 titled "definite integral" at tutorial 1, I always get the wrong value 0. It seems that something goes wrong when evaluating the DA polynomial. To verify this, I write a simple example to compute sin(1.0) with the following code segment:
void test_06(void)
{
DA::init(24, 1);

DA x = DA(1);
DA f = sin(x);
double y = f.evalScalar(1.0);

cout << "The result is: " << y << endl;

}
In my computer, the result of y is also zero. By the way, I have changed my OS to windows 10 64 bit and the precompiled version 2.0 package is used with the static library dace.lib. I'm not sure if this is a bug, please help to check it. Many thanks!

from dace.

mmassari1974 avatar mmassari1974 commented on May 28, 2024

@breezeBIT in the future please open a new issue in case of different problem/error.
dace.lib is not a static library, it is used by Visual Studio 2017 to correctly link the dace.dll. By chance (or maybe by design at MS) it has the same file extension of the static library (which is not included in the installer). Do not worry, you are linking against the correct library.

Regarding your example I'm not able to reproduce your error. I'm using Win10Pro 64 with VS2017 latest update. The following code compiles and give the expected results, can you please check the includes you are using are the same?

#include "stdafx.h"
#include
#include
#include <DA/dace.h>

using namespace std;
using namespace DACE;

int main()
{
DA::init(24, 1);

DA x = DA(1);
DA f = sin(x);

double y = f.evalScalar(1.0);

cout << "expected resutls: " << sin(1.0) << endl;
cout << "The result is: " << y << endl ;
cout << "The error is: " << y - sin(1.0) << endl;

return 0;

}

from dace.

breezeBIT avatar breezeBIT commented on May 28, 2024

Sorry for appending to the previous one and I will start a new issue next time. I just changed the configuration to Release x64 and got the right value. In my previous operation, the Debug x64 configuration was used. I'm wondering why there are different behaviors between Debug and Release?

from dace.

mmassari1974 avatar mmassari1974 commented on May 28, 2024

The dace binaries are compiled in Release mode, but that should not affect the behavior of code compiled in debug mode. Thanks for the information, we will investigate the reason for this behavior.

from dace.

abgandar avatar abgandar commented on May 28, 2024

@breezeBIT can you please submit a new issue with this information so we can keep track of the Win64 Release/Debug issue separately? That way we can make sure it doesn't get lost.

from dace.

Related Issues (18)

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.