Skip to content

Commit 04c119d

Browse files
committed
try #2 Fix hang on simulating Nvidia GPU hardware when not available on computer physically
1 parent 998a8ec commit 04c119d

File tree

2 files changed

+17
-3
lines changed

2 files changed

+17
-3
lines changed

pwiz_tools/Skyline/Model/Tools/PythonInstaller.cs

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,22 @@ public static string GetInstallNvidiaLibrariesBat()
110110
{
111111
return InstallNvidiaLibrariesBat;
112112
}
113-
public bool? NvidiaGpuAvailable { get; internal set; }
113+
114+
private bool? _NvidiaGpuAvailable;
115+
public bool? NvidiaGpuAvailable
116+
{
117+
get
118+
{
119+
if (SimulatedInstallationState == eSimulatedInstallationState.NONVIDIASOFT) return true;
120+
return _NvidiaGpuAvailable;
121+
}
122+
123+
internal set
124+
{
125+
_NvidiaGpuAvailable = value;
126+
}
127+
}
128+
114129
public int NumTotalTasks { get; set; }
115130
public int NumCompletedTasks { get; set; }
116131
public string PythonVersion { get; }

pwiz_tools/Skyline/TestPerf/AlphapeptdeepBuildLibraryTest.cs

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@
2525
using pwiz.Skyline.SettingsUI;
2626
using pwiz.Skyline.Util;
2727
using pwiz.SkylineTestUtil;
28-
using static pwiz.Skyline.FileUI.PeptideSearch.ImportPeptideSearchDlg;
2928

3029
namespace TestPerf
3130
{
@@ -163,7 +162,7 @@ private void TestResultingLibByValues()
163162
{
164163
using (var productReader = new StreamReader(product))
165164
{
166-
AssertEx.FieldsEqual(productReader, answerReader, 13, null, true, 0, 1e-6);
165+
AssertEx.FieldsEqual(productReader, answerReader, 13, null, true, 0, 1e-3);
167166
}
168167
}
169168
}

0 commit comments

Comments
 (0)