-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
json output for frequency data (#488)
- add docs - add variorum_get_frequency_json function interfaces - supports Intel CPUs, AMD CPUs, IBM Power9 CPUs, AMD GPUs, nVidia GPUs --------- Co-authored-by: Kyle Fan <[email protected]>
- Loading branch information
Showing
42 changed files
with
712 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,45 @@ | ||
// Copyright 2019-2023 Lawrence Livermore National Security, LLC and other | ||
// Variorum Project Developers. See the top-level LICENSE file for details. | ||
// | ||
// SPDX-License-Identifier: MIT | ||
|
||
#include <getopt.h> | ||
#include <stdio.h> | ||
#include <stdlib.h> | ||
|
||
#include <variorum.h> | ||
|
||
int main(int argc, char **argv) | ||
{ | ||
int ret; | ||
|
||
const char *usage = "Usage: %s [-h] [-v]\n"; | ||
int opt; | ||
while ((opt = getopt(argc, argv, "hv")) != -1) | ||
{ | ||
switch (opt) | ||
{ | ||
case 'h': | ||
printf(usage, argv[0]); | ||
return 0; | ||
case 'v': | ||
printf("%s\n", variorum_get_current_version()); | ||
return 0; | ||
default: | ||
fprintf(stderr, usage, argv[0]); | ||
return -1; | ||
} | ||
} | ||
char *s = NULL; | ||
ret = variorum_get_node_frequency_json(&s); | ||
if (ret != 0) | ||
{ | ||
printf("Variorum get frequency json failure!\n"); | ||
free(s); | ||
exit(-1); | ||
} | ||
puts(s); | ||
free(s); | ||
|
||
return ret; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.