iri2016 icon indicating copy to clipboard operation
iri2016 copied to clipboard

IRI2016 NOT readily accessible from Matlab - cmake.setup missing

Open PeterBetlem opened this issue 1 year ago • 2 comments

Bug

Cloning the master branch and running "TestAll" in MatLab results in the following error:

CMake Error: Cannot find file: ./iri2016-master/iri2016-master/src/iri2016/setup.cmake

This file is not present in the current repo, and older versions do not seem to have the desired effect.

Solution

  • Provide setup.cmake that works
  • Provide additional documentation on how to run the code correctly (from the master branch or otherwise).

Log and system details

  • operating system: Windows 11/Matlab 2022b
  • compiler & version: See log below.

Error Log:

Running iri2016.TestUnit Setting up iri2016.TestUnit Done setting up iri2016.TestUnit in 0 seconds Running iri2016.TestUnit/test_simple cmake version 3.27.2

CMake suite maintained and supported by Kitware (kitware.com/cmake).

  • Extra verbosity turned on Reading Script: ./iri2016-master/iri2016-master/src/iri2016/setup.cmake CMake Error: Cannot find file: ./iri2016-master/iri2016-master/src/iri2016/setup.cmake

================================================================================ Error occurred in iri2016.TestUnit/test_simple and it did not run to completion. --------- Error ID: --------- '' -------------- Error Details: -------------- Error using assert error building with CMake

Error in cmake (line 15)
assert(system(cmd) == 0, 'error building with CMake')

Error in iri2016.iri2016 (line 16)
  cmake(srcdir)

Error in iri2016.TestUnit/test_simple (line 11)
iono = iri2016.iri2016(time, glat, glon, altkmrange);

================================================================================ Done iri2016.TestUnit/test_simple in 0.38063 seconds Tearing down iri2016.TestUnit Done tearing down iri2016.TestUnit in 0 seconds Done iri2016.TestUnit in 0.38063 seconds


Failure Summary:

 Name                          Failed  Incomplete  Reason(s)
=============================================================
 iri2016.TestUnit/test_simple    X         X       Errored.

Error using assert At least one test failed in the test session.

Error in matlab.unittest.internal.BaseTestResult/assertSuccess (line 125) assert(~any([resultArray.Failed]),message('MATLAB:unittest:TestResult:UnsuccessfulRun'));

Error in TestAll (line 23) assertSuccess(results)

Error in run (line 91) evalin('caller', strcat(script, ';'));

PeterBetlem avatar Sep 21 '23 13:09 PeterBetlem

I was able to get it working, but had to go download the 1.11.1 from the release page and copied the setup.cmake from there into my other folder.

ty-watkins avatar Mar 15 '24 19:03 ty-watkins

Also, the returned value for the TestUnit.m wasn't within the 1e-4 tolerance for the matlab.unittest so I changed it to 1e-3 to get it to pass. Maybe the comparison value was never updated after adding the 2020 .dat files?

ty-watkins avatar Mar 15 '24 20:03 ty-watkins