MDSplus / mdsplus

The MDSplus data management system
https://mdsplus.org/
Other
75 stars 46 forks source link

DIII-D's alpha-7-139-59 has a MATLAB mdsput() bug regarding the returned status #2836

Open mwinkel-dev opened 1 week ago

mwinkel-dev commented 1 week ago

Affiliation DIII-D (submitted via email)

Version(s) Affected The "alpha-7-139-59" version that is installed on GA's Omega server.

Platform(s) RHEL8 (probably)

Installation Method(s) Installed by GA using their standard procedure.

Describe the bug The matlab/mdsput.m function is returning the result instead of the status.

To Reproduce

Expected behavior The status should always be 0 or 1. It should never be the result of evaluating the TDI expression.

Screenshots n/a

Additional context

  1. This appears to be related to the APD (array of pointers to descriptors) change made by PR #2661.
  2. A review of the source code indicates this is probably fixed in more recent versions of the alpha branch.
  3. Experiments with the alpha-7-139-59 branch are required to confirm the above two points.
mwinkel-dev commented 1 week ago

The automated test suite for MATLAB should include tests of the status returned by mdsput().

mwinkel-dev commented 1 week ago

Testing with alpha-7-148-2 on Ubuntu24 with MATLAB R2023b using the Java bridge worked OK. However, when exceptions were thrown, no status was returned. Also, must test with the Python bridge.

Encountered problems compiling alpha-7-139-59 for Ubuntu24, thus will have to investigate other options for testing mdsput() with that version of MDSplus.

ModestMC commented 6 days ago

Is there a way I can view the automated test suite?

mwinkel-dev commented 3 hours ago

Hi @ModestMC -- Yes, all tests are in the MDSplus repo. However, they are scattered around in various directories (i.e., typically in the testing subdirectory of all APIs and features).

You can find the existing MATLAB tests in matlab/testing. Note that some tests are MATLAB scripts, *.m files. And there is also a Python run_tests.py script.

The MATLAB tests are similar to the IDL tests. However, to the best of my knowledge, the MATLAB tests have still not been activated in the nightly builds. (MATLAB is commercial software and thus we need to get a dedicated MATLAB license for use on the build server.)

After dealing with some interrupts, I am now again working on this issue. My goal is to find the exact commit that fixes the issue reported in the alpha-7-139-59 version.