예제 #1
0
                elif 'l_rexi' in tsm_name or 'lg_rexi' in tsm_name:
                    params_timestep_sizes = params_timestep_sizes_rexi
                else:
                    print("Unable to identify time stepping method " +
                          tsm_name)
                    sys.exit(1)

                for pspace_num_cores_per_rank, pspace_num_threads_per_rank, p.runtime.timestep_size in product(
                        params_pspace_num_cores_per_rank,
                        params_pspace_num_threads_per_rank,
                        params_timestep_sizes):
                    pspace = JobParallelizationDimOptions('space')
                    pspace.num_cores_per_rank = pspace_num_cores_per_rank
                    pspace.num_threads_per_rank = pspace_num_threads_per_rank
                    pspace.num_ranks = 1
                    pspace.setup()

                    if not '_rexi' in p.runtime.timestepping_method:
                        p.runtime.rexi_method = ''

                        # Update TIME parallelization
                        ptime = JobParallelizationDimOptions('time')
                        ptime.num_cores_per_rank = 1
                        ptime.num_threads_per_rank = 1  #pspace.num_cores_per_rank
                        ptime.num_ranks = 1
                        ptime.setup()

                        p.setup_parallelization([pspace, ptime])

                        if verbose:
                            pspace.print()
            params_timestep_sizes = params_timestep_sizes_explicit_
        elif 'l_irk' in tsm_name or 'lg_irk' in tsm_name:
            params_timestep_sizes = params_timestep_sizes_implicit_
        elif '_sl' in tsm_name:
            params_timestep_sizes = params_timestep_sizes_sl_
        else:
            print("Unable to identify time stepping method " + tsm_name)
            sys.exit(1)

        for (pspace_num_cores_per_rank, pspace_num_threads_per_rank,
             p.runtime.timestep_size) in product(
                 params_pspace_num_cores_per_rank,
                 params_pspace_num_threads_per_rank, params_timestep_sizes):
            pspace = JobParallelizationDimOptions('space')
            pspace.num_cores_per_rank = pspace_num_cores_per_rank
            pspace.num_threads_per_rank = pspace_num_threads_per_rank
            pspace.num_ranks = 1
            pspace.setup()

            p.setup_parallelization([pspace])

            if verbose:
                pspace.print()
                p.parallelization.print()

            p.parallelization.max_wallclock_seconds = estimateWallclockTime(p)

            p.gen_jobscript_directory('job_bench_' + p.getUniqueID())

    p.write_compilecommands()