Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
bilby
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Container Registry
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
lscsoft
bilby
Commits
52b251d6
Commit
52b251d6
authored
1 year ago
by
Tsun-Ho Pang
Committed by
Colm Talbot
1 year ago
Browse files
Options
Downloads
Patches
Plain Diff
FEATURE: Adding outdir support for ultranest's mpi functionality
parent
411efa0a
No related branches found
No related tags found
1 merge request
!1278
Adding outdir support for ultranest's mpi functionality
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
AUTHORS.md
+1
-0
1 addition, 0 deletions
AUTHORS.md
bilby/core/sampler/base_sampler.py
+13
-1
13 additions, 1 deletion
bilby/core/sampler/base_sampler.py
bilby/core/sampler/pymultinest.py
+0
-14
0 additions, 14 deletions
bilby/core/sampler/pymultinest.py
with
14 additions
and
15 deletions
AUTHORS.md
+
1
−
0
View file @
52b251d6
...
@@ -91,3 +91,4 @@ Isaac Legred
...
@@ -91,3 +91,4 @@ Isaac Legred
Marc Penuliar
Marc Penuliar
Andrew Fowlie
Andrew Fowlie
Martin White
Martin White
Peter T. H. Pang
This diff is collapsed.
Click to expand it.
bilby/core/sampler/base_sampler.py
+
13
−
1
View file @
52b251d6
...
@@ -902,7 +902,19 @@ class _TemporaryFileSamplerMixin:
...
@@ -902,7 +902,19 @@ class _TemporaryFileSamplerMixin:
def
__init__
(
self
,
temporary_directory
,
**
kwargs
):
def
__init__
(
self
,
temporary_directory
,
**
kwargs
):
super
(
_TemporaryFileSamplerMixin
,
self
).
__init__
(
**
kwargs
)
super
(
_TemporaryFileSamplerMixin
,
self
).
__init__
(
**
kwargs
)
self
.
use_temporary_directory
=
temporary_directory
try
:
from
mpi4py
import
MPI
using_mpi
=
MPI
.
COMM_WORLD
.
Get_size
()
>
1
except
ImportError
:
using_mpi
=
False
if
using_mpi
and
temporary_directory
:
logger
.
info
(
"
Temporary directory incompatible with MPI,
"
"
will run in original directory
"
)
self
.
use_temporary_directory
=
temporary_directory
and
not
using_mpi
self
.
_outputfiles_basename
=
None
self
.
_outputfiles_basename
=
None
self
.
_temporary_outputfiles_basename
=
None
self
.
_temporary_outputfiles_basename
=
None
...
...
This diff is collapsed.
Click to expand it.
bilby/core/sampler/pymultinest.py
+
0
−
14
View file @
52b251d6
...
@@ -5,7 +5,6 @@ import time
...
@@ -5,7 +5,6 @@ import time
import
numpy
as
np
import
numpy
as
np
from
..utils
import
logger
from
.base_sampler
import
NestedSampler
,
_TemporaryFileSamplerMixin
,
signal_wrapper
from
.base_sampler
import
NestedSampler
,
_TemporaryFileSamplerMixin
,
signal_wrapper
...
@@ -77,12 +76,6 @@ class Pymultinest(_TemporaryFileSamplerMixin, NestedSampler):
...
@@ -77,12 +76,6 @@ class Pymultinest(_TemporaryFileSamplerMixin, NestedSampler):
temporary_directory
=
True
,
temporary_directory
=
True
,
**
kwargs
**
kwargs
):
):
try
:
from
mpi4py
import
MPI
using_mpi
=
MPI
.
COMM_WORLD
.
Get_size
()
>
1
except
ImportError
:
using_mpi
=
False
super
(
Pymultinest
,
self
).
__init__
(
super
(
Pymultinest
,
self
).
__init__
(
likelihood
=
likelihood
,
likelihood
=
likelihood
,
priors
=
priors
,
priors
=
priors
,
...
@@ -96,13 +89,6 @@ class Pymultinest(_TemporaryFileSamplerMixin, NestedSampler):
...
@@ -96,13 +89,6 @@ class Pymultinest(_TemporaryFileSamplerMixin, NestedSampler):
**
kwargs
**
kwargs
)
)
self
.
_apply_multinest_boundaries
()
self
.
_apply_multinest_boundaries
()
self
.
exit_code
=
exit_code
if
using_mpi
and
temporary_directory
:
logger
.
info
(
"
Temporary directory incompatible with MPI,
"
"
will run in original directory
"
)
self
.
use_temporary_directory
=
temporary_directory
and
not
using_mpi
def
_translate_kwargs
(
self
,
kwargs
):
def
_translate_kwargs
(
self
,
kwargs
):
kwargs
=
super
().
_translate_kwargs
(
kwargs
)
kwargs
=
super
().
_translate_kwargs
(
kwargs
)
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment