diff --git a/Project.toml b/Project.toml index 8bda5f0..de46ad2 100644 --- a/Project.toml +++ b/Project.toml @@ -1,11 +1,12 @@ name = "PlatformAware" uuid = "e7c50b67-2c03-471e-9cf2-69e515d86ecf" authors = ["Francisco Heron de Carvalho Junior and contributors"] -version = "0.4.1" +version = "0.4.2" [deps] AbstractTrees = "1520ce14-60c1-5f80-bbc7-55ef81b5835c" CpuId = "adafc99b-e345-5852-983c-f28acb93d879" +Distributed = "8ba89e20-285c-5b6f-9357-94700520ee1b" Downloads = "f43a241f-c20a-4ad4-852c-f6b1247861c6" HTTP = "cd3eb016-35fb-5094-929b-558a96fad6f3" InteractiveUtils = "b77e0a4c-d291-57a0-90e8-8db25a27a240" diff --git a/src/PlatformAware.jl b/src/PlatformAware.jl index 83178cc..3384d79 100644 --- a/src/PlatformAware.jl +++ b/src/PlatformAware.jl @@ -12,6 +12,7 @@ using Scratch using Downloads using InteractiveUtils using HTTP +using Distributed include("utils.jl") @@ -42,7 +43,6 @@ include("features/qualifiers/amd/amd_processors.jl") include("features/qualifiers/amd/amd_accelerators.jl") include("features/qualifiers/xilinx/xilinx.jl") - # main functionality (@platform macro and default types) include("platform.jl") diff --git a/src/platform.jl b/src/platform.jl index 77bf145..3266cf9 100644 --- a/src/platform.jl +++ b/src/platform.jl @@ -123,13 +123,13 @@ function load!() platform_description_dict = readPlatormDescription() platform_description_dict["node"]["node_count"] = try Distributed.nworkers() catch _ 1 end loadFeatures!(platform_description_dict, state.platform_feature_default_all, state.platform_feature_all) - setupWorkers(platform_description_dict, state.platform_feature_all) empty!(state.platform_feature) for (k,v) in state.platform_feature_all state.platform_feature[k] = v end + end # load!() @@ -162,7 +162,7 @@ function reset_platform_feature!() keys(state.platform_feature) end -function include_actual_platform_argument!(f) +function include_platform_feature!(f) state.platform_feature[f] = state.platform_feature_all[f] state.platform_feature_default[f] = state.platform_feature_default_all[f] keys(state.platform_feature) @@ -177,7 +177,7 @@ function platform_parameter_macro!(f) reset_platform_feature!() else check_all(f) - include_actual_platform_argument!(f) + include_platform_feature!(f) end end