Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add getChplVersion/chplVersion to ServerConfig and chplVersion splash message #1741

Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
15 changes: 15 additions & 0 deletions src/ServerConfig.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,21 @@ module ServerConfig
return hostname;
}

/*
* Returns the version of Chapel arkouda was built with
*/
proc getChplVersion() throws {
use Version;
var ver = chplVersion:string;
var verArray = ver.split('version');
return verArray[1];
}

/*
Indicates the version of Chapel Arkouda was built with
*/
const chplVersion = try! getChplVersion();

/*
Indicates whether token authentication is being used for Akrouda server requests
*/
Expand Down
6 changes: 6 additions & 0 deletions src/ServerDaemon.chpl
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ module ServerDaemon {

proc printServerSplashMessage(token: string, arkDirectory: string) throws {
var verMessage = "arkouda server version = %s".format(arkoudaVersion);
var chplVerMessage = "built with chapel version%s".format(chplVersion);
var dirMessage = ".arkouda directory %s".format(arkDirectory);
var memLimMessage = "memory limit = %i".format(getMemLimit());
var memUsedMessage = "bytes of memory used = %i".format(getMemUsed());
Expand Down Expand Up @@ -198,6 +199,10 @@ module ServerDaemon {
var vBuff = generateBuffer(serverMessage,verMessage);
verMessage = adjustMsg(verMessage);
verMessage = "*%s %s %s*".format(vBuff,verMessage,vBuff);

var cvBuff = generateBuffer(serverMessage,chplVerMessage);
chplVerMessage = adjustMsg(chplVerMessage);
chplVerMessage = "*%s %s %s*".format(cvBuff,chplVerMessage,cvBuff);

var mlBuff = generateBuffer(serverMessage,memLimMessage);
memLimMessage = adjustMsg(memLimMessage);
Expand Down Expand Up @@ -232,6 +237,7 @@ module ServerDaemon {
writeln(blankLine);
writeln('*%s*'.format(serverMessage));
writeln(verMessage);
writeln(chplVerMessage);

if (memTrack) {
writeln(memLimMessage);
Expand Down