2626# --------------------------------------------------------------
2727# Determine the platform (Windows or Linux)
2828current_platform = platform .system ()
29-
29+ cpu = platform . machine ()
3030
3131# Tiny tool to get the runid from the file name
3232def get_deck_runid (file ):
@@ -66,8 +66,12 @@ def __init__(self, command,debug):
6666 self .arch = "win64"
6767 self .bin_extension = ".exe"
6868 else :
69- self .arch = "linux64_gf"
70- self .bin_extension = ""
69+ if cpu == 'aarch64' :
70+ self .arch = "linuxa64"
71+ self .bin_extension = ""
72+ else :
73+ self .arch = "linux64_gf"
74+ self .bin_extension = ""
7175
7276 self .file = file
7377 self .nt = command [1 ]
@@ -109,7 +113,7 @@ def environment(self):
109113 I_MPI_PIN_DOMAIN = "auto"
110114
111115 # Create a custom environment with all the variables you want to pass
112- if current_platform == "Linux" :
116+ if current_platform == "Linux" and cpu != 'aarch64' :
113117 KMP_AFFINITY = "scatter"
114118 LD_LIBRARY_PATH = ":" .join ([
115119 os .path .join (OPENRADIOSS_PATH , "extlib" , "h3d" , "lib" , "linux64" ),
@@ -133,6 +137,27 @@ def environment(self):
133137 # Add any additional paths to the existing PATH variable
134138 custom_env ["PATH" ] = os .pathsep .join ([custom_env ["PATH" ]] + additional_paths_linux )
135139
140+ if current_platform == "Linux" and cpu == 'aarch64' :
141+ LD_LIBRARY_PATH = ":" .join ([
142+ os .path .join (OPENRADIOSS_PATH , "extlib" , "h3d" , "lib" , "linuxa64" ),
143+ os .path .join (OPENRADIOSS_PATH , "extlib" , "hm_reader" , "linuxa64" ),
144+ os .path .join (OPENRADIOSS_PATH , "extlib" , "ArmFlang_runtime" , "linuxa64" ),
145+ os .path .join ("/" , "opt" , "openmpi" , "lib" ) ])
146+
147+ additional_paths_linux = [
148+ os .path .join ("/" , "opt" , "openmpi" , "bin" ) ]
149+
150+ custom_env = os .environ .copy () # Start with a copy of the current environment
151+ custom_env ["OPENRADIOSS_PATH" ] = OPENRADIOSS_PATH
152+ custom_env ["RAD_CFG_PATH" ] = RAD_CFG_PATH
153+ custom_env ["RAD_H3D_PATH" ] = RAD_H3D_PATH
154+ custom_env ["OMP_NUM_THREADS" ] = OMP_NUM_THREADS
155+ custom_env ["LD_LIBRARY_PATH" ] = LD_LIBRARY_PATH
156+
157+ # Add any additional paths to the existing PATH variable
158+ custom_env ["PATH" ] = os .pathsep .join ([custom_env ["PATH" ]] + additional_paths_linux )
159+
160+
136161 if current_platform == "Windows" :
137162 KMP_AFFINITY = "disabled"
138163 # Add paths to PATH environment variable for windows
0 commit comments