From 44a7bbd9a9dfdd1cd3f4add359476e1295fae2a8 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Apr 2024 13:41:30 -0700 Subject: [PATCH 1/3] client: if GPU is missing, discard app versions and results that refer to it. This addresses an issue introduced when we changed GPU names from (e.g.) 'Apple M3 Pro' to 'apple_gpu'. Note: this means that if a host has in-progress jobs using a discrete GPU, and you remove that GPU, those jobs will be discarded. This is a change, which I think is good because otherwise you'd get error messages forever. --- client/cs_statefile.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index 323728bc6d..de998e4b23 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -294,9 +294,11 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) { } if (avp->missing_coproc) { msg_printf(project, MSG_INFO, - "Application uses missing %s GPU", + "App version uses missing GPU '%s' - discarding", avp->missing_coproc_name ); + delete avp; + continue; } retval = link_app_version(project, avp); if (retval) { From 35c1539a9c9288c9d2a15f996c5a297b53764b75 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 11 Apr 2024 14:44:20 -0700 Subject: [PATCH 2/3] client: if GPU missing, discard app version only if the name is "Apple *". --- client/cs_statefile.cpp | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index de998e4b23..e414088c2e 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -297,8 +297,10 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) { "App version uses missing GPU '%s' - discarding", avp->missing_coproc_name ); - delete avp; - continue; + if (strstr(avp->missing_coproc_name, "Apple ")) { + delete avp; + continue; + } } retval = link_app_version(project, avp); if (retval) { From 7f6d2deffab87876c2f0c669b3cbc3ebeafc7107 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Mon, 15 Apr 2024 02:43:57 -0700 Subject: [PATCH 3/3] Fix messages for missing / deprecated GPUs --- client/cs_statefile.cpp | 13 +++++++++---- 1 file changed, 9 insertions(+), 4 deletions(-) diff --git a/client/cs_statefile.cpp b/client/cs_statefile.cpp index e414088c2e..8e44aca305 100644 --- a/client/cs_statefile.cpp +++ b/client/cs_statefile.cpp @@ -293,13 +293,18 @@ int CLIENT_STATE::parse_state_file_aux(const char* fname) { } } if (avp->missing_coproc) { - msg_printf(project, MSG_INFO, - "App version uses missing GPU '%s' - discarding", - avp->missing_coproc_name - ); if (strstr(avp->missing_coproc_name, "Apple ")) { + msg_printf(project, MSG_INFO, + "App version uses deprecated GPU type '%s' - discarding", + avp->missing_coproc_name + ); delete avp; continue; + } else { + msg_printf(project, MSG_INFO, + "App version uses missing GPU '%s'", + avp->missing_coproc_name + ); } } retval = link_app_version(project, avp);