Comments (5)
Trace of the only test that fail on Windows (in BpGeometryFunctionsTest.dXiMatrix):
C:\Users\velin\Documents\emDNA.git\emDNA\tests\utest_BpGeometryFunctions.cpp(67): error: The difference between mm_dXi2(i,j) and dXi_mats[1](i,j) is 1.4554329963445412e-15, which exceeds Real(1E-15), where
mm_dXi2(i,j) evaluates to -0.011379443932765363,
dXi_mats[1](i,j) evaluates to -0.011379443932763907, and
Real(1E-15) evaluates to 1.0000000000000001e-15.
So missing the target by ~0.455e-15 ... might be some issues with inputs and rounding; need to take a look.
from emdna.
Instructions:
- need to run build+install from the "Developer prompt" installed with Visual Studio
- config: cmake -G"Visual Studio 16 2019" -A x64 -S .\emDNA.git\ -B .\emDNA-build\ -DCMAKE_BUILD_TYPE=Release (for latest visual studio otherwise generator needs to be adjusted)
- then same commands
from emdna.
Link about fp contract in MSVC: https://docs.microsoft.com/en-us/cpp/build/reference/fp-specify-floating-point-behavior?view=msvc-160
Similarly Clang and GCC have the -ffp-contract
option
from emdna.
So after further investigation I do not think the failing test on Windows is a big issue; here are the numbers for the value that fails with MSVC:
- GCC on Linux and Apple Clang on macOS both compute: -0.011379443932764877
- on Windows using Visual Studio 16 2019 toolchain the value is computed as: -0.011379443932763907
The difference is 9.7e-16 (the machine epsilon on the test setup is 2.22045e-16).
Looking at the computation of that value it is pretty heavy on trigonometric functions and expressions that are likely to be sensitivity to FMA type of optimization (fuse multiply add). It is likely that GCC/Clang and MSVC perform different types of optimizations.
Godbolt link: https://godbolt.org/z/W5nWTd MSVC seems to call some optimized sse2 library for cos and sin while GCC relies on a single call to get sin and cos.
Note that the reference value in the test was computed using Mathematica on macOS so it is also possible (likely) that this introduces some bias.
from emdna.
For now the test is disabled on MSVC.
from emdna.
Related Issues (16)
- DNASim dependencies cleanup HOT 3
- Installation tests HOT 8
- Documentation and Install Guides HOT 3
- REAL_WIDTH HOT 2
- Notes, notebooks and other docs
- Incorporate Circular DNA HOT 1
- Improve ElectrostaticEnergy.cpp code HOT 2
- Functionality testing on non-"emDNA-cli" packages HOT 2
- Replace Alglib dependency
- Revise and simplify CMake build system HOT 2
- Use Github Pages to create a simple project website HOT 6
- Project refactoring questions HOT 6
- Updating to Eigen v3.3.X break sparse matrix code
- License text HOT 7
- Fix compile issues on heterogeneous clusters HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from emdna.