Register
Login
Resources
Docs Blog Datasets Glossary Case Studies Tutorials & Webinars
Product
Data Engine LLMs Platform Enterprise
Pricing Explore
Connect to our Discord channel

18301e61-d422-4ec8-a22d-f94f43a3e6ee 1.3 KB
Raw

You have to be logged in to leave a comment. Sign In
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
  1. """
  2. fujitsu
  3. Supports Fujitsu compiler function.
  4. This compiler is developed by Fujitsu and is used in A64FX on Fugaku.
  5. """
  6. from numpy.distutils.fcompiler import FCompiler
  7. compilers = ['FujitsuFCompiler']
  8. class FujitsuFCompiler(FCompiler):
  9. compiler_type = 'fujitsu'
  10. description = 'Fujitsu Fortran Compiler'
  11. possible_executables = ['frt']
  12. version_pattern = r'frt \(FRT\) (?P<version>[a-z\d.]+)'
  13. # $ frt --version
  14. # frt (FRT) x.x.x yyyymmdd
  15. executables = {
  16. 'version_cmd' : ["<F77>", "--version"],
  17. 'compiler_f77' : ["frt", "-Fixed"],
  18. 'compiler_fix' : ["frt", "-Fixed"],
  19. 'compiler_f90' : ["frt"],
  20. 'linker_so' : ["frt", "-shared"],
  21. 'archiver' : ["ar", "-cr"],
  22. 'ranlib' : ["ranlib"]
  23. }
  24. pic_flags = ['-KPIC']
  25. module_dir_switch = '-M'
  26. module_include_switch = '-I'
  27. def get_flags_opt(self):
  28. return ['-O3']
  29. def get_flags_debug(self):
  30. return ['-g']
  31. def runtime_library_dir_option(self, dir):
  32. return f'-Wl,-rpath={dir}'
  33. def get_libraries(self):
  34. return ['fj90f', 'fj90i', 'fjsrcinfo']
  35. if __name__ == '__main__':
  36. from distutils import log
  37. from numpy.distutils import customized_fcompiler
  38. log.set_verbosity(2)
  39. print(customized_fcompiler('fujitsu').get_version())
Tip!

Press p or to see the previous file or, n or to see the next file

Comments

Loading...