Changeset 4751 for palm/trunk


Ignore:
Timestamp:
Oct 19, 2020 5:03:07 PM (4 years ago)
Author:
knoop
Message:

New feature for palmtest to configure number of OpenMP threads per testcase

Location:
palm/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • palm/trunk/SCRIPTS/palmtest

    r4554 r4751  
    548548
    549549    def _execute(self, name, build_name):
    550         execution_failed = Executor.execute(
     550        cmd_list = [
     551            os.path.join(self.test_dir, 'trunk', 'SCRIPTS', 'palmrun'),
     552            '-c', '\"' + build_name + '\"',
     553            '-r', name,
     554            '-a', '\"' + ' '.join(self.test_case.activation_strings) + '\"',
     555            '-X', str(self.cores),
     556        ]
     557        if self.test_case.omp_num_threads_found:
     558            cmd_list.extend(
     559                [
     560                    '-O', str(self.test_case.omp_num_threads),
     561                ]
     562            )
     563        cmd_list.extend(
    551564            [
    552                 os.path.join(self.test_dir, 'trunk', 'SCRIPTS', 'palmrun'),
    553                 '-c', '\"' + build_name + '\"',
    554                 '-r', name,
    555                 '-a', '\"' + ' '.join(self.test_case.activation_strings) + '\"',
    556                 '-X', str(self.cores),
    557                 '-T', str(self.cores),
    558565                '-B',
    559566                '-v',
    560567                '-z',
    561             ],
     568            ]
     569        )
     570        execution_failed = Executor.execute(
     571            cmd_list,
    562572            cwd=self.test_dir,
    563573            verbose=self.verbose,
     
    944954            return True, colored('[missing \"allowed_number_of_cores\" keyword]', 'red')
    945955        self.allowed_number_of_cores = config['allowed_number_of_cores']
     956
     957        if 'omp_num_threads' in config:
     958            self.omp_num_threads_found = True
     959            self.omp_num_threads = config['omp_num_threads']
     960        else:
     961            self.omp_num_threads_found = False
    946962
    947963        if 'activation_strings' not in config:
  • palm/trunk/TESTS/cases/user_interface/case_config.yml

    r3912 r4751  
    1212  - 16
    1313
     14omp_num_threads: 2
     15
    1416activation_strings:
    1517  - "d3#"
Note: See TracChangeset for help on using the changeset viewer.