Skip to content

Commit

Permalink
Fixed a problem that occurs in multithreading scheduling when only
Browse files Browse the repository at this point in the history
one of the sections "electrical-parameters" or "physical-parameters"
is present (also if neither is present).  The code was making the
assumption that both exist and was looking for a list of two
results.
  • Loading branch information
RTimothyEdwards committed Mar 15, 2024
1 parent 6f90e21 commit 681b554
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 7 deletions.
2 changes: 1 addition & 1 deletion cace/__version__.py
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.
__version__ = '2.1.9'
__version__ = '2.1.10'

if __name__ == '__main__':
print(__version__, end='')
13 changes: 7 additions & 6 deletions cace/cace_cli.py
Original file line number Diff line number Diff line change
Expand Up @@ -492,14 +492,15 @@ def cace_run(datasheet, paramname=None):
print('cace_run_all_[e|p]param failed with exception:')
print(e)
presult = None
if presult:
poolresult.append(presult)
poolresult.append(presult)

# The pool results may arrive in either order, so arrange them properly.
idx0 = poolresult[0][0]
idx1 = poolresult[1][0]
datasheet['electrical_parameters'] = poolresult[idx0][1:]
datasheet['physical_parameters'] = poolresult[idx1][1:]
if poolresult[0]:
idx0 = poolresult[0][0]
datasheet['electrical_parameters'] = poolresult[idx0][1:]
if poolresult[1]:
idx1 = poolresult[1][0]
datasheet['physical_parameters'] = poolresult[idx1][1:]

return datasheet

Expand Down

0 comments on commit 681b554

Please sign in to comment.