Comments (5)
It seems like I may have been wrong about my speculation in #18 that this was due to a *
edit descriptor. The error being produced is the following:
Error in json_get_something: Unable to resolve path: some.path
When the JSON structure being read is printed to stdout, the structure name/key/string is missing for each component, and only ””
is printed. I dug around a bit, but have yet to localize the issue.
It’s possible that this is a GFortran bug, but it would be nice to find a work around if one exists. Deferred length character components are an “experimental" feature in 4.9, so maybe there is no hope for getting this to work right now.
My gut feeling is that object name/key/string does not get correctly allocated when reading the JSON object from a file. Right now I suspect an issue with json_module/parse_string and/or json_module/parse_value. My hunch is that GFortran can’t handle line 3637: string = string//c or 3130: call parse_string(unit, value%data%str_value) correctly, but I have yet to find hard evidence of this.
from json-fortran.
I've isolated the 3 sources of this problem and a pull request should be in later tonight with a work around.
Basically, sourced allocation works to manipulate deferred length character components, but move_alloc()
reallocation on assignment and dummy arguments with intent out seem to have issues.
from json-fortran.
Two sources that cause the test to fail are when parse_string
is called. These are easily fixed. The tests “pass” now, but only because they aren’t checking the complete output. The remaining issue is much more challenging to find work around for, and has to do with the optional argument str
to json_value_print
and is taking longer to resolve than I anticipated… Hopefully I’ll find more time this weekend to poke at this.
from json-fortran.
Based on your findings, I went ahead and started looking at it. I just pushed what I believe to be a workaround. It's not too bad. (I haven't tested it with ifort though, I hope that's not broken now).
from json-fortran.
Thanks, you beat me to it! I didn’t go over the diff/patch in too much detail, but I did:
- Run all the tests with the Intel compiler and the GFortran compiler, all of which passed
- Compare the output of the Intel build unit tests with the previous output to check for regressions—none were found
- Check that the output of the GFortran unit test now matches the output of the Intel built tests, which it does
From the sections of 612322b that I did look at, it seems like this issue should be mostly fixed.
✨ 👍 ✨
It’s possible that other issues stemming from GFortrans trouble using deferred length character scalars and deferred length character components together exist, but if they do, hopefully we can expose them with more testing down the road.
I think 612322b is sufficient to close this issue. Feel free to reopen if you disagree.
from json-fortran.
Related Issues (20)
- null_to_integer_mode mode
- Available in Fedora 35/36 HOT 2
- Cross-platform? HOT 2
- On Definition of operator [] HOT 1
- How to get a derived-type table? HOT 2
- Make unicode support optional for homebrew HOT 1
- Rounding a real when printing HOT 1
- Incorrect mod locations when using FetchContent HOT 2
- Fails to build on PPC due to missing ieee_arithmetic in gfortran HOT 2
- Tests fail with nvfortran compiler HOT 8
- Many tests unable to find executable, several tests fail (PowerPC): what am I doing wrong here? HOT 2
- Check if keyword is valid HOT 1
- Add test to FPM file
- Unable to build json-fortran with nvfortran HOT 1
- libdir and includedir empty in json-fortran.pc
- All tests fail with errors like "Could not find executable ./jf_test_45" HOT 1
- json parse failed HOT 1
- Can not find some variables in json file HOT 1
- Write out 2d array to JSON file HOT 3
- Question: dealing with duplicate named objects HOT 7
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 json-fortran.