compiler bootstrapping: enable both single-node and multi-node DAGS(#12310)
5f74f22 enabled installing compilers for dependencies but not for the root package (and in particular not for DAGs which consist of one package)
this enables bootstrapping compilers for both types of DAGsThis commit is contained in:
		 Peter Scheibel
					Peter Scheibel
				
			
				
					committed by
					
						 Greg Becker
						Greg Becker
					
				
			
			
				
	
			
			
			 Greg Becker
						Greg Becker
					
				
			
						parent
						
							941eb5d756
						
					
				
				
					commit
					92ec732f9a
				
			| @@ -1534,15 +1534,13 @@ def do_install(self, **kwargs): | ||||
|             dep_kwargs['install_deps'] = False | ||||
|             for dep in self.spec.traverse(order='post', root=False): | ||||
|                 if spack.config.get('config:install_missing_compilers', False): | ||||
|                     tty.debug('Bootstrapping {0} compiler for {1}'.format( | ||||
|                         self.spec.compiler, self.name | ||||
|                     )) | ||||
|                     comp_kwargs = kwargs.copy() | ||||
|                     comp_kwargs['explicit'] = False | ||||
|                     comp_kwargs['install_deps'] = True | ||||
|                     dep.package.bootstrap_compiler(**comp_kwargs) | ||||
|                     Package._install_bootstrap_compiler(dep.package, **kwargs) | ||||
|                 dep.package.do_install(**dep_kwargs) | ||||
|  | ||||
|         # Then, install the compiler if it is not already installed. | ||||
|         if install_deps: | ||||
|             Package._install_bootstrap_compiler(self, **kwargs) | ||||
|  | ||||
|         # Then, install the package proper | ||||
|         tty.msg(colorize('@*{Installing} @*g{%s}' % self.name)) | ||||
|  | ||||
| @@ -1705,6 +1703,16 @@ def build_process(): | ||||
|             # check the filesystem for it. | ||||
|             self.stage.created = False | ||||
|  | ||||
|     @staticmethod | ||||
|     def _install_bootstrap_compiler(pkg, **install_kwargs): | ||||
|         tty.debug('Bootstrapping {0} compiler for {1}'.format( | ||||
|             pkg.spec.compiler, pkg.name | ||||
|         )) | ||||
|         comp_kwargs = install_kwargs.copy() | ||||
|         comp_kwargs['explicit'] = False | ||||
|         comp_kwargs['install_deps'] = True | ||||
|         pkg.bootstrap_compiler(**comp_kwargs) | ||||
|  | ||||
|     def unit_test_check(self): | ||||
|         """Hook for unit tests to assert things about package internals. | ||||
|  | ||||
|   | ||||
		Reference in New Issue
	
	Block a user