jayjaybillings / fern Goto Github PK
View Code? Open in Web Editor NEWRepository for the Fast Explicit Reaction Network Solver
License: BSD 3-Clause "New" or "Revised" License
Repository for the Fast Explicit Reaction Network Solver
License: BSD 3-Clause "New" or "Revised" License
Deal intelligently with using compiler flags. Good ones to have are -O and -g. Another one of my favorites is -Wall. We should have a way to deal with flags well.
I'm trying to make FERN after using cmake, but I'm getting this error. I've bolded what is of concern in this issue. Jay suggests that it is due to std::abs() expecting integers when they are being passed doubles. Any thoughts on how to resolve this?
[ 5%] Building CXX object src/CMakeFiles/fern.dir/Globals.cpp.o
[ 10%] Building CXX object src/CMakeFiles/fern.dir/IntegrationData.cpp.o
[ 15%] Building CXX object src/CMakeFiles/fern.dir/JavaComparisonTest.cpp.o
In file included from /Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/JavaComparisonTest.cpp:40:
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
if (!line.empty() && !line.find("#") == 0) {
^ ~~
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: note: add parentheses after the '!' to evaluate the comparison first
if (!line.empty() && !line.find("#") == 0) {
^
( )
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: note: add parentheses around left hand side expression to silence this warning
if (!line.empty() && !line.find("#") == 0) {
^
( )
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: warning: logical not is only applied to the left hand side of this comparison
[-Wlogical-not-parentheses]
if (!line.empty() && !line.find("#") == 0) {
^ ~~
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/JavaComparisonTest.cpp:130:9: note: in instantiation of member function 'fire::BasicDelimitedTextParser::parse' requested here
parser.parse();
^
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: note: add parentheses after the '!' to evaluate the comparison first
if (!line.empty() && !line.find("#") == 0) {
^
( )
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/tpls/fire/parsers/BasicDelimitedTextParser.h:146:26: note: add parentheses around left hand side expression to silence this warning
if (!line.empty() && !line.find("#") == 0) {
^
( )
2 warnings generated.
[ 21%] Building CXX object src/CMakeFiles/fern.dir/kernels.cpp.o
[ 26%] Building CXX object src/CMakeFiles/fern.dir/main.cpp.o
**In file included from /Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/main.cpp:39:
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/DefaultStepper.h:143:28: error: call to 'abs' is ambiguous
fern_real massChecker = std::abs(sumXLast - sumX);
^~~~~~~~
/usr/include/stdlib.h:129:6: note: candidate function
int abs(int) __pure2;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
In file included from /Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/main.cpp:39:
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/DefaultStepper.h:145:8: error: call to 'abs' is ambiguous
if (std::abs(test2) > std::abs(test1) && massChecker > network.massTol) {
^~~~~~~~
/usr/include/stdlib.h:129:6: note: candidate function
int abs(int) __pure2;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
In file included from /Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/main.cpp:39:
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/DefaultStepper.h:145:26: error: call to 'abs' is ambiguous
if (std::abs(test2) > std::abs(test1) && massChecker > network.massTol) {
^~~~~~~~
/usr/include/stdlib.h:129:6: note: candidate function
int abs(int) __pure2;
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:159:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long abs( long __x) _NOEXCEPT {return labs(__x);}
^
/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/../include/c++/v1/cstdlib:161:44: note: candidate function
inline _LIBCPP_INLINE_VISIBILITY long long abs(long long __x) _NOEXCEPT {return llabs(__x);}
^
In file included from /Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/main.cpp:39:
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/DefaultStepper.h:146:11: error: use of undeclared identifier 'fmax'
dt = fmax( network.massTol / massChecker, downbumper);
^
/Users/Dan/Desktop/Research/FERN/fernRefactor/fern/src/DefaultStepper.h:148:31: error: use of undeclared identifier 'fmax'
dt = (network.massTol / (fmax(massChecker, upbumper)));
^
5 errors generated.
This .ini file for 150-isotope network results in a segmentation violation. Pls, Jay? How to .ini?
[network]
numSpecies = 150
numReactions = 1604
numReactionGroups = 742
massTol = 1.0e-7
fluxFrac = 0.01
networkFile = ../fern/data/CUDAnet_150.inp
rateFile = ../fern/data/rateLibrary_150.data
[initialConditions]
T9 = 7.0;
startTime = 1.0e-20;
endTime = 1.0e-3;
initialTimeStep = 1.23456789e-22;
density = 1.0e8;
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.