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

test_set_interior: clean up .travis.yml #18

Open
mnlevy1981 opened this issue Aug 2, 2019 · 6 comments
Open

test_set_interior: clean up .travis.yml #18

mnlevy1981 opened this issue Aug 2, 2019 · 6 comments

Comments

@mnlevy1981
Copy link
Owner

  1. Any reason to continue to test with python 2?

  2. Can we split up run_all_tests.sh to make it a little easier to find output from tests that fail? I'm thinking something like

    • run_all_infrastructure_tests.sh to make sure all the python code works
    • run_build_tests.sh to make sure the build system works
    • run_examples.sh to make sure the "tests" that are just "run the model in different configurations" sanity checks work
    • run_unit_tests.sh to run the unit tests
    • run_regression_tests.sh to run compute_cols (currently the only true regression test, or will be once the baseline is committed to the repo)
@mnlevy1981
Copy link
Owner Author

It turns out that Travis is running an old version of gfortran (4.8.4) and I'm having trouble updating to something more recent while still supporting netCDF. This issue is reproducible on hobart:

$ cd $MARBL_ROOT/tests/driver_src
$ module load compiler/gnu/4.8.5
$ export PATH=/usr/local/netcdf-c-4.6.1-f-4.4.4-gcc-g++-gfortran-4.8.5/bin:$PATH
$ export LD_LIBRARY_PATH=/usr/local/netcdf-c-4.6.1-f-4.4.4-gcc-g++-gfortran-4.8.5/lib:$LD_LIBRARY_PATH
$ make USE_NETCDF=TRUE
$ cd ../regression_tests/compute_cols/
$ ../../driver_exe/marbl.exe -i ../../input_files/settings/marbl_with_o2_consumption_scalef.input -n test.nml

An easy way to see the problem is to look at the variable photoC_diat_zint in the history output. From the above set of commands:

$ ncdump -v photoC_diat_zint history_1inst.nc | tail -n 4
data:

 photoC_diat_zint = 0, 1.0142560690187e-311, 0, Infinity, Infinity ;
}

Meanwhile, just running

$ ./compute_cols.py --compiler gnu # v8.1.0
$ ncdump -v photoC_diat_zint history_1inst.nc | tail -n 4

 photoC_diat_zint = 0.0253156906580491, 0.0322866652495998, 0,
    0.0054540503475565, 0.00624035209750951 ;
}

Although it's worth noting that NAG doesn't like something:

$ ./compute_cols.py 
...
(run_exe): Running following command:
(run_exe): /home/mlevy/codes/MARBL/tests/driver_exe/marbl.exe -n test.nml -i ../../input_files/settings/marbl_with_o2_consumption_scalef.input
Beginning compute_cols test...
Runtime Error: *** Arithmetic exception: Floating invalid operation - aborting
(run_exe): ERROR in executable

So maybe this is actually a Fortran issue that is being masked by some compilers?

@mnlevy1981
Copy link
Owner Author

Although it's worth noting that NAG doesn't like something:

$ ./compute_cols.py 
...
(run_exe): Running following command:
(run_exe): /home/mlevy/codes/MARBL/tests/driver_exe/marbl.exe -n test.nml -i ../../input_files/settings/marbl_with_o2_consumption_scalef.input
Beginning compute_cols test...
Runtime Error: *** Arithmetic exception: Floating invalid operation - aborting
(run_exe): ERROR in executable

So maybe this is actually a Fortran issue that is being masked by some compilers?

Per 4365a66 this was a problem with how nag handled netCDF fill values and is unrelated to the gfortran 4.8 problems.

@mnlevy1981
Copy link
Owner Author

I think this is related to the gfortran bug Keith reported. We have an associate statement in comp_co2calc_coeffs() that looks like

    associate(                         &
         k0  => co2calc_coeffs(:)%k0,  &
         k1  => co2calc_coeffs(:)%k1,  &
         k2  => co2calc_coeffs(:)%k2,  &
         ff  => co2calc_coeffs(:)%ff,  &
         kw  => co2calc_coeffs(:)%kw,  &
         kb  => co2calc_coeffs(:)%kb,  &
         ks  => co2calc_coeffs(:)%ks,  &
         kf  => co2calc_coeffs(:)%kf,  &
         k1p => co2calc_coeffs(:)%k1p, &
         k2p => co2calc_coeffs(:)%k2p, &
         k3p => co2calc_coeffs(:)%k3p, &
         ksi => co2calc_coeffs(:)%ksi, &
         bt  => co2calc_coeffs(:)%bt,  &
         st  => co2calc_coeffs(:)%st,  &
         ft  => co2calc_coeffs(:)%ft,  &
         temp => co2calc_state_in(:)%temp, &
         salt => co2calc_state_in(:)%salt  &
         )

and if I try to print out salt vs co2calc_state_in(:)%salt I get the following in NAG

 salt associate  33.5247993469238281  33.8219146728515625  30.6386947631835938  36.8080024719238281  34.5447998046875000
 salt in type  33.5247993469238281  33.8219146728515625  30.6386947631835938  36.8080024719238281  34.5447998046875000

but something totally different from old GNU

 salt associate   33.524799346923828        2156.2094726562500        2347.8051757812500        1.7406085729598999        19.125383377075195
 salt in type   33.524799346923828        33.821914672851562        30.638694763183594        36.808002471923828        34.544799804687500

@mnlevy1981
Copy link
Owner Author

mnlevy1981 commented Aug 3, 2019

So

  1. I don't think Keith's bug (linked above) was fixed
  2. This is a different bug, and is only in 4.8

See this toy repo for details on both points.

@mnlevy1981
Copy link
Owner Author

I have opened #19 to reference the gfortran bug. As for .travis.yml, I haven't made any changes regarding how the results are reported (yet)

@mnlevy1981
Copy link
Owner Author

Yesterday I noticed that travis tests weren't updating... I found a forum post and followed the recommendation of revoking rights then reinstating them, and that seemed to fix things.

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

No branches or pull requests

1 participant