Skip to content

Commit

Permalink
fix: symbol resolution
Browse files Browse the repository at this point in the history
  • Loading branch information
kevmo314 committed Sep 13, 2024
1 parent 9b1739a commit 980b8de
Showing 1 changed file with 2 additions and 8 deletions.
10 changes: 2 additions & 8 deletions client.cu
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@
#include <nvml.h>
#include <unistd.h>
#include <pthread.h>
#include <atomic>

int sockfd;

Expand Down Expand Up @@ -123,17 +122,12 @@ nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int len
return send_rpc_message((void **)&name, (int *)&length, "nvmlDeviceGetName", (void *)&device, sizeof(nvmlDevice_t));
}

nvmlReturn_t nvmlDeviceGetName(nvmlDevice_t device, char *name, unsigned int length)
{
// write "HI MUGIT" to the name buffer
strcpy(name, "HI MUGIT");
return NVML_SUCCESS;
}

void *dlsym(void *handle, const char *name)
{
printf("Resolving symbol: %s\n", name);

if (!strcmp(name, "nvmlInitWithFlags"))
return (void *)nvmlInitWithFlags;
if (!strcmp(name, "nvmlDeviceGetName"))
return (void *)nvmlDeviceGetName;

Expand Down

0 comments on commit 980b8de

Please sign in to comment.