Coder Social home page Coder Social logo

jayjaybillings / fern Goto Github PK

View Code? Open in Web Editor NEW
3.0 3.0 1.0 28.65 MB

Repository for the Fast Explicit Reaction Network Solver

License: BSD 3-Clause "New" or "Revised" License

Cuda 2.14% CMake 0.24% C++ 9.16% C 0.90% Makefile 0.03% Batchfile 0.06% Java 69.17% HTML 8.87% CSS 0.05% PostScript 9.12% Groff 0.01% Objective-C 0.26%

fern's People

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar

Forkers

noahfrere

fern's Issues

Add more flags to be used in CMakeList.

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.

"Call to 'abs' is abmiguous" when making FERN

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.

Get a working .ini file for 150-isotope network.

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;

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.