diff --git a/.gitignore b/.gitignore index 6052e5a..70c17b2 100644 --- a/.gitignore +++ b/.gitignore @@ -2,8 +2,5 @@ /@fvdycore /fvdycore /fvdycore@ -/@gtFV3 -/gtFV3 -/gtFV3@ __pycache__ /python/@pyFV3 \ No newline at end of file diff --git a/python/README.md b/python/README.md index efef7db..7996039 100644 --- a/python/README.md +++ b/python/README.md @@ -23,6 +23,7 @@ The configuration of the dycore is passed via the `FV_Flags` structure/user type Input control to pyFV3 via environement variables - `GEOS_PYFV3_BACKEND`: `NDSL` backend for `pyFV3`, defaults to `gt:gpu` +- `GEOS_PYFV3_SINGLE_RANK_OVERRIDE`: boolean to control a single rank override for debug ## Contact diff --git a/python/interface/pyFV3_interface.py b/python/interface/pyFV3_interface.py index ff82584..b22c3fc 100644 --- a/python/interface/pyFV3_interface.py +++ b/python/interface/pyFV3_interface.py @@ -82,7 +82,7 @@ def __init__( def finalize(self): import json - with open("gtfv3_timings.json", "w") as f: + with open("pyfv3_timings.json", "w") as f: json.dump(self._timings, f, indent=4) def __call__( @@ -149,7 +149,7 @@ def __call__( diss_est, ) - # Run gtFV3 + # Run pyFV3 with TimedCUDAProfiler("Numerics", self._timings): state_out, self._timings = self.dycore( self._timings, @@ -214,7 +214,8 @@ def __call__( # Below is the entry point to the interface # ToDo: we should build the object outside of the sim loop from fortran -# potentially by writing a geos_gtfv3_setup_interface and caching the ptr Fortran side +# potentially by writing a pyfv3_interface_setup and caching the ptr Fortran side +# or by having a central python interpreter object handled by CFFI to register against WRAPPER = None diff --git a/python/interface/pyFV3_wrapper.py b/python/interface/pyFV3_wrapper.py index 5d295fb..1501763 100644 --- a/python/interface/pyFV3_wrapper.py +++ b/python/interface/pyFV3_wrapper.py @@ -119,9 +119,9 @@ def __init__( ) # Look for an override to run on a single node - gtfv3_single_rank_override = int(os.getenv("GTFV3_SINGLE_RANK_OVERRIDE", -1)) - if gtfv3_single_rank_override >= 0: - comm = NullComm(gtfv3_single_rank_override, 6, 42) + single_rank_override = int(os.getenv("GEOS_PYFV3_SINGLE_RANK_OVERRIDE", -1)) + if single_rank_override >= 0: + comm = NullComm(single_rank_override, 6, 42) # Make a custom performance collector for the GEOS wrapper self.perf_collector = PerformanceCollector("GEOS wrapper", comm)