Skip to content

Commit

Permalink
fix
Browse files Browse the repository at this point in the history
  • Loading branch information
aminya committed Jun 28, 2019
1 parent 6760ecf commit 849cadd
Show file tree
Hide file tree
Showing 4 changed files with 10 additions and 21 deletions.
14 changes: 2 additions & 12 deletions AnalysisJuliaPlotter.jl
Original file line number Diff line number Diff line change
Expand Up @@ -33,18 +33,6 @@ function AnalysisJuliaPlotter()
ii=1;
for fun in sFunNameMatlab

plt=plot( vMatrixSizeMatlab,[ mRunTimeMatlab[ii,:], mRunTimeJuliamkl[ii,:] ],
labels=["MATLAB" "Julia-MKL"],legend=:bottomright, markershape =:auto,markersize=2,
xlabel="Matrix Size", ylabel="Run Time [micro Seconds]",
title="$fun", xscale=:log10, yscale=:log10,dpi=300 );

plotJuliaSIMD=occursin.(fun,sFunNameJuliamklSIMD); # if 1 will plot JuliaSIMD
if any(plotJuliaSIMD)
plt=plot!(vMatrixSizeJuliamklSIMD,dropdims(mRunTimeJuliamklSIMD[plotJuliaSIMD,:],dims=1),
label="Julia-MKL-SIMD",markershape =:auto,markersize=2);
end
display(plt); # display in plot pane
if(generateImages == 1)
plt=plot( vMatrixSizeMatlab,[ mRunTimeMatlab[ii,:], mRunTimeJulia[ii,:], mRunTimeJuliamkl[ii,:] ],
labels=["MATLAB", "Julia", "Julia-MKL"],legend=:bottomright, markershape =:auto,markersize=2,
xlabel="Matrix Size", ylabel="Run Time [micro Seconds]", guidefontsize=10,
Expand All @@ -55,6 +43,7 @@ function AnalysisJuliaPlotter()
plt=plot!(vMatrixSizeJuliamklSIMD,[ dropdims(mRunTimeJuliaSIMD[plotJuliaSIMD,:],dims=1), dropdims(mRunTimeJuliamklSIMD[plotJuliaSIMD,:],dims=1) ],
labels=["Julia-SIMD" "Julia-MKL-SIMD"],markershape =:auto, markersize=2);
end

display(plt); # display in plot pane
if(saveImages == 1)
savefig("Figures\\Julia\\Figure$(ii).png");
Expand All @@ -63,4 +52,5 @@ function AnalysisJuliaPlotter()
ii=ii+1;
end

nothing
end
4 changes: 2 additions & 2 deletions AnalyszeRunTimeResults.m
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
figPos=figPosSt.medium; % fig position identifier
lineWidthSt=struct('thin',1,'normal',3,'thick',4);
lineWidth=lineWidthSt.thin; % line width identifier
saveImage=1; % save image or not
saveImage=0; % save image or not

%% Loading Data

Expand Down Expand Up @@ -41,7 +41,7 @@
for ii = 1:size(mRunTimeMatlab,1)

figureIdx = figureIdx + 1;
hFigure = figure('Position', figPosMedium);
hFigure = figure('Position', figPos);
hAxes = axes();

loglog(vMatrixSizeMatlab,mRunTimeMatlab(ii,:),'-o','LineWidth',lineWidth,'MarkerFaceColor','b'); hold on;
Expand Down
1 change: 0 additions & 1 deletion JuliaBench.jl
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@

function JuliaBench(operationMode)

allFunctions = [MatrixGeneration, MatrixAddition, MatrixMultiplication, MatrixQuadraticForm, MatrixReductions, ElementWiseOperations, MatrixExp, MatrixSqrt, Svd, Eig, CholDec, MatInv, LinearSystem, LeastSquares, CalcDistanceMatrix, KMeans];
Expand Down
12 changes: 6 additions & 6 deletions JuliaMain.jl
Original file line number Diff line number Diff line change
Expand Up @@ -16,22 +16,22 @@ using MAT

operationMode = 2; # 0 for test only # 1 for partial benchmark # 2 for full benchmark


# Julia
include("JuliaBench.jl");
tRunTime, mRunTime= JuliaBench(operationMode);

# Main RunTime Table write
writedlm("RunTimeData\\RunTimeJulia$(BLAS.vendor())Table.csv", tRunTime,',');

# RunTime save
file = matopen("RunTimeData\\RunTimeJulia$(BLAS.vendor()).mat", "w")
write(file, "mRunTime", mRunTime)
close(file)


# Julia SIMD
include("JuliaBenchSIMD.jl")
tRunTime, mRunTime= JuliaBenchSIMD(operationMode);

# Main RunTime Table write
writedlm("RunTimeData\\RunTimeJulia$(BLAS.vendor())SIMDTable.csv", tRunTime,',');

# RunTime save
file = matopen("RunTimeData\\RunTimeJulia$(BLAS.vendor())SIMD.mat", "w")
write(file, "mRunTime", mRunTime)
close(file)

0 comments on commit 849cadd

Please sign in to comment.