From f75e107d0854afc7478c50d4ebc410aa0981748e Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Wed, 16 Oct 2024 12:14:38 +0200 Subject: [PATCH 1/5] CI: remove unused Run_NRulsimTest --- ci-scripts/cls_physim.py | 38 ----------------------------------- ci-scripts/main.py | 4 +--- ci-scripts/xml_class_list.yml | 1 - 3 files changed, 1 insertion(+), 42 deletions(-) diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index ccdd34e9a9..b10c31f566 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -123,33 +123,6 @@ class PhySim: HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg]) return success - def __CheckResults_NRulsimTest(self, HTML, CONST, testcase_id): - #retrieve run log file and store it locally - mySSH = sshconnection.SSHConnection() - filename = self.__workSpacePath + self.__runLogFile - ret = mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, filename, '.') - if ret != 0: - error_msg = f'could not recover test result file {filename}' - logging.error(error_msg) - HTML.CreateHtmlTestRowQueue("could not recover results", 'KO', [error_msg]) - return False - - PUSCH_OK = False - with open(self.__runLogFile) as f: - PUSCH_OK = 'PUSCH test OK' in f.read() - - # once parsed move the local logfile to its folder for tidiness - os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.') - - #updating the HTML with results - if PUSCH_OK: - HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', 1, ["succeeded"]) - else: - error_msg = 'error: no "PUSCH test OK"' - logging.error(error_msg) - HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', 1, [error_msg]) - return PUSCH_OK - def __CheckBuild_PhySim(self, HTML, CONST): self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' mySSH = sshconnection.SSHConnection() @@ -249,14 +222,3 @@ class PhySim: mySSH.run(f'sudo {self.__workSpacePath}ran_build/build/{self.runsim} {self.runargs} > {self.__workSpacePath}{self.__runLogFile} 2>&1') mySSH.close() return self.__CheckResults_LDPCt2Test(htmlObj,constObj,testcase_id) - - def Run_NRulsimTest(self, htmlObj, constObj, testcase_id): - self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' - os.system(f'mkdir -p ./{self.__runLogPath}') - self.__runLogFile = f'physim_{testcase_id}.log' - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - mySSH.command(f'cd {self.__workSpacePath}', '\$', 5) - mySSH.command(f'sudo {self.__workSpacePath}ran_build/build/nr_ulsim {self.runargs} > {self.__runLogFile} 2>&1', '\$', 30) - mySSH.close() - return self.__CheckResults_NRulsimTest(htmlObj, constObj, testcase_id) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index 3904ac908d..b1b0cb77a5 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -377,14 +377,12 @@ def ExecuteActionWithParam(action): elif action == 'Create_Workspace': success = CONTAINERS.Create_Workspace(HTML) - elif action == 'Run_CUDATest' or action == 'Run_NRulsimTest' or action == 'Run_T2Test': + elif action == 'Run_CUDATest' or action == 'Run_T2Test': ldpc.runargs = test.findtext('physim_run_args') ldpc.runsim = test.findtext('physim_run') ldpc.timethrs = test.findtext('physim_time_threshold') if action == 'Run_CUDATest': success = ldpc.Run_CUDATest(HTML,CONST,id) - elif action == 'Run_NRulsimTest': - success = ldpc.Run_NRulsimTest(HTML,CONST,id) elif action == 'Run_T2Test': success = ldpc.Run_T2Test(HTML,CONST,id) diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 325797c29e..9b1f7e4bec 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -4,7 +4,6 @@ - Build_PhySim - Run_CUDATest - Run_T2Test - - Run_NRulsimTest - Build_eNB - Initialize_eNB - Terminate_eNB From d0f9d4c028c1ad3888a65f8c6ed9b6ed58b60bc3 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Tue, 29 Oct 2024 09:23:30 +0100 Subject: [PATCH 2/5] CI: Remove unused Build_Physim --- ci-scripts/cls_physim.py | 76 -------------------- ci-scripts/main.py | 12 ---- ci-scripts/xml_class_list.yml | 1 - ci-scripts/xml_files/physim_build_source.xml | 35 --------- 4 files changed, 124 deletions(-) delete mode 100644 ci-scripts/xml_files/physim_build_source.xml diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py index b10c31f566..209611bf6f 100644 --- a/ci-scripts/cls_physim.py +++ b/ci-scripts/cls_physim.py @@ -40,21 +40,13 @@ import re class PhySim: def __init__(self): - self.buildargs = "" self.runargs = "" self.eNBIpAddr = "" self.eNBUserName = "" self.eNBPassWord = "" self.eNBSourceCodePath = "" - self.ranRepository = "" - self.ranBranch = "" - self.ranCommitID= "" - self.ranAllowMerge= "" - self.ranTargetBranch= "" - self.forced_workspace_cleanup=False #private attributes self.__workSpacePath='' - self.__buildLogFile='compile_phy_sim.log' self.__runLogFile='' self.__runLogPath='phy_sim_logs' @@ -123,77 +115,9 @@ class PhySim: HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg]) return success - def __CheckBuild_PhySim(self, HTML, CONST): - self.__workSpacePath=self.eNBSourceCodePath+'/cmake_targets/' - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - #retrieve compile log file and store it locally - mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__buildLogFile, '.') - #delete older run log file - mySSH.command('rm ' + self.__workSpacePath+self.__runLogFile, '\$', 5) - mySSH.close() - #check build result from local compile log file - with open(self.__buildLogFile) as f: - if 'BUILD SHOULD BE SUCCESSFUL' in f.read(): - HTML.CreateHtmlTestRow(self.buildargs, 'OK', CONST.ALL_PROCESSES_OK, 'PhySim') - return True - logging.error('\u001B[1m Building Physical Simulators Failed\u001B[0m') - HTML.CreateHtmlTestRow(self.buildargs, 'KO', CONST.ALL_PROCESSES_OK, 'LDPC') - HTML.CreateHtmlTabFooter(False) - return False - - #-----------------$ #PUBLIC Methods$ #-----------------$ - - def Build_PhySim(self,htmlObj,constObj): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - - #create working dir - mySSH.command('mkdir -p ' + self.eNBSourceCodePath, '\$', 5) - mySSH.command('cd ' + self.eNBSourceCodePath, '\$', 5) - - if not self.ranRepository.lower().endswith('.git'): - self.ranRepository+='.git' - - #git clone - mySSH.command('if [ ! -e .git ]; then stdbuf -o0 git clone ' + self.ranRepository + ' .; else stdbuf -o0 git fetch --prune; fi', '\$', 600) - #git config - mySSH.command('git config user.email "jenkins@openairinterface.org"', '\$', 5) - mySSH.command('git config user.name "OAI Jenkins"', '\$', 5) - - #git clean depending on self.forced_workspace_cleanup captured in xml - if self.forced_workspace_cleanup==True: - logging.info('Cleaning workspace ...') - mySSH.command('echo ' + self.eNBPassWord + ' | sudo -S git clean -x -d -ff', '\$', 30) - else: - logging.info('Workspace cleaning was disabled') - - # if the commit ID is provided, use it to point to it - if self.ranCommitID != '': - mySSH.command('git checkout -f ' + self.ranCommitID, '\$', 30) - # if the branch is not develop, then it is a merge request and we need to do - # the potential merge. Note that merge conflicts should have already been checked earlier - if (self.ranAllowMerge): - if self.ranTargetBranch == '': - if (self.ranBranch != 'develop') and (self.ranBranch != 'origin/develop'): - mySSH.command('git merge --ff origin/develop -m "Temporary merge for CI"', '\$', 30) - else: - logging.info('Merging with the target branch: ' + self.ranTargetBranch) - mySSH.command('git merge --ff origin/' + self.ranTargetBranch + ' -m "Temporary merge for CI"', '\$', 30) - - #build - mySSH.command('source oaienv', '\$', 5) - mySSH.command('cd cmake_targets', '\$', 5) - mySSH.command('mkdir -p log', '\$', 5) - mySSH.command(f'./build_oai {self.buildargs} 2>&1 | tee {self.__buildLogFile}', '\$', 1500) - - mySSH.close() - return __CheckBuild_PhySim(htmlObj,constObj) - - def Run_CUDATest(self,htmlObj,constObj,testcase_id): self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/' #create run logs folder locally diff --git a/ci-scripts/main.py b/ci-scripts/main.py index b1b0cb77a5..e5c2f221f2 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -289,18 +289,6 @@ def ExecuteActionWithParam(action): st = test.findtext('idle_sleep_time_in_sec') or "5" success = cls_oaicitest.IdleSleep(HTML, int(st)) - elif action == 'Build_PhySim': - ldpc.buildargs = test.findtext('physim_build_args') - forced_workspace_cleanup = test.findtext('forced_workspace_cleanup') - if (forced_workspace_cleanup is None): - ldpc.forced_workspace_cleanup=False - else: - if re.match('true', forced_workspace_cleanup, re.IGNORECASE): - ldpc.forced_workspace_cleanup=True - else: - ldpc.forced_workspace_cleanup=False - success = ldpc.Build_PhySim(HTML,CONST) - elif action == 'Deploy_Run_PhySim': success = PHYSIM.Deploy_PhySim(HTML) diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 9b1f7e4bec..27b179c8f8 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -1,7 +1,6 @@ - Build_Proxy - Build_Cluster_Image - Pull_Cluster_Image - - Build_PhySim - Run_CUDATest - Run_T2Test - Build_eNB diff --git a/ci-scripts/xml_files/physim_build_source.xml b/ci-scripts/xml_files/physim_build_source.xml deleted file mode 100644 index 7ba2a06800..0000000000 --- a/ci-scripts/xml_files/physim_build_source.xml +++ /dev/null @@ -1,35 +0,0 @@ - - - - build-offload - Build physical simulators - tasks - 000001 - - - - Build_PhySim - Build physical simulators - --phy_simulators --ninja --noavx512 - FALSE - - From 14a41df0ec7f1eabfaf89f43b354623631aeb540 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Tue, 29 Oct 2024 10:40:26 +0100 Subject: [PATCH 3/5] CI: Harmonize LDPC CUDA and T2 test/analysis in physim - Introduce "Run_Physim" function for running ldpctest (with CUDA) and nr_dlsim/nr_ulsim (with T2) in RAN-gNB-N300-Timing-Phytest-LDPC test pipeline. - Create "cls_analysis.py" and introduce "analyze_physim" for log analysis of physim tests. - Define patterns to be searched in the physim logs. - Extract and print information about total gNB RX/TX PHY processing time from nr_ulsim/nr_dlsim logs. - Remove "cls_physim.py" as it is not used anymore, cleanup "main.py". --- ci-scripts/args_parse.py | 11 +- ci-scripts/cls_analysis.py | 82 ++++++++++ ci-scripts/cls_native.py | 20 +++ ci-scripts/cls_physim.py | 148 ------------------ ci-scripts/main.py | 24 +-- ci-scripts/xml_class_list.yml | 3 +- ci-scripts/xml_files/ldpc_gpu_test.xml | 80 +++++++--- .../xml_files/t2_offload_dec_nr_ulsim.xml | 72 ++++----- .../xml_files/t2_offload_enc_nr_dlsim.xml | 96 ++++++------ 9 files changed, 254 insertions(+), 282 deletions(-) create mode 100644 ci-scripts/cls_analysis.py delete mode 100644 ci-scripts/cls_physim.py diff --git a/ci-scripts/args_parse.py b/ci-scripts/args_parse.py index 8bac1f6a92..7d753d21c7 100644 --- a/ci-scripts/args_parse.py +++ b/ci-scripts/args_parse.py @@ -41,7 +41,7 @@ import constants as CONST #----------------------------------------------------------- -def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): +def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER): py_param_file_present = False @@ -78,7 +78,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST CiTestObj.ranRepository = matchReg.group(1) RAN.ranRepository=matchReg.group(1) HTML.ranRepository=matchReg.group(1) - ldpc.ranRepository=matchReg.group(1) CONTAINERS.ranRepository=matchReg.group(1) SCA.ranRepository=matchReg.group(1) PHYSIM.ranRepository=matchReg.group(1) @@ -89,7 +88,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST else: matchReg = re.match('^\-\-ranAllowMerge=(.+)$', myArgv, re.IGNORECASE) doMerge = matchReg.group(1) - ldpc.ranAllowMerge=matchReg.group(1) if ((doMerge == 'true') or (doMerge == 'True')): CiTestObj.ranAllowMerge = True RAN.ranAllowMerge=True @@ -106,7 +104,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST CiTestObj.ranBranch = matchReg.group(1) RAN.ranBranch=matchReg.group(1) HTML.ranBranch=matchReg.group(1) - ldpc.ranBranch=matchReg.group(1) CONTAINERS.ranBranch=matchReg.group(1) SCA.ranBranch=matchReg.group(1) PHYSIM.ranBranch=matchReg.group(1) @@ -119,7 +116,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST CiTestObj.ranCommitID = matchReg.group(1) RAN.ranCommitID=matchReg.group(1) HTML.ranCommitID=matchReg.group(1) - ldpc.ranCommitID=matchReg.group(1) CONTAINERS.ranCommitID=matchReg.group(1) SCA.ranCommitID=matchReg.group(1) PHYSIM.ranCommitID=matchReg.group(1) @@ -132,7 +128,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST CiTestObj.ranTargetBranch = matchReg.group(1) RAN.ranTargetBranch=matchReg.group(1) HTML.ranTargetBranch=matchReg.group(1) - ldpc.ranTargetBranch=matchReg.group(1) CONTAINERS.ranTargetBranch=matchReg.group(1) SCA.ranTargetBranch=matchReg.group(1) PHYSIM.ranTargetBranch=matchReg.group(1) @@ -141,7 +136,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST if re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-eNBIPAddress=(.+)$', myArgv, re.IGNORECASE) RAN.eNBIPAddress=matchReg.group(1) - ldpc.eNBIpAddr=matchReg.group(1) CONTAINERS.eNBIPAddress=matchReg.group(1) SCA.eNBIPAddress=matchReg.group(1) PHYSIM.eNBIPAddress=matchReg.group(1) @@ -158,7 +152,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST if re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-eNBUserName=(.+)$', myArgv, re.IGNORECASE) RAN.eNBUserName=matchReg.group(1) - ldpc.eNBUserName=matchReg.group(1) CONTAINERS.eNBUserName=matchReg.group(1) SCA.eNBUserName=matchReg.group(1) PHYSIM.eNBUserName=matchReg.group(1) @@ -175,7 +168,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST if re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-eNBPassword=(.+)$', myArgv, re.IGNORECASE) RAN.eNBPassword=matchReg.group(1) - ldpc.eNBPassWord=matchReg.group(1) CONTAINERS.eNBPassword=matchReg.group(1) SCA.eNBPassword=matchReg.group(1) PHYSIM.eNBPassword=matchReg.group(1) @@ -192,7 +184,6 @@ def ArgsParse(argvs,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUST if re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE): matchReg = re.match('^\-\-eNBSourceCodePath=(.+)$', myArgv, re.IGNORECASE) RAN.eNBSourceCodePath=matchReg.group(1) - ldpc.eNBSourceCodePath=matchReg.group(1) CONTAINERS.eNBSourceCodePath=matchReg.group(1) SCA.eNBSourceCodePath=matchReg.group(1) PHYSIM.eNBSourceCodePath=matchReg.group(1) diff --git a/ci-scripts/cls_analysis.py b/ci-scripts/cls_analysis.py new file mode 100644 index 0000000000..25d9b0c659 --- /dev/null +++ b/ci-scripts/cls_analysis.py @@ -0,0 +1,82 @@ +#/* +# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more +# * contributor license agreements. See the NOTICE file distributed with +# * this work for additional information regarding copyright ownership. +# * The OpenAirInterface Software Alliance licenses this file to You under +# * the OAI Public License, Version 1.1 (the "License"); you may not use this file +# * except in compliance with the License. +# * You may obtain a copy of the License at +# * +# * http://www.openairinterface.org/?page_id=698 +# * +# * Unless required by applicable law or agreed to in writing, software +# * distributed under the License is distributed on an "AS IS" BASIS, +# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +# * See the License for the specific language governing permissions and +# * limitations under the License. +# *------------------------------------------------------------------------------- +# * For more information about the OpenAirInterface (OAI) Software Alliance: +# * contact@openairinterface.org +# */ +#--------------------------------------------------------------------- + +import logging +import re + +# Define the mapping of physim_test values to search patterns +PHYSIM_PATTERN_MAPPING = { + 'nr_ulsim': [ + r'(Total PHY proc rx)\s+(\d+\.\d+)\s+us', # Pattern for RX PHY processing time + r'(ULSCH total decoding time)\s+(\d+\.\d+)\s+us', # Pattern for ULSCH decoding time + ], + 'nr_dlsim': [ + r'(PHY proc tx)\s+(\d+\.\d+)\s+us', # Pattern for TX PHY processing time + r'(DLSCH encoding time)\s+(\d+\.\d+)\s+us', # Pattern for DLSCH encoding time + ], + 'ldpctest': [ + r'(Encoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for encoding time mean + r'(Decoding time mean):\s+(\d+\.\d+)\s+us', # Pattern for decoding time mean + ], +} +# Define test conditions based on the simulation type +PHYSIM_TEST_CONDITION = { + 'nr_ulsim': 'test OK', # For nr_ulsim, check if 'test OK' is present + 'nr_dlsim': 'test OK', # For nr_dlsim, check if 'test OK' is present + 'ldpctest': None, # No condition for ldpctest, just process the patterns +} + +class Analysis(): + + def analyze_physim(log, physim_test, options, threshold): + search_patterns = PHYSIM_PATTERN_MAPPING.get(physim_test) + test_condition = PHYSIM_TEST_CONDITION.get(physim_test) + success = False + msg = '' + + try: + with open(log, 'r') as f: + log_content = f.read() + except FileNotFoundError as e: + msg = f'{log} file not found, exception: {e}' + return False, msg + except Exception as e: + msg = f'Error while parsing log file {log}: exception: {e}' + return False, msg + + if test_condition and test_condition not in log_content: + msg = f"Test did not succeed, '{test_condition}' not found in log file {log}." + return False, msg + + time1_match = re.search(search_patterns[0], log_content) + time2_match = re.search(search_patterns[1], log_content) + if not(time1_match and time2_match): + msg = f"Processing time not found in log file {log}." + return False, msg + + success = float(time2_match.group(2)) < float(threshold) + if success: + msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us' + else: + msg = f'{time1_match.group(1)}: {time1_match.group(2)} us\n{time2_match.group(1)}: {time2_match.group(2)} us exceeds a limit of {threshold} us' + + return success,msg diff --git a/ci-scripts/cls_native.py b/ci-scripts/cls_native.py index d9c281907a..8f4d90ea84 100644 --- a/ci-scripts/cls_native.py +++ b/ci-scripts/cls_native.py @@ -22,11 +22,15 @@ import logging import re +import os import cls_cmd import cls_oai_html +import cls_analysis import constants as CONST +LOG_PATH_PHYSIM = 'phy_sim_logs' + class Native(): def Build(test_case, HTML, host, directory, options): @@ -62,3 +66,19 @@ class Native(): logging.error('\u001B[1m Building OAI Failed\u001B[0m') HTML.CreateHtmlTestRow(options, 'KO', CONST.ALL_PROCESSES_OK) return success + + def Run_Physim(HTML, host, directory, options, physim_test, threshold): + logging.debug(f'Runnin {physim_test} on server: {host}') + workSpacePath = f'{directory}/cmake_targets' + os.system(f'mkdir -p ./{LOG_PATH_PHYSIM}') + runLogFile=f'physim_{HTML.testCase_id}.log' + with cls_cmd.getConnection(host) as cmd: + cmd.run(f'sudo {workSpacePath}/ran_build/build/{physim_test} {options} >> {workSpacePath}/{runLogFile}') + cmd.copyin(src=f'{workSpacePath}/{runLogFile}', tgt=f'{LOG_PATH_PHYSIM}/{runLogFile}') + success, msg = cls_analysis.Analysis.analyze_physim(f'{LOG_PATH_PHYSIM}/{runLogFile}', physim_test, options, threshold) + if success: + HTML.CreateHtmlTestRowQueue(options, 'OK', [msg]) + else: + logging.error(msg) + HTML.CreateHtmlTestRowQueue(options, 'KO', [msg]) + return success diff --git a/ci-scripts/cls_physim.py b/ci-scripts/cls_physim.py deleted file mode 100644 index 209611bf6f..0000000000 --- a/ci-scripts/cls_physim.py +++ /dev/null @@ -1,148 +0,0 @@ -# * Licensed to the OpenAirInterface (OAI) Software Alliance under one or more -# * contributor license agreements. See the NOTICE file distributed with -# * this work for additional information regarding copyright ownership. -# * The OpenAirInterface Software Alliance licenses this file to You under -# * the OAI Public License, Version 1.1 (the "License"); you may not use this file -# * except in compliance with the License. -# * You may obtain a copy of the License at -# * -# * http://www.openairinterface.org/?page_id=698 -# * -# * Unless required by applicable law or agreed to in writing, software -# * distributed under the License is distributed on an "AS IS" BASIS, -# * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -# * See the License for the specific language governing permissions and -# * limitations under the License. -# *------------------------------------------------------------------------------- -# * For more information about the OpenAirInterface (OAI) Software Alliance: -# * contact@openairinterface.org -# */ -#--------------------------------------------------------------------- -# Python for CI of OAI-eNB + COTS-UE -# -# Required Python Version -# Python 3.x -# -# Required Python Package -# pexpect -#--------------------------------------------------------------------- - -#to use logging.info() -import logging -#to create a SSH object locally in the methods -import sshconnection -#to update the HTML object -import cls_oai_html -import cls_cmd -#for log folder maintenance -import os -import re - -class PhySim: - def __init__(self): - self.runargs = "" - self.eNBIpAddr = "" - self.eNBUserName = "" - self.eNBPassWord = "" - self.eNBSourceCodePath = "" - #private attributes - self.__workSpacePath='' - self.__runLogFile='' - self.__runLogPath='phy_sim_logs' - - -#----------------- -#PRIVATE Methods -#----------------- - - def __CheckResults_LDPCcudaTest(self,HTML,CONST,testcase_id): - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - #retrieve run log file and store it locally$ - mySSH.copyin(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord, self.__workSpacePath+self.__runLogFile, '.') - mySSH.close() - #parse results looking for Encoding and Decoding mean values - runResults=[] - with open(self.__runLogFile) as f: - for line in f: - if 'mean' in line: - runResults.append(line) - #the values are appended for each mean value (2), so we take these 2 values from the list - info = runResults[0] + runResults[1] - - #once parsed move the local logfile to its folder for tidiness - os.system('mv '+self.__runLogFile+' '+ self.__runLogPath+'/.') - - HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info]) - return True - - def __CheckResults_LDPCt2Test(self,HTML,CONST,testcase_id): - thrs_KO = int(self.timethrs) - mySSH = cls_cmd.getConnection(self.eNBIpAddr) - #retrieve run log file and store it locally$ - mySSH.copyin(f'{self.__workSpacePath}{self.__runLogFile}', f'{self.__runLogFile}') - mySSH.close() - #parse results looking for encoder/decoder processing time values - - with open(self.__runLogFile) as g: - for line in g: - res_enc = re.search(r"DLSCH encoding time\s+(\d+\.\d+)\s+us",line) - res_dec = re.search(r'ULSCH total decoding time\s+(\d+\.\d+)\s+us',line) - if res_dec is not None: - time = res_dec.group(1) - info = res_dec.group(0) - break - if res_enc is not None: - time = res_enc.group(1) - info = res_enc.group(0) - break - - # In case the T2 board does work properly, there is no statistics - if res_enc is None and res_dec is None: - logging.error(f'no statistics: res_enc {res_enc} res_dec {res_dec}') - HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', ['no statistics']) - os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.') - return False - - #once parsed move the local logfile to its folder - os.system(f'mv {self.__runLogFile} {self.__runLogPath}/.') - success = float(time) < thrs_KO - if success: - HTML.CreateHtmlTestRowQueue(self.runargs, 'OK', [info]) - else: - error_msg = f'Processing time exceeds a limit of {thrs_KO} us' - logging.error(error_msg) - HTML.CreateHtmlTestRowQueue(self.runargs, 'KO', [info + '\n' + error_msg]) - return success - -#-----------------$ -#PUBLIC Methods$ -#-----------------$ - def Run_CUDATest(self,htmlObj,constObj,testcase_id): - self.__workSpacePath = self.eNBSourceCodePath+'/cmake_targets/' - #create run logs folder locally - os.system('mkdir -p ./'+self.__runLogPath) - #log file is tc_.log remotely - self.__runLogFile='physim_'+str(testcase_id)+'.log' - #open a session for test run - mySSH = sshconnection.SSHConnection() - mySSH.open(self.eNBIpAddr, self.eNBUserName, self.eNBPassWord) - mySSH.command('cd '+self.__workSpacePath,'\$',5) - #run and redirect the results to a log file - mySSH.command(self.__workSpacePath+'ran_build/build/ldpctest ' + self.runargs + ' >> '+self.__runLogFile, '\$', 30) - mySSH.close() - return self.__CheckResults_LDPCcudaTest(htmlObj,constObj,testcase_id) - - def Run_T2Test(self,htmlObj,constObj,testcase_id): - self.__workSpacePath = f'{self.eNBSourceCodePath}/cmake_targets/' - #create run logs folder locally - os.system(f'mkdir -p ./{self.__runLogPath}') - #log file is tc_.log remotely - self.__runLogFile=f'physim_{str(testcase_id)}.log' - #open a session for test run - mySSH = cls_cmd.getConnection(self.eNBIpAddr) - mySSH.run(f'cd {self.__workSpacePath}') - #run and redirect the results to a log file - mySSH.run(f'sudo {self.__workSpacePath}ran_build/build/{self.runsim} {self.runargs} > {self.__workSpacePath}{self.__runLogFile} 2>&1') - mySSH.close() - return self.__CheckResults_LDPCt2Test(htmlObj,constObj,testcase_id) diff --git a/ci-scripts/main.py b/ci-scripts/main.py index e5c2f221f2..6ef49877c6 100644 --- a/ci-scripts/main.py +++ b/ci-scripts/main.py @@ -39,7 +39,6 @@ import constants as CONST import cls_oaicitest #main class for OAI CI test framework -import cls_physim #class PhySim for physical simulators build and test import cls_containerize #class Containerize for all container-based operations on RAN/UE objects import cls_static_code_analysis #class for static code analysis import cls_physim1 #class PhySim for physical simulators deploy and run @@ -87,7 +86,6 @@ def CheckClassValidity(xml_class_list,action,id): resp=True return resp - #assigning parameters to object instance attributes (even if the attributes do not exist !!) def AssignParams(params_dict): @@ -95,9 +93,6 @@ def AssignParams(params_dict): setattr(CiTestObj, key, value) setattr(RAN, key, value) setattr(HTML, key, value) - setattr(ldpc, key, value) - - def ExecuteActionWithParam(action): global SSH @@ -108,7 +103,6 @@ def ExecuteActionWithParam(action): global SCA global PHYSIM global CLUSTER - global ldpc if action == 'Build_eNB' or action == 'Build_Image' or action == 'Build_Proxy' or action == "Build_Cluster_Image" or action == "Build_Run_Tests": RAN.Build_eNB_args=test.findtext('Build_eNB_args') CONTAINERS.imageKind=test.findtext('kind') @@ -365,14 +359,11 @@ def ExecuteActionWithParam(action): elif action == 'Create_Workspace': success = CONTAINERS.Create_Workspace(HTML) - elif action == 'Run_CUDATest' or action == 'Run_T2Test': - ldpc.runargs = test.findtext('physim_run_args') - ldpc.runsim = test.findtext('physim_run') - ldpc.timethrs = test.findtext('physim_time_threshold') - if action == 'Run_CUDATest': - success = ldpc.Run_CUDATest(HTML,CONST,id) - elif action == 'Run_T2Test': - success = ldpc.Run_T2Test(HTML,CONST,id) + elif action == 'Run_Physim': + physim_options = test.findtext('physim_run_args') + physim_test = test.findtext('physim_test') + physim_threshold = test.findtext('physim_time_threshold') or 'inf' + success = cls_native.Native.Run_Physim(HTML, RAN.eNBIPAddress, RAN.eNBSourceCodePath, physim_options, physim_test, physim_threshold) elif action == 'LicenceAndFormattingCheck': success = SCA.LicenceAndFormattingCheck(HTML) @@ -479,15 +470,12 @@ SCA = cls_static_code_analysis.StaticCodeAnalysis() PHYSIM = cls_physim1.PhySim() CLUSTER = cls_cluster.Cluster() -ldpc=cls_physim.PhySim() #create an instance for LDPC test using GPU or CPU build - - #----------------------------------------------------------- # Parsing Command Line Arguments #----------------------------------------------------------- import args_parse -py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,ldpc,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER) +py_param_file_present, py_params, mode = args_parse.ArgsParse(sys.argv,CiTestObj,RAN,HTML,EPC,CONTAINERS,HELP,SCA,PHYSIM,CLUSTER) diff --git a/ci-scripts/xml_class_list.yml b/ci-scripts/xml_class_list.yml index 27b179c8f8..a526058af0 100755 --- a/ci-scripts/xml_class_list.yml +++ b/ci-scripts/xml_class_list.yml @@ -1,8 +1,7 @@ - Build_Proxy - Build_Cluster_Image - Pull_Cluster_Image - - Run_CUDATest - - Run_T2Test + - Run_Physim - Build_eNB - Initialize_eNB - Terminate_eNB diff --git a/ci-scripts/xml_files/ldpc_gpu_test.xml b/ci-scripts/xml_files/ldpc_gpu_test.xml index d50a841b16..f129d6bd2b 100644 --- a/ci-scripts/xml_files/ldpc_gpu_test.xml +++ b/ci-scripts/xml_files/ldpc_gpu_test.xml @@ -29,122 +29,162 @@ - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 3872 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 3872 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 4224 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 4224 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 4576 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 4576 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 4928 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 4928 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 5280 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 5280 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 5632 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 5632 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 6336 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 6336 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 7040 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 7040 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 7744 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 7744 -s10 -n100 -G 1 - Run_CUDATest + Run_Physim Run LDPC Test with CPU + true + ldpctest -l 8448 -s10 -n100 - Run_CUDATest + Run_Physim Run LDPC Test with GPU + true + ldpctest -l 8448 -s10 -n100 -G 1 diff --git a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml index 4e44f7f853..8fe7fcf126 100644 --- a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml +++ b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml @@ -31,163 +31,163 @@ - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 300 -n100 -s30 -S30.2 -m5 -r106 -R106 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 100 -n100 -s30 -S30.2 -m5 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 300 -n100 -s30 -S30.2 -m15 -r106 -R106 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 150 -n100 -s30 -S30.2 -m15 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 250 -n100 -s30 -S30.2 -m25 -r106 -R106 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer true - nr_ulsim + nr_ulsim 250 -n100 -s30 -S30.2 -m25 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 300 -n100 -s30 -S30.2 -m5 -r273 -R273 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 150 -n100 -s30 -S30.2 -m5 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 400 -n100 -s30 -S30.2 -m15 -r273 -R273 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 350 -n100 -s30 -S30.2 -m15 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 400 -n100 -s30 -S30.2 -m25 -r273 -R273 -C10 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer true - nr_ulsim + nr_ulsim 550 -n100 -s30 -S30.2 -m25 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 300 -n100 -s30 -S30.2 -m5 -r273 -R273 -C10 -W2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 250 -n100 -s30 -S30.2 -m5 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 600 -n100 -s30 -S30.2 -m15 -r273 -R273 -C10 -W2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 650 -n100 -s30 -S30.2 -m15 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_ulsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 650 -n100 -s30 -S30.2 -m25 -r273 -R273 -C10 -W2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_ulsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers true - nr_ulsim + nr_ulsim 1100 -n100 -s30 -S30.2 -m25 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 diff --git a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml index cff66b56a4..df6c613393 100644 --- a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml +++ b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml @@ -32,217 +32,217 @@ - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 230 -n100 -s30 -S30.2 -e5 -b106 -R106 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 100 -n100 -s30 -S30.2 -e5 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 300 -n100 -s30 -S30.2 -e15 -b106 -R106 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 100 -n100 -s30 -S30.2 -e15 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 350 -n100 -s30 -S30.2 -e25 -b106 -R106 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 106 PRBs, 1 layer true - nr_dlsim + nr_dlsim 200 -n100 -s30 -S30.2 -e25 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 300 -n100 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 150 -n100 -s30 -S30.2 -e5 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 350 -n100 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 250 -n100 -s30 -S30.2 -e15 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 400 -n100 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 1 layer true - nr_dlsim + nr_dlsim 400 -n100 -s30 -S30.2 -e25 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 400 -n100 -s30 -S30.2 -e5 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 200 -n100 -s30 -S30.2 -e5 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 15, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 450 -n100 -s30 -S30.2 -e15 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 15, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 500 -n100 -s30 -S30.2 -e15 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 25, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 500 -n100 -s30 -S30.2 -e25 -b273 -R273 -X 8,9,10,11,12 -x2 -z2 -y2 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 25, 273 PRBs, 2 layers true - nr_dlsim + nr_dlsim 500 -n100 -s30 -S30.2 -e25 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 400 -n100 -s30 -S30.2 -e5 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 150 -n100 -s30 -S30.2 -e5 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 400 -n100 -s30 -S30.2 -e15 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 20, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 300 -n100 -s30 -S30.2 -e15 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 - Run_T2Test + Run_Physim Run nr_dlsim with CPU: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 450 -n100 -s30 -S30.2 -e25 -b273 -R273 -X8,9,10,11,12 -x2 -z4 -y4 -P - Run_T2Test + Run_Physim Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 27, 273 PRBs, 2 layers, 4 antennas true - nr_dlsim + nr_dlsim 450 -n100 -s30 -S30.2 -e25 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 From fff605eab9b389a93f5932d438af5043bf2f6b1f Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Fri, 8 Nov 2024 21:15:35 +0100 Subject: [PATCH 4/5] Add measurement of total gNB TX processing time for nr_dlsim --- openair1/SIMULATION/NR_PHY/dlsim.c | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/openair1/SIMULATION/NR_PHY/dlsim.c b/openair1/SIMULATION/NR_PHY/dlsim.c index 9ab2de4215..70d1578a31 100644 --- a/openair1/SIMULATION/NR_PHY/dlsim.c +++ b/openair1/SIMULATION/NR_PHY/dlsim.c @@ -942,6 +942,7 @@ int main(int argc, char **argv) for (SNR = snr0; SNR < snr1; SNR += .2) { varArray_t *table_tx=initVarArray(1000,sizeof(double)); + reset_meas(&gNB->phy_proc_tx); reset_meas(&gNB->dlsch_scrambling_stats); reset_meas(&gNB->dlsch_interleaving_stats); reset_meas(&gNB->dlsch_rate_matching_stats); @@ -1035,11 +1036,13 @@ int main(int argc, char **argv) msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.bchPayload=0x001234; msgDataTx->ssb[0].ssb_pdu.ssb_pdu_rel15.SsbBlockIndex = 0; msgDataTx->gNB = gNB; - if (run_initial_sync) + if (run_initial_sync) { nr_common_signal_procedures(gNB,frame,slot,msgDataTx->ssb[0].ssb_pdu); - else + } else { + start_meas(&gNB->phy_proc_tx); phy_procedures_gNB_TX(msgDataTx,frame,slot,1); - + stop_meas(&gNB->phy_proc_tx); + } int txdataF_offset = slot * frame_parms->samples_per_slot_wCP; if (n_trials==1) { From 9e81040a8d12eaa35a98f78077acb165f34ef3b1 Mon Sep 17 00:00:00 2001 From: Jaroslava Fiedlerova Date: Fri, 8 Nov 2024 22:09:14 +0100 Subject: [PATCH 5/5] CI: use multiple cores for nr_ulsim/nr_dlsim tests with T2 Increase number of cores used for T2 nr_ulsim/nr_dlsim processing to ensure a fair comparison of total gNB PHY RX/TX processing time. --- .../xml_files/t2_offload_dec_nr_ulsim.xml | 18 ++++++------- .../xml_files/t2_offload_enc_nr_dlsim.xml | 26 +++++++++---------- 2 files changed, 22 insertions(+), 22 deletions(-) diff --git a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml index 8fe7fcf126..7cbbbcaf14 100644 --- a/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml +++ b/ci-scripts/xml_files/t2_offload_dec_nr_ulsim.xml @@ -45,7 +45,7 @@ true nr_ulsim 100 - -n100 -s30 -S30.2 -m5 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m5 -r106 -R106 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -63,7 +63,7 @@ true nr_ulsim 150 - -n100 -s30 -S30.2 -m15 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m15 -r106 -R106 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -81,7 +81,7 @@ true nr_ulsim 250 - -n100 -s30 -S30.2 -m25 -r106 -R106 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m25 -r106 -R106 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -99,7 +99,7 @@ true nr_ulsim 150 - -n100 -s30 -S30.2 -m5 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m5 -r273 -R273 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -117,7 +117,7 @@ true nr_ulsim 350 - -n100 -s30 -S30.2 -m15 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m15 -r273 -R273 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -135,7 +135,7 @@ true nr_ulsim 550 - -n100 -s30 -S30.2 -m25 -r273 -R273 -o -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m25 -r273 -R273 -C10 -o -P --ldpc_offload.dpdk_dev d8:00.0 @@ -153,7 +153,7 @@ true nr_ulsim 250 - -n100 -s30 -S30.2 -m5 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m5 -r273 -R273 -C10 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -171,7 +171,7 @@ true nr_ulsim 650 - -n100 -s30 -S30.2 -m15 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m15 -r273 -R273 -C10 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -189,7 +189,7 @@ true nr_ulsim 1100 - -n100 -s30 -S30.2 -m25 -r273 -R273 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -m25 -r273 -R273 -C10 -o -W2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 diff --git a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml index df6c613393..c4dba5db6c 100644 --- a/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml +++ b/ci-scripts/xml_files/t2_offload_enc_nr_dlsim.xml @@ -46,7 +46,7 @@ true nr_dlsim 100 - -n100 -s30 -S30.2 -e5 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e5 -b106 -R106 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -64,7 +64,7 @@ true nr_dlsim 100 - -n100 -s30 -S30.2 -e15 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e15 -b106 -R106 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -82,7 +82,7 @@ true nr_dlsim 200 - -n100 -s30 -S30.2 -e25 -b106 -R106 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e25 -b106 -R106 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -100,7 +100,7 @@ true nr_dlsim 150 - -n100 -s30 -S30.2 -e5 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e5 -b273 -R273 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -118,7 +118,7 @@ true nr_dlsim 250 - -n100 -s30 -S30.2 -e15 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e15 -b273 -R273 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -136,7 +136,7 @@ true nr_dlsim 400 - -n100 -s30 -S30.2 -e25 -b273 -R273 -c -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e25 -b273 -R273 -c -X4,5,6,7,8,9 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -154,7 +154,7 @@ true nr_dlsim 200 - -n100 -s30 -S30.2 -e5 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e5 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -172,7 +172,7 @@ true nr_dlsim 500 - -n100 -s30 -S30.2 -e15 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e15 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -190,7 +190,7 @@ true nr_dlsim 500 - -n100 -s30 -S30.2 -e25 -b273 -R273 -c -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e25 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z2 -y2 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -207,8 +207,8 @@ Run nr_dlsim with T2 LDPC offload: SNR = 30, MCS = 5, 273 PRBs, 2 layers, 4 antennas true nr_dlsim - 150 - -n100 -s30 -S30.2 -e5 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 + 200 + -n100 -s30 -S30.2 -e5 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -226,7 +226,7 @@ true nr_dlsim 300 - -n100 -s30 -S30.2 -e15 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e15 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 @@ -244,6 +244,6 @@ true nr_dlsim 450 - -n100 -s30 -S30.2 -e25 -b273 -R273 -c -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0 + -n100 -s30 -S30.2 -e25 -b273 -R273 -c -X4,5,6,7,8,9 -x2 -z4 -y4 -P --ldpc_offload.dpdk_dev d8:00.0