Skip to content

Commit bd8e397

Browse files
authored
Resolving graph500 compilation issue (#222)
* resolving graph500 compilation issue * resolving comments * default flags
1 parent befcaa6 commit bd8e397

File tree

2 files changed

+25
-11
lines changed

2 files changed

+25
-11
lines changed

src/VirtualClient/VirtualClient.Actions/Graph500/Graph500Executor.cs

Lines changed: 14 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,19 @@ public string EdgeFactor
6565
}
6666
}
6767

68+
/// <summary>
69+
/// The compilerFlags that are used for make command in compiling Graph500 using mpicc compiler.
70+
/// Mpich installs a specific version of mpicc compiler by default.
71+
/// </summary>
72+
public string CompilerFlags
73+
{
74+
get
75+
{
76+
this.Parameters.TryGetValue(nameof(Graph500Executor.CompilerFlags), out IConvertible compilerFlags);
77+
return compilerFlags?.ToString();
78+
}
79+
}
80+
6881
/// <summary>
6982
/// The path to the Graph500 executable file.
7083
/// </summary>
@@ -95,7 +108,7 @@ protected override async Task ExecuteAsync(EventContext telemetryContext, Cancel
95108
{
96109
using (BackgroundOperations profiling = BackgroundOperations.BeginProfiling(this, cancellationToken))
97110
{
98-
await this.ExecuteCommandAsync("make", null, this.PackageDirectory, cancellationToken);
111+
await this.ExecuteCommandAsync("make", this.CompilerFlags, this.PackageDirectory, cancellationToken);
99112

100113
using (IProcessProxy process = await this.ExecuteCommandAsync(this.ExecutableFilePath, this.Scale + " " + this.EdgeFactor, this.PackageDirectory, telemetryContext, cancellationToken))
101114
{

src/VirtualClient/VirtualClient.Main/profiles/PERF-GRAPH500.json

Lines changed: 11 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -5,19 +5,20 @@
55
"SupportedPlatforms": "linux-x64,linux-arm64",
66
"SupportedOperatingSystems": "CBL-Mariner,CentOS,Debian,RedHat,Suse,Ubuntu"
77
},
8-
"Parameters": {
9-
"Scale": "10",
10-
"EdgeFactor": "16"
11-
},
8+
"Parameters": {
9+
"Scale": "10",
10+
"EdgeFactor": "16"
11+
},
1212
"Actions": [
1313
{
1414
"Type": "Graph500Executor",
15-
"Parameters": {
16-
"Scenario": "GraphAlgorithms",
17-
"PackageName": "graph500",
18-
"Scale": "$.Parameters.Scale",
19-
"EdgeFactor": "$.Parameters.EdgeFactor"
20-
}
15+
"Parameters": {
16+
"Scenario": "GraphAlgorithms",
17+
"PackageName": "graph500",
18+
"Scale": "$.Parameters.Scale",
19+
"EdgeFactor": "$.Parameters.EdgeFactor",
20+
"CompilerFlags": "LDFLAGS=\"-lpthread -fcommon\""
21+
}
2122
}
2223
],
2324
"Dependencies": [

0 commit comments

Comments
 (0)