adding AOCC support for CP2K 7.1 (#22641)
This commit is contained in:
		 AMD Toolchain Support
					AMD Toolchain Support
				
			
				
					committed by
					
						 GitHub
						GitHub
					
				
			
			
				
	
			
			
			 GitHub
						GitHub
					
				
			
						parent
						
							fa6e30c6a7
						
					
				
				
					commit
					9a453b2e74
				
			| @@ -272,6 +272,7 @@ def edit(self, spec, prefix): | ||||
|         elif '%aocc' in spec: | ||||
|             fcflags += [ | ||||
|                 '-ffree-form', | ||||
|                 '-Mbackslash', | ||||
|             ] | ||||
|         elif '%pgi' in spec or '%nvhpc' in spec: | ||||
|             fcflags += ['-Mfreeform', '-Mextend'] | ||||
|   | ||||
| @@ -80,6 +80,9 @@ def setup_build_environment(self, env): | ||||
|         if '%intel' in self.spec and which('xiar'): | ||||
|             env.set('AR', 'xiar') | ||||
| 
 | ||||
|         if '%aocc' in self.spec: | ||||
|             env.append_flags('FCFLAGS', '-fPIC') | ||||
| 
 | ||||
|         if '+cuda' in self.spec: | ||||
|             nvcc = self.spec['cuda'].prefix.bin.nvcc | ||||
|             env.set('CCLD', '{0} -ccbin {1}'.format(nvcc, spack_cc)) | ||||
| @@ -100,6 +103,15 @@ def configure_args(self): | ||||
| 
 | ||||
|         return args | ||||
| 
 | ||||
|     @run_after('configure') | ||||
|     def patch_libtool(self): | ||||
|         """AOCC support for LIBXC""" | ||||
|         if '%aocc' in self.spec: | ||||
|             filter_file( | ||||
|                 r'\$wl-soname \$wl\$soname', | ||||
|                 r'-fuse-ld=ld -Wl,-soname,\$soname', | ||||
|                 'libtool', string=True) | ||||
| 
 | ||||
|     def check(self): | ||||
|         # libxc provides a testsuite, but many tests fail | ||||
|         # http://www.tddft.org/pipermail/libxc/2013-February/000032.html | ||||
|   | ||||
		Reference in New Issue
	
	Block a user