-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #70 from jabelic/rls/fix-to-auto-merge-010
Rls/fix to auto merge 010
- Loading branch information
Showing
8 changed files
with
67 additions
and
204 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,18 @@ | ||
#!/bin/sh | ||
|
||
init(){ | ||
if [ "$(uname)" = 'Darwin' ] && [ "$SHELL" = "/bin/zsh" ]; then | ||
echo "export JULIA_NUM_THREADS=`sysctl -n hw.logicalcpu`" >> ~/.zshrc | ||
elif [ "$SHELL" = "/bin/bash" ] && [ "$SHELL" = "/bin/zsh" ]; then | ||
echo "export JULIA_NUM_THREADS=`sysctl -n hw.logicalcpu`" >> ~/.bashrc | ||
elif [ "$(expr substr $(uname -s) 1 5)"='Linux' ] && [ "$SHELL" = "/bin/bash" ]; then | ||
THREADS=`fgrep 'processor' /proc/cpuinfo | wc -l` | ||
echo "export JULIA_NUM_THREADS=$THREADS" >> ~/.bashrc | ||
else | ||
echo "Your platform ($(uname -a)) is not supported." | ||
exit 1 | ||
fi | ||
julia src/settings.jl -t auto | ||
} | ||
|
||
init |
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 |
---|---|---|
@@ -1,2 +1,4 @@ | ||
JULIA_MULTI_PROCESS = true | ||
L = 1.5 | ||
# dev | rls | ||
STAGE = "rls" |
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 |
---|---|---|
@@ -1,12 +1,17 @@ | ||
#= Sysimage for Developers. Sysimage.so must be written on .gitignore because it is so large file! =# | ||
include("./environments.jl") | ||
|
||
using Pkg | ||
Pkg.add("PackageCompiler") | ||
Pkg.add("DelimitedFiles") | ||
Pkg.add("TimerOutputs") | ||
Pkg.add("Test") | ||
Pkg.add("Plots") | ||
using PackageCompiler | ||
|
||
PackageCompiler.create_sysimage([:CSV, :DataFrames, :Plots, :Luxor, :BenchmarkTools, :TimerOutputs, :Test]; sysimage_path="Sysimage.so") | ||
if STAGE == "dev" | ||
Pkg.add("PackageCompiler") | ||
Pkg.add("TimerOutputs") | ||
Pkg.add("Plots") | ||
using PackageCompiler | ||
PackageCompiler.create_sysimage([:CSV, :DataFrames, :Plots, :Luxor, :BenchmarkTools, :TimerOutputs, :Test]; sysimage_path="Sysimage.so") | ||
end | ||
|
||
# >> You can use packages with 'import and using' | ||
# $ julia -JSysimage.so |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
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 |
---|---|---|
@@ -1,35 +1,38 @@ | ||
using DataFrames, CSV | ||
using Profile | ||
include("../src/sdistance.jl") # 必ずダブルクオーテーション | ||
include("../test/draw.jl") | ||
include("../src/SignedDistanceFunction.jl") | ||
include("../src/environments.jl") | ||
include("../test/APT.jl") | ||
import .Draw: parformance_graphs | ||
using .SignedDistanceFunction | ||
using .APT | ||
if STAGE == "dev" | ||
include("../src/sdistance.jl") # 必ずダブルクオーテーション | ||
include("../test/draw.jl") | ||
include("../src/SignedDistanceFunction.jl") | ||
include("../test/APT.jl") | ||
import .Draw: parformance_graphs | ||
using .SignedDistanceFunction | ||
using .APT | ||
|
||
# This script run by test.sh | ||
|
||
# ====== Debug ====== | ||
# p = signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1])) | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/interface_result_n"*ARGS[1]*".csv", header=false) | ||
# p = signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1]), "multi") | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/interface_floodfill_result_n"*ARGS[1]*".csv", header=false) | ||
# p = signedDistance2D("./test/mock_csv_data/multiple_curves.csv", parse(Int, ARGS[1]), "multi") | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/multiple_curves_result_n"*ARGS[1]*".csv", header=false) | ||
# This script run by test.sh | ||
|
||
# ====== profiling ======= | ||
# ====== Debug ====== | ||
# p = signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1])) | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/interface_result_n"*ARGS[1]*".csv", header=false) | ||
# p = signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1]), "multi") | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/interface_floodfill_result_n"*ARGS[1]*".csv", header=false) | ||
# p = signedDistance2D("./test/mock_csv_data/multiple_curves.csv", parse(Int, ARGS[1]), "multi") | ||
# DataFrame(p, :auto) |> CSV.write("./test/result/multiple_curves_result_n"*ARGS[1]*".csv", header=false) | ||
|
||
# @profile signedDistance2D("./test/mock_csv_data/interface.csv",parse(Int, ARGS[1])) | ||
# @profile signedDistance2D("./test/mock_csv_data/interface.csv",parse(Int, ARGS[1]), "multi") | ||
# Profile.print() | ||
# open("prof.txt", "w") do s | ||
# Profile.print(IOContext(s, :displaysize => (24, 500))) | ||
# end | ||
# ====== profiling ======= | ||
|
||
# ====== memory size ======= | ||
p = @allocated signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1]), "multi") | ||
# p = @allocated signedDistance2D("./test/mock_csv_data/multiple_curves.csv", parse(Int, ARGS[1]), "multi") | ||
println("\nUsed memory size: ",p/(1024*1024), " MB") | ||
# @profile signedDistance2D("./test/mock_csv_data/interface.csv",parse(Int, ARGS[1])) | ||
# @profile signedDistance2D("./test/mock_csv_data/interface.csv",parse(Int, ARGS[1]), "multi") | ||
# Profile.print() | ||
# open("prof.txt", "w") do s | ||
# Profile.print(IOContext(s, :displaysize => (24, 500))) | ||
# end | ||
|
||
# ====== memory size ======= | ||
p = @allocated signedDistance2D("./test/mock_csv_data/interface.csv", parse(Int, ARGS[1]), "multi") | ||
# p = @allocated signedDistance2D("./test/mock_csv_data/multiple_curves.csv", parse(Int, ARGS[1]), "multi") | ||
println("\nUsed memory size: ",p/(1024*1024), " MB") | ||
|
||
end |