Skip to content
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

bump PartMC submodule version to >v2.8.0 (and as a result add hdf5 as submodule + perl as build-time dependency) #353

Merged
merged 29 commits into from
Apr 21, 2024

Conversation

slayoo
Copy link
Member

@slayoo slayoo commented Apr 10, 2024

No description provided.

@slayoo
Copy link
Member Author

slayoo commented Apr 12, 2024

@jcurtis2, let me ask you for help with addressing the following error due to changes in the WRF-related PR in PartMC:

    [ 88%] Building Fortran object CMakeFiles/_PyPartMC.dir/src/aero_dist.F90.o
    /home/user/devel/PyPartMC/src/aero_dist.F90:41:67:
    
       41 |     call spec_file_read_aero_dist(file, aero_data_ptr_f, aero_dist)
          |                                                                   1
    Error: Type mismatch in argument ‘read_aero_weight_classes’ at (1); passed TYPE(aero_dist_t) to LOGICAL(4)

@slayoo
Copy link
Member Author

slayoo commented Apr 15, 2024

thanks @jcurtis2!
now, we've reached the netCDF issue:

============================================================================================= short test summary info =============================================================================================
FAILED tests/test_aero_particle.py::TestAeroParticle::test_least_create_time - assert False
FAILED tests/test_output.py::TestOutput::test_output_netcdf - RuntimeError: -1399732236
FAILED tests/test_output.py::TestOutput::test_input_netcdf - RuntimeError: -1399732236
FAILED tests/test_run_part.py::TestRunPart::test_run_part - RuntimeError: -1399732236
FAILED tests/test_run_part.py::TestRunPart::test_run_part_timestep - RuntimeError: -1399732236
FAILED tests/test_run_part.py::TestRunPart::test_run_part_timeblock - RuntimeError: -1399732236
FAILED tests/test_run_part.py::TestRunPart::test_run_part_do_condensation - RuntimeError: -1399732236
=============================================================================== 7 failed, 262 passed, 1 skipped, 7 xfailed in 1.53s ===============================================================================
WARNING (PartMC-233517437): input H2O molec_weight not equal to const%water_molec_weight (18.000000000000000000 /= 0.17999999999999998640E-01)
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_output_netcdf0/test_0001_00000001.nc for writing : 
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_input_netcdf0/test_0001_00000001.nc for writing : 
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_run_part0/test_0001_00000001.nc for writing : 
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_run_part_timestep0/test_0001_00000001.nc for writing : 
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_run_part_timeblock0/test_0001_00000001.nc for writing : 
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.
ERROR (PartMC-701841139): opening /tmp/pytest-of-user/pytest-0/test_run_part_do_condensation0/test_0001_00000001.nc for writing :
    NetCDF: Attempt to use feature that was not turned on when netCDF was built.

I'll look at it this week.

@slayoo
Copy link
Member Author

slayoo commented Apr 20, 2024

@jcurtis2 seems HDF5 is now OK!

The current CI failure is due to:

___________________ TestAeroParticle.test_least_create_time ____________________

    @staticmethod
    def test_least_create_time():
        # arrange
        create_time = 44.0
        aero_data = ppmc.AeroData(AERO_DATA_CTOR_ARG_MINIMAL)
        aero_dist = ppmc.AeroDist(aero_data, AERO_DIST_CTOR_ARG_MINIMAL)
        aero_state = ppmc.AeroState(aero_data, *AERO_STATE_CTOR_ARG_MINIMAL)
        _ = aero_state.dist_sample(aero_dist, 1.0, create_time)
    
        # act
        time = []
        for i_part in range(len(aero_state)):
            time.append(aero_state.particle(i_part).least_create_time)
    
        # assert
>       assert np.all(np.isclose(time, create_time))
E       assert False
E        +  where False = <function all at 0x7f2681b9ed70>(array([False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False]))
E        +    where <function all at 0x7f2681b9ed70> = np.all
E        +    and   array([False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False,\n       False, False, False, False, False, False, False, False, False]) = <function isclose at 0x7f2681baeef0>([0.0, 0.0, 0.0, 0.0, 0.0, 0.0, ...], 44.0)
E        +      where <function isclose at 0x7f2681baeef0> = np.isclose

tests/test_aero_particle.py:602: AssertionError

Let me ask you for help here, thanks
S.

@jcurtis2
Copy link
Member

Looks like 260aa25 accidentally undid a bug fix for the least_create_time (compdyn/partmc#197) on the PartMC side pointing it back to the 2.8.0 commit. Should be fixed now and all tests should pass!

Thanks for getting HDF5 in!

@slayoo
Copy link
Member Author

slayoo commented Apr 20, 2024

Thanks for fixing it, and sorry for causing it (must have messed something up on pull/merge?)
Will commit the missing MANIFEST items and merge + release

@slayoo slayoo changed the title bump PartMC submodule version to v2.8.0 bump PartMC submodule version to v2.8.0 (and as a result add hdf5 as submodule + perl as build-time dependency) Apr 21, 2024
@slayoo slayoo changed the title bump PartMC submodule version to v2.8.0 (and as a result add hdf5 as submodule + perl as build-time dependency) bump PartMC submodule version to >v2.8.0 (and as a result add hdf5 as submodule + perl as build-time dependency) Apr 21, 2024
@slayoo slayoo merged commit 4544030 into open-atmos:main Apr 21, 2024
37 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants