Skip to content
Snippets Groups Projects

Draft: Fortran Support

1 file
+ 2
3
Compare changes
  • Side-by-side
  • Inline
@@ -11,6 +11,7 @@ from Infrastructure.CorrectParameter import CorrectParameterFactory
@@ -11,6 +11,7 @@ from Infrastructure.CorrectParameter import CorrectParameterFactory
from Infrastructure.Template import TemplateManager
from Infrastructure.Template import TemplateManager
from Infrastructure.TemplateFactory import get_allocated_window, get_rma_call
from Infrastructure.TemplateFactory import get_allocated_window, get_rma_call
from Infrastructure.AllocCall import AllocCall
from Infrastructure.AllocCall import AllocCall
 
from Infrastructure.ArrAsgn import ArrAsgn
import Infrastructure.Variables as infvars
import Infrastructure.Variables as infvars
import itertools
import itertools
@@ -24,13 +25,11 @@ class LocalConcurrencyErrorRMA(ErrorGenerator):
@@ -24,13 +25,11 @@ class LocalConcurrencyErrorRMA(ErrorGenerator):
# generate standard buffer access instructions
# generate standard buffer access instructions
if infvars.generator_language == "c":
if infvars.generator_language == "c":
read_str = f'printf("buf is %d\\n", {CorrectParameterFactory().buf_var_name}[0]);'
read_str = f'printf("buf is %d\\n", {CorrectParameterFactory().buf_var_name}[0]);'
write_str = f'{CorrectParameterFactory().buf_var_name}[0] = 42;'
else:
else:
read_str = f'print *, "buf is ", {CorrectParameterFactory().buf_var_name}(0)'
read_str = f'print *, "buf is ", {CorrectParameterFactory().buf_var_name}(0)'
write_str = f'{CorrectParameterFactory().buf_var_name}(0) = 42'
self.buf_instructions = {
self.buf_instructions = {
"bufread": Instruction(read_str, 0, "bufread"),
"bufread": Instruction(read_str, 0, "bufread"),
"bufwrite": Instruction(write_str, 0, "bufwrite")
"bufwrite": ArrAsgn(CorrectParameterFactory().buf_var_name, 0, 42)
}
}
def get_feature(self):
def get_feature(self):
Loading