Skip to content

Commit

Permalink
Merge branch 'master' of github.com:amusecode/amuse
Browse files Browse the repository at this point in the history
  • Loading branch information
spzwart committed Nov 19, 2018
2 parents 6c5d7e8 + 44eae0a commit 755399d
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 5 deletions.
2 changes: 1 addition & 1 deletion src/amuse/community/krome/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ CODE_GENERATOR = $(AMUSE_DIR)/build.py

CLASSNAME=KromeInterface

FFLAGS += $(FCFLAGS) -O2
FFLAGS += $(FCFLAGS) -O2 -ffree-line-length-none
INCL = -I./src/ -I./src/krome/build/

all: src/krome src/libchem.a test krome_worker
Expand Down
7 changes: 5 additions & 2 deletions src/amuse/couple/multiples.py
Original file line number Diff line number Diff line change
Expand Up @@ -757,7 +757,8 @@ def manage_encounter(self, global_time, star1, star2,
'stars': stars.copy(),
#'gravity_stars': gravity_stars.copy(),
'self.root_to_tree': self.root_to_tree.copy(),
'particles_in_encounter': Particles(0)
'particles_in_encounter': Particles(0),
'scattering_stars': Particles(0)
}
snapshot['particles_in_encounter'].add_particle(snapshot['star1'])
snapshot['particles_in_encounter'].add_particle(snapshot['star2'])
Expand Down Expand Up @@ -860,6 +861,7 @@ def manage_encounter(self, global_time, star1, star2,
print 'unknown star',
print 'to scattering list'
sys.stdout.flush()
snapshot['scattering_stars'].add_particle(star)
#initial_scale = sorted_distances[i] # don't expand!
else:
if self.global_debug > 0:
Expand Down Expand Up @@ -934,7 +936,7 @@ def manage_encounter(self, global_time, star1, star2,
#print "rescaling out:", (star1.position - star2.position).length()

# 2c. Remove the interacting stars from the gravity module.

for star in scattering_stars:
gravity_stars.remove_particle(star)

Expand Down Expand Up @@ -1141,6 +1143,7 @@ def manage_encounter(self, global_time, star1, star2,
#gravity_stars = snapshot['gravity_stars']
gravity_stars.add_particle(star1)
gravity_stars.add_particle(star2)
gravity_stars.add_particles(snapshot['scattering_stars'])
self.root_to_tree = snapshot['self.root_to_tree']
zero_en = 0.0 * E0

Expand Down
10 changes: 8 additions & 2 deletions src/amuse/ext/job_server.py
Original file line number Diff line number Diff line change
Expand Up @@ -300,8 +300,14 @@ def wait(self):
return True

def waitall(self):
while self.wait():
pass
while len(self.pool)==0 and self.job_list:
if self.number_available_codes>0:
raise Exception("JobServer: this should not happen")
if self.number_starting_codes==0:
raise Exception("JobServer: no codes available")
while len(self.pool)>0 or self.job_list:
self.pool.wait()
self.last_finished_job=self._finished_jobs[-1]

@property
def finished_jobs(self):
Expand Down

0 comments on commit 755399d

Please sign in to comment.