Skip to content

Commit

Permalink
Re #1753 should fix test_mpi_wrapper and better warning in ClusterSlu…
Browse files Browse the repository at this point in the history
…rm.m and parallel_config.m

# Conflicts:
#	herbert_core/classes/MPIFramework/@ClusterSlurm/ClusterSlurm.m
  • Loading branch information
abuts committed Sep 30, 2024
1 parent 44d8d22 commit 95ae066
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -275,7 +275,7 @@
properties(Access = private)
% Property, used by setter of cluster configuration to keep cluster
% configuration until all properties are set and final validation
% may be performed.
% may be performed.
trial_cluster_config_;
end

Expand Down Expand Up @@ -491,7 +491,13 @@
function obj = set.parallel_threads(obj,n_threads)
n_threads = floor(n_threads);
n_workers = get_or_restore_field(obj, 'parallel_workers_number');
n_poss_threads = floor(obj.n_cores/n_workers);
if ispc % let's assume pc is Intel so threades are double number of cores
% this estimeat will not be too wrong even if it is AMD,
% but would remove bunch annoying messages otherwise
n_poss_threads = floor(2*obj.n_cores/n_workers);
else
n_poss_threads = floor(obj.n_cores/n_workers);
end

if n_threads < 0
error('HERBERT:parallel_config:invalid_argument', ...
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
mff.parallel_cluster = full_cl_name;

if ~mff.framework_available % if cluster available, store its name in
error('HERBERT:parallel_config:runtime_error',...
error('HERBERT:parallel_config:not_available',...
'Cluster %s is not available on the current system',...
full_cl_name);
end
Expand Down

0 comments on commit 95ae066

Please sign in to comment.