stfc / RegentParticleDSL

A particle-method DSL based on Regent programming language
MIT License
1 stars 0 forks source link

New feature: Basic dl_meso io #83

Closed LonelyCat124 closed 3 years ago

LonelyCat124 commented 3 years ago

This has been started in the DL_MESO_IO branch.

Currently most of read_field and scan_field are started for simple testcases.

Control files are still needed to be read (at least some subset required for a basic testcase).

The other main thing currently missing is some sort of structure to store all these in - one question is should this be done in a task inside some config file (probably) so they're immediately setup for Regent. However this would require storing variable sized arrays within the field space which I'm not sure is possible.

First goal is to be able to print out some values similar to what I get from dl_meso directly.

LonelyCat124 commented 3 years ago

Ok - scan field approximately works for reading the INTERACTIONS section of the file. Next up is to make sure I read in SPECIES and then find an appropriate storage structure for these.

LonelyCat124 commented 3 years ago

Scan field now reads the species in as well.

Next up is to check read_field can read the data - once that is done then storage structure is next.

It seems pretty likely that read_field is close to working already - just maybe some aliasing/allocation not yet done.

LonelyCat124 commented 3 years ago

Ok, both functions work correctly. The main thing now is to store all the arrays/values inside a Region. Currently due to passing pointers to Regent functions the code proceeds as though there is no dependencies between them, so it will break (to test this i ran with 2 threads and have the main thread sleep, but this is clearly not good behaviour)

LonelyCat124 commented 3 years ago

Ok, that is now done, and the CONTROL file is also handled!

LonelyCat124 commented 3 years ago

Started on writing files. The HISTORY file is particularly annoying to write, due to slight differences in how C handles binary files vs Fortran. Hopefully its not too far away...

LonelyCat124 commented 3 years ago

This is implemented for a subset of DL_MESO I/O options. Future issues will cover other parts needed as/when needed.