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

Add AEC compression #753

Merged
merged 23 commits into from
Sep 24, 2024
Merged

Conversation

AlysonStahl-NOAA
Copy link
Contributor

Fixes #705
Fixes #458

@AlysonStahl-NOAA
Copy link
Contributor Author

I believe this will work after NOAA-EMC/NCEPLIBS-g2c#512 is merged

@AlysonStahl-NOAA
Copy link
Contributor Author

I could only get the spack workflow to work if I turn aec default=False. Otherwise, I get the error below.

==> Error: ProcessError: Command exited with status 2:
    'make' '-j2' 'test'

3 warnings found in build log:
     25     -- Copying test file ref_gdaswave.t00z.wcoast.0p16.f000.grb2index2
     26     -- Copying test file g1.grib2
     27     -- Copying test file gdaswave.t00z.wcoast.0p16.f000.grib2
     28     -- Copying test file ref_test_jpcpack_4_output.txt
     29     -- Configuring done (0.4s)
     30     -- Generating done (0.1s)
  >> 31     CMake Warning:
     32       Manually-specified variables were not used by the project:
     33     
     34         CMAKE_POLICY_DEFAULT_CMP0090
     35         G2C_COMPARE
     36     
     37     

     ...

     120    
     121      678 |      call simunpack(cgrib(ipos), lensec-5, idrstmpl, ndpts,
             fld)
     122          |                                                            
            2
     123    ......
     124      686 |      call simunpack(cgrib(ipos), lensec-5, idrstmpl, ndpts-
            1, fld(2))
     125          |                                                            
              1
  >> 126    Warning: Element of assumed-shape or pointer array as actual argume
            nt at (1) cannot correspond to actual argument at (2)
     127    [ 19%] Building Fortran object src/CMakeFiles/g2_4_f.dir/g2create.F
            90.o
     128    cd /tmp/runner/spack-stage/spack-stage-g2-develop-w4caohczsnsc3axnf
            hyjqont476hjnpg/spack-build-w4caohc/src && /home/runner/work/NCEPLI
            BS-g2/NCEPLIBS-g2/spack-root/lib/spack/env/gcc/gfortran -DKIND=4 -D
            USE_AEC  -g -funroll-loops  -fallow-argument-mismatch -O3 -Jinclude
            _4 -c /home/runner/work/NCEPLIBS-g2/NCEPLIBS-g2/spack-devpkg-g2/src
            /g2create.F90 -o CMakeFiles/g2_4_f.dir/g2create.F90.o
     129    /home/runner/work/NCEPLIBS-g2/NCEPLIBS-g2/spack-devpkg-g2/src/g2cre
            ate.F90:446:18:
     130    
     131      442 |      call simpack(pfld, ndpts, idrstmpl, cpack, lcpack)
     132          |                  2
     133    ......
     134      446 |      call simpack(pfld(2), ndpts-1, idrstmpl, cpack, lcpack
            )
     135          |                  1
  >> 136    Warning: Element of assumed-shape or pointer array as actual argume
            nt at (1) cannot correspond to actual argument at (2)
     137    [ 20%] Building Fortran object src/CMakeFiles/g2_4_f.dir/g2sim.F90.
            o
     138    cd /tmp/runner/spack-stage/spack-stage-g2-develop-w4caohczsnsc3axnf
            hyjqont476hjnpg/spack-build-w4caohc/src && /home/runner/work/NCEPLI
            BS-g2/NCEPLIBS-g2/spack-root/lib/spack/env/gcc/gfortran -DKIND=4 -D
            USE_AEC  -g -funroll-loops  -fallow-argument-mismatch -O3 -Jinclude
            _4 -c /home/runner/work/NCEPLIBS-g2/NCEPLIBS-g2/spack-devpkg-g2/src
            /g2sim.F90 -o CMakeFiles/g2_4_f.dir/g2sim.F90.o
     139    /usr/local/bin/cmake -E touch src/CMakeFiles/g2_4_f.dir/drstemplate
            s.F90.o.provides.build
     140    /usr/local/bin/cmake -E touch src/CMakeFiles/g2_4_f.dir/g2grids.F90
            .o.provides.build
     141    /usr/local/bin/cmake -E touch src/CMakeFiles/g2_4_f.dir/g2logging.F
            90.o.provides.build
     142    /usr/local/bin/cmake -E touch src/CMakeFiles/g2_4_f.dir/gribmod.F90
            .o.provides.build

See build log for details:
  /tmp/runner/spack-stage/spack-stage-g2-develop-w4caohczsnsc3axnfhyjqont476hjnpg/spack-build-out.txt

See test log for details:
  /tmp/runner/spack-stage/spack-stage-g2-develop-w4caohczsnsc3axnfhyjqont476hjnpg/install-time-test-log.txt

Error: Process completed with exit code 1.

@AlysonStahl-NOAA AlysonStahl-NOAA marked this pull request as ready for review September 24, 2024 17:17
@edwardhartnett
Copy link
Contributor

THese are two persistent warnings in g2 which I have not fixed. If you fix them, these errors will go away.

@AlexanderRichert-NOAA
Copy link
Contributor

The warnings are not the cause of the failure, it seems to be an issue with the unit tests. I'm looking into this now.

@AlexanderRichert-NOAA
Copy link
Contributor

I tweaked the Spack test action to provide the CTest output on failure. If you look at the LastTest.log in https://github.com/NOAA-EMC/NCEPLIBS-g2/actions/runs/11019572999/artifacts/1973272854 you'll see that it's failing on test_aecpack_d on STOP 6:

38/40 Testing: test_aecpack_d
38/40 Test: test_aecpack_d
Command: "/tmp/runner/spack-stage/spack-stage-g2-develop-7ssidmxvtjipiymvihcdx4rzwnf66acd/spack-build-7ssidmx/tests/test_aecpack_d"
Directory: /tmp/runner/spack-stage/spack-stage-g2-develop-7ssidmxvtjipiymvihcdx4rzwnf66acd/spack-build-7ssidmx/tests
"test_aecpack_d" start time: Sep 24 18:40 UTC
Output:
----------------------------------------------------------
 Testing aecpack()/aecunpack()...
 Testing aecpack/aecunpack with no data...
 lcpack:            0
 ok!
 Testing aecpack/aecunpack with constant data...
 ok!
 Testing aecpack/aecunpack with data...
   2.0000000000000000        1.0000000000000000      do not match
STOP 6
<end of output>
Test time =   0.00 sec

@AlysonStahl-NOAA
Copy link
Contributor Author

I tweaked the Spack test action to provide the CTest output on failure. If you look at the LastTest.log in https://github.com/NOAA-EMC/NCEPLIBS-g2/actions/runs/11019572999/artifacts/1973272854 you'll see that it's failing on test_aecpack_d on STOP 6:

This test was failing due to the issue I addressed in NOAA-EMC/NCEPLIBS-g2c#512. I forced it to use the develop branch of g2c when aec is on which fixed it.

@edwardhartnett edwardhartnett merged commit acaaa0c into NOAA-EMC:develop Sep 24, 2024
47 checks passed
@AlysonStahl-NOAA AlysonStahl-NOAA deleted the as_aec2 branch September 24, 2024 19:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
3 participants