diff --git a/src/amuse/community/krome/Makefile b/src/amuse/community/krome/Makefile index 9cdbe5d56..3d280769c 100644 --- a/src/amuse/community/krome/Makefile +++ b/src/amuse/community/krome/Makefile @@ -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 diff --git a/src/amuse/couple/multiples.py b/src/amuse/couple/multiples.py index fe240a6fa..827714beb 100644 --- a/src/amuse/couple/multiples.py +++ b/src/amuse/couple/multiples.py @@ -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']) @@ -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: @@ -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) @@ -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 diff --git a/src/amuse/ext/job_server.py b/src/amuse/ext/job_server.py index a31f37ef0..f47f8b74e 100644 --- a/src/amuse/ext/job_server.py +++ b/src/amuse/ext/job_server.py @@ -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):