create Function

private function create(self, platform, ipencil, pencils, comm, local_comms, base_dtype, base_storage, effort, backend, base_init_dtype, base_init_storage, bricks, is_final_enabled) result(error_code)

Creates reshape plan

This function initializes the reshape plan by creating communicators for brick layouts, setting up grid decompositions, and allocating reshape operation plans.

Type Bound

reshape_plan

Arguments

Type IntentOptional Attributes Name
class(reshape_plan), intent(inout) :: self

Reshape plan to be initialized

type(dtfft_platform_t), intent(in) :: platform

Platform to create plan for (HOST or CUDA)

type(pencil_init), intent(in) :: ipencil

Pencil decomposition passed by user

type(pencil), intent(in) :: pencils(:)

Array of pencil decompositions for different layouts

type(MPI_Comm), intent(in) :: comm

Global MPI communicator

type(MPI_Comm), intent(in) :: local_comms(:)

Local MPI communicators for each dimension

type(MPI_Datatype), intent(in) :: base_dtype

Base MPI datatype for complex data

integer(kind=int64), intent(in) :: base_storage

Number of bytes needed to store single complex element

type(dtfft_effort_t), intent(in) :: effort

dtFFT planner effort level (ESTIMATE, MEASURE, PATIENT, EXHAUSTIVE)

type(dtfft_backend_t), intent(in) :: backend

Communication backend to use

type(MPI_Datatype), intent(in) :: base_init_dtype

Base MPI datatype for real data

integer(kind=int64), intent(in) :: base_init_storage

Number of bytes needed to store single real element

type(pencil), intent(out) :: bricks(:)

Pencils describing brick data distribution

logical, intent(out) :: is_final_enabled

Flag indicating if final reshape in Fourier space is enabled

Return Value integer(kind=int32)

Error code: DTFFT_SUCCESS on success


Calls

proc~~create~9~~CallsGraph proc~create~9 reshape_plan%create final_comms final_comms proc~create~9->final_comms final_sizes final_sizes proc~create~9->final_sizes interface~to_str to_str proc~create~9->interface~to_str mpi_allreduce mpi_allreduce proc~create~9->mpi_allreduce mpi_comm_dup mpi_comm_dup proc~create~9->mpi_comm_dup mpi_comm_free mpi_comm_free proc~create~9->mpi_comm_free mpi_comm_rank mpi_comm_rank proc~create~9->mpi_comm_rank mpi_comm_size mpi_comm_size proc~create~9->mpi_comm_size mpi_wtime mpi_wtime proc~create~9->mpi_wtime proc~autotune_reshape_plan autotune_reshape_plan proc~create~9->proc~autotune_reshape_plan proc~create_custom_comm create_custom_comm proc~create~9->proc~create_custom_comm proc~create_reshape_plans create_reshape_plans proc~create~9->proc~create_reshape_plans proc~create~11 pencil%create proc~create~9->proc~create~11 proc~get_compatible get_compatible proc~create~9->proc~get_compatible proc~get_conf_fourier_reshape_enabled get_conf_fourier_reshape_enabled proc~create~9->proc~get_conf_fourier_reshape_enabled proc~get_conf_log_enabled get_conf_log_enabled proc~create~9->proc~get_conf_log_enabled proc~get_conf_reshape_backend get_conf_reshape_backend proc~create~9->proc~get_conf_reshape_backend proc~get_local_sizes~2 get_local_sizes proc~create~9->proc~get_local_sizes~2 proc~init reshape_plan_base%init proc~create~9->proc~init proc~is_backend_compatible is_backend_compatible proc~create~9->proc~is_backend_compatible proc~is_backend_nccl is_backend_nccl proc~create~9->proc~is_backend_nccl proc~is_backend_nvshmem is_backend_nvshmem proc~create~9->proc~is_backend_nvshmem proc~pop_nvtx_domain_range pop_nvtx_domain_range proc~create~9->proc~pop_nvtx_domain_range proc~push_nvtx_domain_range push_nvtx_domain_range proc~create~9->proc~push_nvtx_domain_range proc~write_message write_message proc~create~9->proc~write_message proc~double_to_string double_to_string interface~to_str->proc~double_to_string proc~float_to_string float_to_string interface~to_str->proc~float_to_string proc~int32_to_string int32_to_string interface~to_str->proc~int32_to_string proc~int64_to_string int64_to_string interface~to_str->proc~int64_to_string proc~int8_to_string int8_to_string interface~to_str->proc~int8_to_string proc~autotune_reshape_plan->proc~create_reshape_plans proc~autotune_reshape_plan->proc~get_conf_log_enabled proc~autotune_reshape_plan->proc~is_backend_compatible proc~autotune_reshape_plan->proc~is_backend_nccl proc~autotune_reshape_plan->proc~is_backend_nvshmem proc~autotune_reshape_plan->proc~pop_nvtx_domain_range proc~autotune_reshape_plan->proc~push_nvtx_domain_range proc~autotune_reshape_plan->proc~write_message proc~create_helper~2 backend_helper%create_helper proc~autotune_reshape_plan->proc~create_helper~2 proc~destroy_helper~2 backend_helper%destroy_helper proc~autotune_reshape_plan->proc~destroy_helper~2 proc~destroy_plans destroy_plans proc~autotune_reshape_plan->proc~destroy_plans proc~dtfft_get_backend_string dtfft_get_backend_string proc~autotune_reshape_plan->proc~dtfft_get_backend_string proc~execute_autotune execute_autotune proc~autotune_reshape_plan->proc~execute_autotune proc~get_conf_datatype_enabled get_conf_datatype_enabled proc~autotune_reshape_plan->proc~get_conf_datatype_enabled proc~get_conf_mpi_enabled get_conf_mpi_enabled proc~autotune_reshape_plan->proc~get_conf_mpi_enabled proc~get_conf_nccl_enabled get_conf_nccl_enabled proc~autotune_reshape_plan->proc~get_conf_nccl_enabled proc~get_conf_nvshmem_enabled get_conf_nvshmem_enabled proc~autotune_reshape_plan->proc~get_conf_nvshmem_enabled proc~get_conf_pipelined_enabled get_conf_pipelined_enabled proc~autotune_reshape_plan->proc~get_conf_pipelined_enabled proc~is_backend_mpi is_backend_mpi proc~autotune_reshape_plan->proc~is_backend_mpi proc~is_backend_pipelined is_backend_pipelined proc~autotune_reshape_plan->proc~is_backend_pipelined proc~create_custom_comm->mpi_comm_rank proc~create_custom_comm->mpi_comm_size mpi_comm_split mpi_comm_split proc~create_custom_comm->mpi_comm_split proc~allocate_plans allocate_plans proc~create_reshape_plans->proc~allocate_plans proc~create abstract_reshape_handle%create proc~create_reshape_plans->proc~create proc~create~11->mpi_comm_size mpi_allgather mpi_allgather proc~create~11->mpi_allgather proc~check_if_even check_if_even proc~create~11->proc~check_if_even proc~destroy~11 pencil%destroy proc~create~11->proc~destroy~11 proc~get_local_size get_local_size proc~create~11->proc~get_local_size proc~get_compatible->proc~is_backend_nccl proc~get_compatible->proc~is_backend_nvshmem proc~get_compatible->proc~is_backend_mpi interface~get_conf_internal get_conf_internal proc~get_conf_fourier_reshape_enabled->interface~get_conf_internal proc~get_conf_log_enabled->interface~get_conf_internal proc~get_correct_backend get_correct_backend proc~get_conf_reshape_backend->proc~get_correct_backend proc~init->proc~get_conf_datatype_enabled proc~init->proc~get_conf_mpi_enabled proc~init->proc~get_conf_nccl_enabled proc~init->proc~get_conf_nvshmem_enabled proc~get_conf_stream get_conf_stream proc~init->proc~get_conf_stream proc~load_cuda load_cuda proc~init->proc~load_cuda proc~load_nvrtc load_nvrtc proc~init->proc~load_nvrtc proc~is_backend_compatible->proc~is_backend_nccl proc~is_backend_compatible->proc~is_backend_nvshmem proc~is_backend_compatible->proc~is_backend_mpi interface~nvtxdomainrangepop_c nvtxDomainRangePop_c proc~pop_nvtx_domain_range->interface~nvtxdomainrangepop_c interface~nvtxdomainrangepushex_c nvtxDomainRangePushEx_c proc~push_nvtx_domain_range->interface~nvtxdomainrangepushex_c proc~astring_f2c astring_f2c proc~push_nvtx_domain_range->proc~astring_f2c proc~create_nvtx_domain create_nvtx_domain proc~push_nvtx_domain_range->proc~create_nvtx_domain proc~write_message->mpi_comm_rank mpi_finalized mpi_finalized proc~write_message->mpi_finalized proc~get_conf_internal_int32 get_conf_internal_int32 interface~get_conf_internal->proc~get_conf_internal_int32 proc~get_conf_internal_logical get_conf_internal_logical interface~get_conf_internal->proc~get_conf_internal_logical proc~string_f2c string_f2c proc~astring_f2c->proc~string_f2c proc~check_if_even->mpi_comm_size proc~check_if_even->mpi_allgather create_private create_private proc~create->create_private proc~get_reshape_type get_reshape_type proc~create->proc~get_reshape_type proc~get_transpose_type get_transpose_type proc~create->proc~get_transpose_type proc~is_valid_reshape_type is_valid_reshape_type proc~create->proc~is_valid_reshape_type proc~is_valid_transpose_type is_valid_transpose_type proc~create->proc~is_valid_transpose_type proc~create_helper~2->mpi_comm_rank proc~create_helper~2->mpi_comm_size proc~create_helper~2->mpi_allgather proc~create_helper~2->proc~destroy_helper~2 fname fname proc~create_helper~2->fname interface~get_env get_env proc~create_helper~2->interface~get_env interface~ncclcomminitrank ncclCommInitRank proc~create_helper~2->interface~ncclcomminitrank interface~ncclgetuniqueid ncclGetUniqueId proc~create_helper~2->interface~ncclgetuniqueid mpi_abort mpi_abort proc~create_helper~2->mpi_abort mpi_bcast mpi_bcast proc~create_helper~2->mpi_bcast proc~ncclgeterrorstring ncclGetErrorString proc~create_helper~2->proc~ncclgeterrorstring proc~create_nvtx_domain->proc~astring_f2c interface~nvtxdomaincreate_c nvtxDomainCreate_c proc~create_nvtx_domain->interface~nvtxdomaincreate_c proc~destroy_helper~2->proc~write_message proc~destroy_helper~2->fname interface~ncclcommdestroy ncclCommDestroy proc~destroy_helper~2->interface~ncclcommdestroy proc~destroy_helper~2->mpi_abort proc~destroy_helper~2->proc~ncclgeterrorstring destroy destroy proc~destroy_plans->destroy proc~execute_autotune->mpi_wtime execute execute proc~execute_autotune->execute proc~execute_autotune->fname interface~cudaeventcreate cudaEventCreate proc~execute_autotune->interface~cudaeventcreate interface~cudaeventdestroy cudaEventDestroy proc~execute_autotune->interface~cudaeventdestroy interface~cudaeventelapsedtime cudaEventElapsedTime proc~execute_autotune->interface~cudaeventelapsedtime interface~cudaeventrecord cudaEventRecord proc~execute_autotune->interface~cudaeventrecord interface~cudaeventsynchronize cudaEventSynchronize proc~execute_autotune->interface~cudaeventsynchronize interface~cudastreamsynchronize cudaStreamSynchronize proc~execute_autotune->interface~cudastreamsynchronize proc~execute_autotune->mpi_abort proc~alloc_and_set_aux alloc_and_set_aux proc~execute_autotune->proc~alloc_and_set_aux proc~alloc_mem alloc_mem proc~execute_autotune->proc~alloc_mem proc~cudageterrorstring cudaGetErrorString proc~execute_autotune->proc~cudageterrorstring proc~dtfft_get_error_string dtfft_get_error_string proc~execute_autotune->proc~dtfft_get_error_string proc~free_mem free_mem proc~execute_autotune->proc~free_mem proc~get_conf_measure_iters get_conf_measure_iters proc~execute_autotune->proc~get_conf_measure_iters proc~get_conf_measure_warmup_iters get_conf_measure_warmup_iters proc~execute_autotune->proc~get_conf_measure_warmup_iters proc~report_timings report_timings proc~execute_autotune->proc~report_timings proc~get_conf_datatype_enabled->interface~get_conf_internal proc~get_conf_mpi_enabled->interface~get_conf_internal proc~get_conf_nccl_enabled->interface~get_conf_internal proc~get_conf_nvshmem_enabled->interface~get_conf_internal proc~get_conf_pipelined_enabled->interface~get_conf_internal proc~get_conf_stream->fname interface~cudastreamcreate cudaStreamCreate proc~get_conf_stream->interface~cudastreamcreate proc~get_conf_stream->mpi_abort proc~get_conf_stream->proc~cudageterrorstring proc~get_conf_platform get_conf_platform proc~get_correct_backend->proc~get_conf_platform proc~get_local_size->mpi_comm_rank proc~get_local_size->mpi_comm_size proc~get_local_size->mpi_allgather proc~destroy_strings destroy_strings proc~load_cuda->proc~destroy_strings proc~dynamic_load dynamic_load proc~load_cuda->proc~dynamic_load proc~load_nvrtc->proc~destroy_strings proc~load_nvrtc->proc~dynamic_load proc~get_env_base get_env_base interface~get_env->proc~get_env_base proc~get_env_int32 get_env_int32 interface~get_env->proc~get_env_int32 proc~get_env_int8 get_env_int8 interface~get_env->proc~get_env_int8 proc~get_env_logical get_env_logical interface~get_env->proc~get_env_logical proc~get_env_string get_env_string interface~get_env->proc~get_env_string proc~alloc_and_set_aux->mpi_allreduce proc~alloc_and_set_aux->mpi_abort proc~alloc_and_set_aux->proc~alloc_mem proc~alloc_and_set_aux->proc~dtfft_get_error_string proc~get_aux_bytes_generic get_aux_bytes_generic proc~alloc_and_set_aux->proc~get_aux_bytes_generic proc~alloc_mem->interface~to_str proc~alloc_mem->mpi_allreduce proc~alloc_mem->proc~get_conf_log_enabled proc~alloc_mem->proc~is_backend_nccl proc~alloc_mem->proc~is_backend_nvshmem proc~alloc_mem->proc~write_message proc~alloc_mem->proc~dtfft_get_backend_string proc~alloc_mem->fname proc~alloc_mem->mpi_abort proc~alloc_mem->proc~cudageterrorstring proc~alloc_mem->proc~ncclgeterrorstring interface~cudamalloc cudaMalloc proc~alloc_mem->interface~cudamalloc interface~cudamemgetinfo cudaMemGetInfo proc~alloc_mem->interface~cudamemgetinfo interface~ncclcommregister ncclCommRegister proc~alloc_mem->interface~ncclcommregister interface~ncclmemalloc ncclMemAlloc proc~alloc_mem->interface~ncclmemalloc interface~nvshmem_malloc nvshmem_malloc proc~alloc_mem->interface~nvshmem_malloc is_null_ptr is_null_ptr proc~alloc_mem->is_null_ptr proc~mem_alloc_host mem_alloc_host proc~alloc_mem->proc~mem_alloc_host temp temp proc~alloc_mem->temp interface~cudageterrorstring_c cudaGetErrorString_c proc~cudageterrorstring->interface~cudageterrorstring_c proc~string_c2f string_c2f proc~cudageterrorstring->proc~string_c2f proc~destroy_string string%destroy_string proc~destroy_strings->proc~destroy_string interface~is_null_ptr is_null_ptr proc~dynamic_load->interface~is_null_ptr proc~load_library load_library proc~dynamic_load->proc~load_library proc~load_symbol load_symbol proc~dynamic_load->proc~load_symbol proc~unload_library unload_library proc~dynamic_load->proc~unload_library proc~free_mem->interface~to_str proc~free_mem->proc~get_conf_log_enabled proc~free_mem->proc~is_backend_nccl proc~free_mem->proc~is_backend_nvshmem proc~free_mem->proc~write_message proc~free_mem->fname proc~free_mem->mpi_abort proc~free_mem->proc~ncclgeterrorstring interface~cudafree cudaFree proc~free_mem->interface~cudafree interface~mem_free_host mem_free_host proc~free_mem->interface~mem_free_host interface~ncclcommderegister ncclCommDeregister proc~free_mem->interface~ncclcommderegister interface~ncclmemfree ncclMemFree proc~free_mem->interface~ncclmemfree nvshmem_free nvshmem_free proc~free_mem->nvshmem_free proc~is_same_ptr is_same_ptr proc~free_mem->proc~is_same_ptr proc~get_conf_measure_iters->interface~get_conf_internal proc~get_conf_measure_warmup_iters->interface~get_conf_internal interface~ncclgeterrorstring_c ncclGetErrorString_c proc~ncclgeterrorstring->interface~ncclgeterrorstring_c proc~ncclgeterrorstring->proc~string_c2f proc~report_timings->interface~to_str proc~report_timings->mpi_allreduce proc~report_timings->mpi_comm_size proc~report_timings->proc~get_conf_log_enabled proc~report_timings->proc~write_message interface~is_null_ptr->interface~is_null_ptr proc~is_null_funptr is_null_funptr interface~is_null_ptr->proc~is_null_funptr proc~get_aux_bytes abstract_reshape_handle%get_aux_bytes proc~get_aux_bytes_generic->proc~get_aux_bytes proc~get_env_base->mpi_bcast proc~get_env_base->proc~destroy_string proc~get_env_int32->proc~write_message proc~get_env_int32->interface~get_env proc~get_env_int8->interface~get_env proc~get_env_logical->interface~get_env proc~get_env_string->proc~write_message proc~get_env_string->interface~get_env proc~get_env_string->proc~destroy_string proc~load_library->proc~astring_f2c proc~load_library->interface~is_null_ptr interface~dlopen dlopen proc~load_library->interface~dlopen proc~dl_error dl_error proc~load_library->proc~dl_error proc~load_symbol->proc~astring_f2c proc~load_symbol->interface~is_null_ptr interface~dlsym dlsym proc~load_symbol->interface~dlsym proc~load_symbol->proc~dl_error interface~aligned_alloc aligned_alloc proc~mem_alloc_host->interface~aligned_alloc proc~string_c2f->interface~is_null_ptr interface~dlclose dlclose proc~unload_library->interface~dlclose proc~unload_library->proc~dl_error proc~dl_error->proc~write_message proc~dl_error->proc~string_c2f interface~dlerror dlerror proc~dl_error->interface~dlerror