Skip to content

refactor: FieldSpecification context when targeting wrong fieldName #3508

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 20 commits into from
Apr 14, 2025

Conversation

arng40
Copy link
Contributor

@arng40 arng40 commented Jan 6, 2025

Here's the typical error encountered when setting the wrong target for a FieldSpecification :

***** LOCATION: /path/to/GEOS/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp:208
***** Controlling expression (should be false): true
***** Rank 17:
initialPressure_channel/fieldName (staircase_3d.xml, l.133): there is no fieldName named `pressure_t` under the objectPath `ElementRegions/Channel`.
 
 
** StackTrace of 5 frames **
[...]
=====

Here we wanted to define initial conditions in FieldSpecifications to impose the value of a property (here: “rock_initialPorosity”).
However, this property doesn't exist because we've given it the wrong name. It expects the name of the Porosity model for stress (i.e. “rockPorosity_initialPorosity” here).

With more indications we would have (in progress)

***** LOCATION: /path/to/GEOS/src/coreComponents/fieldSpecification/FieldSpecificationManager.cpp:228
***** Controlling expression (should be false): true
***** Rank 0: 
initialPressure_channel/fieldName (staircase_3d.xml, l.133): there is no fieldName named `pressure_t` under the objectPath `ElementRegions/Channel`.
Available fields in ElementRegions/Channel are:
bcPressure, bcTemperature, dMass, dMobility, deltaPressure, deltaVolume, gravityCoefficient, initialPressure, initialTemperature, mass, mass_n, mobility, netToGross, pressure, pressure_n, temperature, temperature_n

** StackTrace of 5 frames **
[...]

@arng40 arng40 self-assigned this Jan 6, 2025
@arng40 arng40 added the type: feature New feature or request label Jan 6, 2025
@arng40 arng40 linked an issue Jan 6, 2025 that may be closed by this pull request
9 tasks
@arng40 arng40 requested a review from MelReyCG January 6, 2025 09:55
@arng40 arng40 changed the title FieldSpecification msg when targeting the wrong fieldName FieldSpecification message when targeting wrong fieldName Jan 6, 2025
@arng40 arng40 changed the title FieldSpecification message when targeting wrong fieldName FieldSpecification context when targeting wrong fieldName Jan 6, 2025
@arng40 arng40 marked this pull request as ready for review January 6, 2025 14:23
@arng40 arng40 changed the title FieldSpecification context when targeting wrong fieldName refactor: FieldSpecification context when targeting wrong fieldName Jan 6, 2025
@arng40 arng40 added ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI labels Jan 10, 2025
@arng40 arng40 requested a review from wrtobin as a code owner February 12, 2025 15:04
@arng40 arng40 requested a review from untereiner as a code owner February 12, 2025 15:04
@arng40 arng40 requested a review from MelReyCG February 12, 2025 15:14
Comment on lines 229 to 238
WrapperBase const & targetField = targetObject.getWrapperBase( fieldName );
string const solverName = *(targetField.getRegisteringObjects().begin());

for( auto const & view : targetObject.wrappers() )
{
if( *(view.second->getRegisteringObjects().begin()) == solverName )
{
fieldNameAvail.insert( view.second->getName() );
}
}
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This loop could completely be flatten.
Also, does the call to getRegisteringObjects() changes the result of the list?

Copy link
Contributor Author

@arng40 arng40 Feb 13, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

loop can be flatten, afterwards this is a bit confusing 😅

@arng40 arng40 added the flag: no rebaseline Does not require rebaseline label Feb 13, 2025
@arng40 arng40 requested a review from MelReyCG February 13, 2025 14:29
Copy link
Contributor

@MelReyCG MelReyCG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice!

@arng40 arng40 added the ci: run code coverage enables running of the code coverage CI jobs label Apr 10, 2025
Copy link

codecov bot commented Apr 11, 2025

Codecov Report

Attention: Patch coverage is 13.63636% with 19 lines in your changes missing coverage. Please review.

Project coverage is 56.64%. Comparing base (10f0a21) to head (c22a778).
Report is 1 commits behind head on develop.

Files with missing lines Patch % Lines
...s/fieldSpecification/FieldSpecificationManager.cpp 5.26% 18 Missing ⚠️
src/coreComponents/mesh/ObjectManagerBase.hpp 66.66% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##           develop    #3508      +/-   ##
===========================================
- Coverage    56.65%   56.64%   -0.01%     
===========================================
  Files         1216     1216              
  Lines       105074   105091      +17     
===========================================
+ Hits         59529    59531       +2     
- Misses       45545    45560      +15     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@arng40 arng40 requested a review from MelReyCG April 11, 2025 13:19
@rrsettgast rrsettgast merged commit 2404873 into develop Apr 14, 2025
25 of 27 checks passed
@rrsettgast rrsettgast deleted the feature/dudes/list-properties-fs branch April 14, 2025 22:45
arng40 added a commit that referenced this pull request Apr 17, 2025
commit 4aa2c9f
Author: Randolph Settgast <settgast1@llnl.gov>
Date:   Wed Apr 16 13:33:48 2025 -0700

    fix: remove incorrect use of template keyword in function calls with no template argument list (#3625)

    * in cases where there is a templated base class and a templated function func<T>(T t), calls such as derived::template func( t ) is actually non-compliant. It is replaced with derived::template func<>( T )

commit 696e599
Author: Pavel Tomin <paveltomin@users.noreply.github.com>
Date:   Tue Apr 15 10:44:03 2025 -0700

    fix: time step logic for sequential (#3624)

commit c23c214
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 16:12:53 2025 +0200

    fix: Log levels generation on documentation generation (#3615)

commit b2d65ce
Author: Jian Huang <53012159+jhuang2601@users.noreply.github.com>
Date:   Tue Apr 15 09:12:18 2025 -0500

    fix: update TFrac tutorial example (#3595)

commit d0e5b2a
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 00:49:34 2025 +0200

    refactor: Refactoring raw logs to tables (#3559)

    * solubility table

    * fields table

    * load balancing

    * set mesh partitioner smaller and removed some info if rank size = 1

    * improve CO2 solubility

commit 2404873
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 00:45:04 2025 +0200

    refactor: FieldSpecification context when targeting wrong fieldName (#3508)

    * add specific fieldName when enter wrong name

    * remove char const and set pstringstream

    * attempt n°3 to output fieldName error

commit 10f0a21
Author: Brian Han <han12@llnl.gov>
Date:   Mon Apr 14 12:45:56 2025 -0700

    build: Update RAJA suite to v2025.03.0 (#3613)

    * update tag

    * Update geos spack-generated host-configs

    * Update LvArray submodule

commit e09f499
Author: Matteo Cusini <49037133+CusiniM@users.noreply.github.com>
Date:   Mon Apr 7 11:03:53 2025 -0700

    fix: Fix runtime cuda error. (#3617)

    * fix: Fix runtime cuda error.

    * fix another similar error.

    * Update src/coreComponents/fieldSpecification/TractionBoundaryCondition.cpp

commit 2e206c1
Author: Ben Corbett <32752943+corbett5@users.noreply.github.com>
Date:   Sat Apr 5 11:28:59 2025 -0700

    fix: Fixed leaks in ArrayOfArrays and MeshLevel. (#3602)

    * Fixed leaks in ArrayOfArrays and MeshLevel.

    * submodule update

    * Updated LvArray

    ---------

    Co-authored-by: Matteo Cusini <49037133+CusiniM@users.noreply.github.com>
arng40 added a commit that referenced this pull request Apr 18, 2025
commit 5537695
Merge: ecd5f7f 4aa2c9f
Author: MelReyCG <122801580+MelReyCG@users.noreply.github.com>
Date:   Thu Apr 17 13:45:39 2025 +0200

    Merge branch 'develop' into feature/rey/umpire-csv-stats

commit ecd5f7f
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 17 11:31:26 2025 +0200

    🦺 rebaseline for "parallelThread" moving

commit 4aa2c9f
Author: Randolph Settgast <settgast1@llnl.gov>
Date:   Wed Apr 16 13:33:48 2025 -0700

    fix: remove incorrect use of template keyword in function calls with no template argument list (#3625)

    * in cases where there is a templated base class and a templated function func<T>(T t), calls such as derived::template func( t ) is actually non-compliant. It is replaced with derived::template func<>( T )

commit 1b7ebdc
Merge: 6e4ec16 696e599
Author: MelReyCG <122801580+MelReyCG@users.noreply.github.com>
Date:   Wed Apr 16 17:37:16 2025 +0200

    Merge branch 'develop' into feature/rey/umpire-csv-stats

commit 6e4ec16
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 16:48:37 2025 +0200

    ♻️ simplifying isNewlyOpened in header

commit 6cb75f1
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 16:46:17 2025 +0200

    ♻️ simplifying isNewlyOpened in header

commit bc39174
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 16:45:05 2025 +0200

    ♻️ simplifying isNewlyOpened because behaviour was potencially not accurate in some situations + was complexifying the code

commit 9b46fe9
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 16:43:44 2025 +0200

    💡 added todo for error listing PR 3614

commit 9d2e191
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 16:18:18 2025 +0200

    🐛 💄 update CSV & Log table layouts for parsing & readability + fix percentage computation

commit acb6d27
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 15:00:23 2025 +0200

    ⚰️ dead code

commit 3189e9f
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 14:21:50 2025 +0200

    💄 thinner table layout (table was large)

commit 79ba4cf
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 14:13:28 2025 +0200

    🐛 📝 docs bugfix, 2nd attempt

commit 7b271c5
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 14:06:34 2025 +0200

    🐛 📝 docs bugfix

commit b9f38f9
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 10:44:20 2025 +0200

    📝 docs fixes

commit 7c92938
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 16 10:17:56 2025 +0200

    📝 docs fix

commit 696e599
Author: Pavel Tomin <paveltomin@users.noreply.github.com>
Date:   Tue Apr 15 10:44:03 2025 -0700

    fix: time step logic for sequential (#3624)

commit 4778151
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 17:45:13 2025 +0200

    🐛 add include

commit b157672
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 17:43:59 2025 +0200

    🩹 better strategy for defining last report cycle & time

commit 479230f
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 17:12:19 2025 +0200

    🎨 uncrustify

commit e36337e
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 17:06:19 2025 +0200

    🐛 correct last timestep writing

commit f547b76
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 16:33:30 2025 +0200

    🐛 wrong csv character (added a global definition of the standard CSV separator)

commit c23c214
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 16:12:53 2025 +0200

    fix: Log levels generation on documentation generation (#3615)

commit b2d65ce
Author: Jian Huang <53012159+jhuang2601@users.noreply.github.com>
Date:   Tue Apr 15 09:12:18 2025 -0500

    fix: update TFrac tutorial example (#3595)

commit f6b3d86
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 15:11:50 2025 +0200

    🐛 Solve singleton issues

commit 145676e
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Tue Apr 15 10:36:19 2025 +0200

    ✅ Added unit-test for MemoryStats & MemoryStatsOutput

commit d0e5b2a
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 00:49:34 2025 +0200

    refactor: Refactoring raw logs to tables (#3559)

    * solubility table

    * fields table

    * load balancing

    * set mesh partitioner smaller and removed some info if rank size = 1

    * improve CO2 solubility

commit 2404873
Author: Arnaud DUDES <155963334+arng40@users.noreply.github.com>
Date:   Tue Apr 15 00:45:04 2025 +0200

    refactor: FieldSpecification context when targeting wrong fieldName (#3508)

    * add specific fieldName when enter wrong name

    * remove char const and set pstringstream

    * attempt n°3 to output fieldName error

commit 10f0a21
Author: Brian Han <han12@llnl.gov>
Date:   Mon Apr 14 12:45:56 2025 -0700

    build: Update RAJA suite to v2025.03.0 (#3613)

    * update tag

    * Update geos spack-generated host-configs

    * Update LvArray submodule

commit 679b39c
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Mon Apr 14 09:46:30 2025 +0200

    ⚰️ removed dead attribute "parallelThreads" from exemples

commit 651a6c7
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Fri Apr 11 14:07:14 2025 +0200

    📦 the schema

commit 8adab2a
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Fri Apr 11 14:07:07 2025 +0200

    🐛 ♻️ used unique ptrs to build the formatters

commit e9e6d7d
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 10 18:14:23 2025 +0200

    ✨ adding multiple memory output possibility during simulation
    todo : call setCurrentCycle() for the ultimate call

commit 9446be7
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 10 16:58:46 2025 +0200

    🎨 🐛 finished implementation of MemoryStatsOutput

commit 09973c3
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 10 11:04:24 2025 +0200

    🐛 adapting header usage

commit 5656c1a
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 10 09:50:55 2025 +0200

    🐛 minor refactor

commit ae83b90
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Thu Apr 10 09:28:25 2025 +0200

    🐛 wrong include

commit e8ca7b5
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:35:14 2025 +0200

    ✨ Adding MemoryStatsOutput to CMakeLists

commit 0e5758c
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:34:41 2025 +0200

    🐛 various fixes

commit acea035
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:29:19 2025 +0200

    🐛 please don't look

commit f5d5763
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:25:29 2025 +0200

    🐛 constness

commit 4b5efc2
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:22:03 2025 +0200

    🐛 messed some parameters

commit 7a00b83
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 17:10:51 2025 +0200

    🐛 forgot some GEOS_FMT

commit 2434f0f
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 16:55:55 2025 +0200

    🐛 adding specification of isNewlyOpened

commit 2a2e40f
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 16:32:55 2025 +0200

    ♻️ moved implementation of "parallelThread" code from OutputBase to SiloOutput as it is not useful on any other sub-class

commit 1c68d5c
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 16:12:02 2025 +0200

    ♻️ moved "parallelThread" code from OutputBase to SiloOutput as it is not useful on any other sub-class

commit cf3cf92
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 16:07:51 2025 +0200

    ✨ Adding "MemoryStats" to add to "Outputs" to control the umpire stats output

commit ace69ef
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 15:57:32 2025 +0200

    ♻️ minor refactor

commit 143eb00
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 15:37:53 2025 +0200

    🗑️ TODO, remove inherited SILO code

commit 634bc0b
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 15:36:59 2025 +0200

    🐛 wrong accessors for MemoryLogging

commit 9e8ebba
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 15:10:06 2025 +0200

    📦 P4 down so let's try to write the desired schema by hand?

commit 9ffa983
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 14:44:12 2025 +0200

    ✨ adding error aware stream-to-file functions for ouputing CSV memory stats tables

commit 7e7463a
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 14:42:39 2025 +0200

    🎨 minor changes

commit 8b85058
Author: MelReyCG <melvin.rey@capgemini.com>
Date:   Wed Apr 9 10:38:00 2025 +0200

    ✨ Added a MemoryLoging singleton component to manage the output of memory stats (umpire) with more flexibility

commit e09f499
Author: Matteo Cusini <49037133+CusiniM@users.noreply.github.com>
Date:   Mon Apr 7 11:03:53 2025 -0700

    fix: Fix runtime cuda error. (#3617)

    * fix: Fix runtime cuda error.

    * fix another similar error.

    * Update src/coreComponents/fieldSpecification/TractionBoundaryCondition.cpp

commit 2e206c1
Author: Ben Corbett <32752943+corbett5@users.noreply.github.com>
Date:   Sat Apr 5 11:28:59 2025 -0700

    fix: Fixed leaks in ArrayOfArrays and MeshLevel. (#3602)

    * Fixed leaks in ArrayOfArrays and MeshLevel.

    * submodule update

    * Updated LvArray

    ---------

    Co-authored-by: Matteo Cusini <49037133+CusiniM@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ci: run code coverage enables running of the code coverage CI jobs ci: run CUDA builds Allows to triggers (costly) CUDA jobs ci: run integrated tests Allows to run the integrated tests in GEOS CI flag: no rebaseline Does not require rebaseline type: feature New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[EPIC] Improve feedback to user on XML errors
4 participants