agile Program

Uses

  • program~~agile~~UsesGraph program~agile agile mpi mpi program~agile->mpi

AGILE solves a set of hyperbolic equations using adaptive mesh refinement on (multiple) GPUs


Calls

program~~agile~~CallsGraph program~agile agile mpi_init mpi_init program~agile->mpi_init proc~main main program~agile->proc~main proc~set_openacc_device set_openacc_device program~agile->proc~set_openacc_device proc~set_openmp_device set_openmp_device program~agile->proc~set_openmp_device mpi_wtime mpi_wtime proc~main->mpi_wtime phys_special_advance phys_special_advance proc~main->phys_special_advance proc~comm_finalize comm_finalize proc~main->proc~comm_finalize proc~comm_start comm_start proc~main->proc~comm_start proc~finish_gridvars finish_gridvars proc~main->proc~finish_gridvars proc~generate_plotfile generate_plotfile proc~main->proc~generate_plotfile proc~getbc getbc proc~main->proc~getbc proc~handle_particles handle_particles proc~main->proc~handle_particles proc~improve_initial_condition improve_initial_condition proc~main->proc~improve_initial_condition proc~init_gridvars init_gridvars proc~main->proc~init_gridvars proc~initialize_amrvac initialize_amrvac proc~main->proc~initialize_amrvac proc~initlevelone initlevelone proc~main->proc~initlevelone proc~mg_setup_multigrid mg_setup_multigrid proc~main->proc~mg_setup_multigrid proc~modify_ic modify_IC proc~main->proc~modify_ic proc~mpistop mpistop proc~main->proc~mpistop proc~particles_create particles_create proc~main->proc~particles_create proc~process process proc~main->proc~process proc~read_arguments read_arguments proc~main->proc~read_arguments proc~read_particles_snapshot read_particles_snapshot proc~main->proc~read_particles_snapshot proc~read_snapshot read_snapshot proc~main->proc~read_snapshot proc~resettree_convert resettree_convert proc~main->proc~resettree_convert proc~selectgrids selectgrids proc~main->proc~selectgrids proc~set_coordinate_system_from_config set_coordinate_system_from_config proc~main->proc~set_coordinate_system_from_config proc~settree settree proc~main->proc~settree proc~sync_geometry_host sync_geometry_host proc~main->proc~sync_geometry_host proc~time_spent_on_particles time_spent_on_particles proc~main->proc~time_spent_on_particles proc~timeintegration timeintegration proc~main->proc~timeintegration usr_init usr_init proc~main->usr_init acc_get_num_devices acc_get_num_devices proc~set_openacc_device->acc_get_num_devices acc_set_device_num acc_set_device_num proc~set_openacc_device->acc_set_device_num mpi_comm_rank mpi_comm_rank proc~set_openacc_device->mpi_comm_rank mpi_comm_split_type mpi_comm_split_type proc~set_openacc_device->mpi_comm_split_type proc~set_openmp_device->mpi_comm_rank proc~set_openmp_device->mpi_comm_split_type omp_get_num_devices omp_get_num_devices proc~set_openmp_device->omp_get_num_devices omp_set_default_device omp_set_default_device proc~set_openmp_device->omp_set_default_device mpi_barrier mpi_barrier proc~comm_finalize->mpi_barrier mpi_finalize mpi_finalize proc~comm_finalize->mpi_finalize proc~comm_start->mpi_comm_rank proc~comm_start->proc~mpistop mpi_comm_size mpi_comm_size proc~comm_start->mpi_comm_size mpi_type_get_extent mpi_type_get_extent proc~comm_start->mpi_type_get_extent proc~generate_plotfile->proc~mpistop phys_te_images phys_te_images proc~generate_plotfile->phys_te_images proc~imagedatavtk_mpi ImageDataVtk_mpi proc~generate_plotfile->proc~imagedatavtk_mpi proc~oneblock oneblock proc~generate_plotfile->proc~oneblock proc~onegrid onegrid proc~generate_plotfile->proc~onegrid proc~punstructuredvtk_mpi punstructuredvtk_mpi proc~generate_plotfile->proc~punstructuredvtk_mpi proc~punstructuredvtkb_mpi punstructuredvtkB_mpi proc~generate_plotfile->proc~punstructuredvtkb_mpi proc~tecplot tecplot proc~generate_plotfile->proc~tecplot proc~tecplot_mpi tecplot_mpi proc~generate_plotfile->proc~tecplot_mpi proc~unstructuredvtk unstructuredvtk proc~generate_plotfile->proc~unstructuredvtk proc~unstructuredvtk_mpi unstructuredvtk_mpi proc~generate_plotfile->proc~unstructuredvtk_mpi proc~unstructuredvtkb unstructuredvtkB proc~generate_plotfile->proc~unstructuredvtkb proc~unstructuredvtkb64 unstructuredvtkB64 proc~generate_plotfile->proc~unstructuredvtkb64 proc~getbc->mpi_wtime mpi_waitall mpi_waitall proc~getbc->mpi_waitall phys_boundary_adjust phys_boundary_adjust proc~getbc->phys_boundary_adjust proc~fill_boundary_after_gc fill_boundary_after_gc proc~getbc->proc~fill_boundary_after_gc proc~fill_boundary_before_gc fill_boundary_before_gc proc~getbc->proc~fill_boundary_before_gc proc~fill_coarse_boundary fill_coarse_boundary proc~getbc->proc~fill_coarse_boundary proc~getintbc getintbc proc~getbc->proc~getintbc proc~idecode~2 idecode proc~getbc->proc~idecode~2 proc~mpi_irecv_wrapper mpi_irecv_wrapper proc~getbc->proc~mpi_irecv_wrapper proc~mpi_isend_wrapper mpi_isend_wrapper proc~getbc->proc~mpi_isend_wrapper proc~nvtxendrange~2 nvtxEndRange proc~getbc->proc~nvtxendrange~2 proc~nvtxstartrange~2 nvtxStartRange proc~getbc->proc~nvtxstartrange~2 proc~skip_direction skip_direction proc~getbc->proc~skip_direction proc~handle_particles->mpi_wtime proc~handle_particles->proc~mpistop mpi_allreduce mpi_allreduce proc~handle_particles->mpi_allreduce proc~advance_particles advance_particles proc~handle_particles->proc~advance_particles proc~comm_particles_global comm_particles_global proc~handle_particles->proc~comm_particles_global proc~set_neighbor_ipe set_neighbor_ipe proc~handle_particles->proc~set_neighbor_ipe proc~update_gridvars update_gridvars proc~handle_particles->proc~update_gridvars proc~write_particle_output write_particle_output proc~handle_particles->proc~write_particle_output proc~improve_initial_condition->proc~getbc proc~improve_initial_condition->proc~mg_setup_multigrid phys_clean_divb phys_clean_divb proc~improve_initial_condition->phys_clean_divb proc~recalculateb recalculateB proc~improve_initial_condition->proc~recalculateb proc~init_gridvars->mpi_wtime phys_check phys_check proc~initialize_amrvac->phys_check phys_check_params phys_check_params proc~initialize_amrvac->phys_check_params proc~bc_data_init bc_data_init proc~initialize_amrvac->proc~bc_data_init proc~init nbprocs_info_t%init proc~initialize_amrvac->proc~init proc~init_comm_types init_comm_types proc~initialize_amrvac->proc~init_comm_types proc~initialize_vars initialize_vars proc~initialize_amrvac->proc~initialize_vars proc~read_data_init read_data_init proc~initialize_amrvac->proc~read_data_init proc~read_par_files read_par_files proc~initialize_amrvac->proc~read_par_files proc~initlevelone->proc~getbc alloc_node alloc_node proc~initlevelone->alloc_node proc~build_connectivity build_connectivity proc~initlevelone->proc~build_connectivity proc~getigrids getigrids proc~initlevelone->proc~getigrids proc~init_forest_root init_forest_root proc~initlevelone->proc~init_forest_root proc~initial_condition initial_condition proc~initlevelone->proc~initial_condition proc~mg_comm_init~3 mg_comm_init proc~mg_setup_multigrid->proc~mg_comm_init~3 proc~mg_set_methods~3 mg_set_methods proc~mg_setup_multigrid->proc~mg_set_methods~3 proc~mg_tree_from_amrvac mg_tree_from_amrvac proc~mg_setup_multigrid->proc~mg_tree_from_amrvac proc~modify_ic->proc~mpistop proc~sync_positions_host sync_positions_host proc~modify_ic->proc~sync_positions_host mpi_abort mpi_abort proc~mpistop->mpi_abort proc~particles_create->proc~mpistop proc~advect_create_particles advect_create_particles proc~particles_create->proc~advect_create_particles proc~gca_create_particles gca_create_particles proc~particles_create->proc~gca_create_particles proc~lorentz_create_particles Lorentz_create_particles proc~particles_create->proc~lorentz_create_particles proc~sample_create_particles sample_create_particles proc~particles_create->proc~sample_create_particles proc~process->proc~getbc proc~process->proc~sync_positions_host proc~read_arguments->mpi_finalize proc~get_fields_string get_fields_string proc~read_arguments->proc~get_fields_string proc~read_particles_snapshot->proc~mpistop mpi_bcast mpi_bcast proc~read_particles_snapshot->mpi_bcast proc~read_particles_snapshot->proc~comm_particles_global proc~read_from_snapshot read_from_snapshot proc~read_particles_snapshot->proc~read_from_snapshot proc~read_snapshot->proc~mpistop proc~read_snapshot->alloc_node proc~read_snapshot->mpi_barrier proc~read_snapshot->mpi_bcast mpi_file_close mpi_file_close proc~read_snapshot->mpi_file_close mpi_file_open mpi_file_open proc~read_snapshot->mpi_file_open mpi_file_seek mpi_file_seek proc~read_snapshot->mpi_file_seek proc~count_ix count_ix proc~read_snapshot->proc~count_ix proc~get_snapshot_index get_snapshot_index proc~read_snapshot->proc~get_snapshot_index proc~mpi_file_read_wrapper mpi_file_read_wrapper proc~read_snapshot->proc~mpi_file_read_wrapper proc~mpi_recv_wrapper mpi_recv_wrapper proc~read_snapshot->proc~mpi_recv_wrapper proc~mpi_send_wrapper mpi_send_wrapper proc~read_snapshot->proc~mpi_send_wrapper proc~read_forest read_forest proc~read_snapshot->proc~read_forest proc~read_snapshot_old read_snapshot_old proc~read_snapshot->proc~read_snapshot_old proc~snapshot_read_header snapshot_read_header proc~read_snapshot->proc~snapshot_read_header proc~resettree_convert->proc~getbc proc~amr_coarsen_refine amr_coarsen_refine proc~resettree_convert->proc~amr_coarsen_refine proc~forcedrefine_grid_io forcedrefine_grid_io proc~resettree_convert->proc~forcedrefine_grid_io proc~gather_isafety gather_isafety proc~selectgrids->proc~gather_isafety proc~igrid_active igrid_active proc~selectgrids->proc~igrid_active proc~set_coordinate_system set_coordinate_system proc~set_coordinate_system_from_config->proc~set_coordinate_system proc~settree->proc~amr_coarsen_refine proc~errest errest proc~settree->proc~errest mpi_reduce mpi_reduce proc~time_spent_on_particles->mpi_reduce proc~timeintegration->mpi_wtime proc~timeintegration->proc~finish_gridvars proc~timeintegration->proc~process proc~timeintegration->proc~time_spent_on_particles proc~timeintegration->mpi_bcast proc~timeintegration->mpi_file_close mpi_file_delete mpi_file_delete proc~timeintegration->mpi_file_delete proc~advance advance proc~timeintegration->proc~advance proc~fixgrid fixgrid proc~timeintegration->proc~fixgrid proc~mg_timers_show~3 mg_timers_show proc~timeintegration->proc~mg_timers_show~3 proc~timeintegration->proc~nvtxendrange~2 proc~timeintegration->proc~nvtxstartrange~2 proc~process_advanced process_advanced proc~timeintegration->proc~process_advanced proc~resettree resettree proc~timeintegration->proc~resettree proc~saveamrfile saveamrfile proc~timeintegration->proc~saveamrfile proc~timeintegration->proc~sync_positions_host proc~timetosave timetosave proc~timeintegration->proc~timetosave setdt setdt proc~timeintegration->setdt proc~advance->proc~handle_particles add_split_source add_split_source proc~advance->add_split_source proc~advect advect proc~advance->proc~advect proc~advance_particles->mpi_wtime proc~advance_particles->mpi_allreduce proc~comm_particles comm_particles proc~advance_particles->proc~comm_particles proc~select_active_particles select_active_particles proc~advance_particles->proc~select_active_particles proc~advect_create_particles->mpi_allreduce proc~advect_create_particles->mpi_bcast phys_to_primitive phys_to_primitive proc~advect_create_particles->phys_to_primitive proc~advect_update_payload advect_update_payload proc~advect_create_particles->proc~advect_update_payload proc~find_particle_ipe find_particle_ipe proc~advect_create_particles->proc~find_particle_ipe proc~interpolate_var interpolate_var proc~advect_create_particles->proc~interpolate_var proc~push_particle_into_particles_on_mype push_particle_into_particles_on_mype proc~advect_create_particles->proc~push_particle_into_particles_on_mype proc~unif_01 rng_t%unif_01 proc~advect_create_particles->proc~unif_01 proc~amr_coarsen_refine->proc~getbc proc~amr_coarsen_refine->proc~selectgrids proc~amr_coarsen_refine->mpi_barrier proc~amr_coarsen_refine->mpi_waitall proc~amr_coarsen_refine->proc~build_connectivity proc~amr_coarsen_refine->proc~getigrids getnode getnode proc~amr_coarsen_refine->getnode proc~amr_morton_order amr_Morton_order proc~amr_coarsen_refine->proc~amr_morton_order proc~coarsen_grid_siblings coarsen_grid_siblings proc~amr_coarsen_refine->proc~coarsen_grid_siblings proc~coarsen_tree_leaf coarsen_tree_leaf proc~amr_coarsen_refine->proc~coarsen_tree_leaf proc~comm_faces comm_faces proc~amr_coarsen_refine->proc~comm_faces proc~end_comm_faces end_comm_faces proc~amr_coarsen_refine->proc~end_comm_faces proc~exchange_coarsened_blocks exchange_coarsened_blocks proc~amr_coarsen_refine->proc~exchange_coarsened_blocks proc~get_level_range get_level_range proc~amr_coarsen_refine->proc~get_level_range proc~load_balance load_balance proc~amr_coarsen_refine->proc~load_balance proc~mg_update_refinement mg_update_refinement proc~amr_coarsen_refine->proc~mg_update_refinement proc~proper_nesting proper_nesting proc~amr_coarsen_refine->proc~proper_nesting proc~refine_grids refine_grids proc~amr_coarsen_refine->proc~refine_grids proc~refine_tree_leaf refine_tree_leaf proc~amr_coarsen_refine->proc~refine_tree_leaf proc~store_faces store_faces proc~amr_coarsen_refine->proc~store_faces putnode putnode proc~amr_coarsen_refine->putnode proc~bc_read_params bc_read_params proc~bc_data_init->proc~bc_read_params proc~lt2_create_from_data LT2_create_from_data proc~bc_data_init->proc~lt2_create_from_data proc~lt3_create_from_data LT3_create_from_data proc~bc_data_init->proc~lt3_create_from_data proc~read_vtk_structured_points~2 read_vtk_structured_points proc~bc_data_init->proc~read_vtk_structured_points~2 proc~add_to_c nbprocs_info_t%add_to_c proc~build_connectivity->proc~add_to_c proc~add_to_f nbprocs_info_t%add_to_f proc~build_connectivity->proc~add_to_f proc~add_to_srl nbprocs_info_t%add_to_srl proc~build_connectivity->proc~add_to_srl proc~alloc_buffers_c nbprocs_info_t%alloc_buffers_c proc~build_connectivity->proc~alloc_buffers_c proc~alloc_buffers_f nbprocs_info_t%alloc_buffers_f proc~build_connectivity->proc~alloc_buffers_f proc~alloc_buffers_srl nbprocs_info_t%alloc_buffers_srl proc~build_connectivity->proc~alloc_buffers_srl proc~find_neighbor find_neighbor proc~build_connectivity->proc~find_neighbor proc~identifyphysbound_connectivity identifyphysbound_connectivity proc~build_connectivity->proc~identifyphysbound_connectivity proc~reset nbprocs_info_t%reset proc~build_connectivity->proc~reset proc~comm_particles_global->proc~mpistop proc~comm_particles_global->mpi_waitall proc~comm_particles_global->proc~mpi_irecv_wrapper proc~comm_particles_global->proc~mpi_isend_wrapper proc~comm_particles_global->proc~mpi_recv_wrapper proc~comm_particles_global->proc~mpi_send_wrapper proc~comm_particles_global->proc~find_particle_ipe proc~pull_particle_from_particles_on_mype pull_particle_from_particles_on_mype proc~comm_particles_global->proc~pull_particle_from_particles_on_mype proc~comm_particles_global->proc~push_particle_into_particles_on_mype proc~errest->proc~mpistop proc~forcedrefine_grid forcedrefine_grid proc~errest->proc~forcedrefine_grid proc~lohner_grid lohner_grid proc~errest->proc~lohner_grid proc~bc_phys bc_phys proc~fill_boundary_after_gc->proc~bc_phys proc~fill_boundary_before_gc->proc~bc_phys proc~fill_coarse_boundary->proc~bc_phys proc~gather_isafety->proc~mpistop mpi_allgatherv mpi_allgatherv proc~gather_isafety->mpi_allgatherv proc~gca_create_particles->mpi_allreduce proc~gca_create_particles->mpi_bcast proc~gca_create_particles->proc~find_particle_ipe proc~gca_update_payload gca_update_payload proc~gca_create_particles->proc~gca_update_payload proc~get_lfac_from_velocity get_lfac_from_velocity proc~gca_create_particles->proc~get_lfac_from_velocity proc~get_vec get_vec proc~gca_create_particles->proc~get_vec proc~gca_create_particles->proc~push_particle_into_particles_on_mype proc~gca_create_particles->proc~unif_01 proc~getintbc->proc~sync_positions_host proc~imagedatavtk_mpi->proc~mpistop proc~imagedatavtk_mpi->mpi_allreduce proc~imagedatavtk_mpi->mpi_barrier proc~imagedatavtk_mpi->proc~mpi_recv_wrapper proc~imagedatavtk_mpi->proc~mpi_send_wrapper proc~calc_grid calc_grid proc~imagedatavtk_mpi->proc~calc_grid proc~calc_x calc_x proc~imagedatavtk_mpi->proc~calc_x proc~getheadernames getheadernames proc~imagedatavtk_mpi->proc~getheadernames proc~write_vti write_vti proc~imagedatavtk_mpi->proc~write_vti mpi_type_commit mpi_type_commit proc~init_comm_types->mpi_type_commit mpi_type_create_subarray mpi_type_create_subarray proc~init_comm_types->mpi_type_create_subarray proc~init_forest_root->getnode proc~init_forest_root->proc~amr_morton_order proc~find_root_neighbor find_root_neighbor proc~init_forest_root->proc~find_root_neighbor proc~get_morton_range get_Morton_range proc~init_forest_root->proc~get_morton_range proc~init_tree_leaf init_tree_leaf proc~init_forest_root->proc~init_tree_leaf proc~level1_morton_order level1_Morton_order proc~init_forest_root->proc~level1_morton_order proc~initial_condition->proc~mpistop proc~initial_condition->proc~sync_positions_host proc~initialize_vars->proc~mpistop proc~alloc_geometry alloc_geometry proc~initialize_vars->proc~alloc_geometry proc~check_pole_setup check_pole_setup proc~initialize_vars->proc~check_pole_setup proc~init_bc init_bc proc~initialize_vars->proc~init_bc proc~set_geometry_index_ranges set_geometry_index_ranges proc~initialize_vars->proc~set_geometry_index_ranges proc~set_pole set_pole proc~initialize_vars->proc~set_pole proc~lorentz_create_particles->mpi_allreduce proc~lorentz_create_particles->mpi_bcast proc~lorentz_create_particles->proc~find_particle_ipe proc~lorentz_create_particles->proc~get_lfac_from_velocity proc~lorentz_update_payload Lorentz_update_payload proc~lorentz_create_particles->proc~lorentz_update_payload proc~lorentz_create_particles->proc~push_particle_into_particles_on_mype proc~lorentz_create_particles->proc~unif_01 proc~mg_comm_init~3->mpi_init proc~mg_comm_init~3->mpi_comm_rank proc~mg_comm_init~3->mpi_comm_size mpi_initialized mpi_initialized proc~mg_comm_init~3->mpi_initialized proc~ahelmholtz_set_methods~3 ahelmholtz_set_methods proc~mg_set_methods~3->proc~ahelmholtz_set_methods~3 proc~helmholtz_set_methods~3 helmholtz_set_methods proc~mg_set_methods~3->proc~helmholtz_set_methods~3 proc~laplacian_set_methods~3 laplacian_set_methods proc~mg_set_methods~3->proc~laplacian_set_methods~3 proc~vhelmholtz_set_methods~3 vhelmholtz_set_methods proc~mg_set_methods~3->proc~vhelmholtz_set_methods~3 proc~vlaplacian_set_methods~3 vlaplacian_set_methods proc~mg_set_methods~3->proc~vlaplacian_set_methods~3 proc~mg_timers_show~3->mpi_reduce proc~mg_add_children~3 mg_add_children proc~mg_tree_from_amrvac->proc~mg_add_children~3 proc~mg_allocate_storage~3 mg_allocate_storage proc~mg_tree_from_amrvac->proc~mg_allocate_storage~3 proc~mg_build_rectangle~3 mg_build_rectangle proc~mg_tree_from_amrvac->proc~mg_build_rectangle~3 proc~mg_load_balance_parents~3 mg_load_balance_parents proc~mg_tree_from_amrvac->proc~mg_load_balance_parents~3 proc~mg_set_leaves_parents~3 mg_set_leaves_parents proc~mg_tree_from_amrvac->proc~mg_set_leaves_parents~3 proc~mg_set_neighbors_lvl~3 mg_set_neighbors_lvl proc~mg_tree_from_amrvac->proc~mg_set_neighbors_lvl~3 proc~mg_set_next_level_ids~3 mg_set_next_level_ids proc~mg_tree_from_amrvac->proc~mg_set_next_level_ids~3 proc~mg_set_refinement_boundaries~3 mg_set_refinement_boundaries proc~mg_tree_from_amrvac->proc~mg_set_refinement_boundaries~3 mpi_file_read mpi_file_read proc~mpi_file_read_wrapper->mpi_file_read mpi_irecv mpi_irecv proc~mpi_irecv_wrapper->mpi_irecv mpi_isend mpi_isend proc~mpi_isend_wrapper->mpi_isend mpi_recv mpi_recv proc~mpi_recv_wrapper->mpi_recv mpi_send mpi_send proc~mpi_send_wrapper->mpi_send proc~oneblock->proc~mpistop proc~oneblock->phys_to_primitive proc~oneblock->proc~getheadernames proc~onegrid->proc~mpistop proc~onegrid->mpi_barrier proc~onegrid->proc~mpi_recv_wrapper proc~onegrid->proc~mpi_send_wrapper proc~onegrid->phys_to_primitive proc~onegrid->proc~getheadernames proc~process_advanced->proc~getbc proc~process_advanced->proc~sync_positions_host proc~punstructuredvtk_mpi->mpi_barrier proc~punstructuredvtk_mpi->proc~calc_grid proc~punstructuredvtk_mpi->proc~calc_x proc~punstructuredvtk_mpi->proc~getheadernames proc~write_pvtu write_pvtu proc~punstructuredvtk_mpi->proc~write_pvtu proc~write_vtk write_vtk proc~punstructuredvtk_mpi->proc~write_vtk proc~punstructuredvtkb_mpi->proc~calc_grid proc~punstructuredvtkb_mpi->proc~calc_x proc~punstructuredvtkb_mpi->proc~getheadernames proc~punstructuredvtkb_mpi->proc~write_pvtu proc~read_data_init->proc~lt3_create_from_data proc~read_vtk_structured_points read_vtk_structured_points proc~read_data_init->proc~read_vtk_structured_points proc~read_forest->mpi_bcast proc~read_forest->mpi_file_seek proc~read_forest->proc~build_connectivity proc~read_forest->proc~getigrids proc~read_forest->proc~mpi_file_read_wrapper proc~read_forest->getnode mpi_get_count mpi_get_count proc~read_forest->mpi_get_count proc~add_to_linked_list add_to_linked_list proc~read_forest->proc~add_to_linked_list proc~read_forest->proc~amr_morton_order proc~asign_tree_neighbor asign_tree_neighbor proc~read_forest->proc~asign_tree_neighbor proc~read_forest->proc~get_level_range proc~read_forest->proc~get_morton_range proc~read_forest->proc~level1_morton_order proc~read_from_snapshot->proc~find_particle_ipe proc~read_from_snapshot->proc~push_particle_into_particles_on_mype proc~read_par_files->proc~mpistop proc~read_par_files->mpi_bcast proc~read_par_files->proc~get_snapshot_index proc~limiter_type limiter_type proc~read_par_files->proc~limiter_type proc~snapshot_exists snapshot_exists proc~read_par_files->proc~snapshot_exists proc~read_snapshot_old->proc~mpistop proc~read_snapshot_old->alloc_node proc~read_snapshot_old->mpi_barrier proc~read_snapshot_old->mpi_bcast proc~read_snapshot_old->mpi_file_close proc~read_snapshot_old->mpi_file_open proc~read_snapshot_old->mpi_file_seek proc~read_snapshot_old->proc~mpi_file_read_wrapper proc~read_snapshot_old->proc~mpi_recv_wrapper proc~read_snapshot_old->proc~mpi_send_wrapper proc~read_snapshot_old->proc~read_forest proc~mpi_file_read_at_wrapper mpi_file_read_at_wrapper proc~read_snapshot_old->proc~mpi_file_read_at_wrapper proc~recalculateb->proc~getbc phys_face_to_center phys_face_to_center proc~recalculateb->phys_face_to_center phys_to_conserved phys_to_conserved proc~recalculateb->phys_to_conserved proc~recalculateb->phys_to_primitive proc~fake_advance fake_advance proc~recalculateb->proc~fake_advance proc~fix_conserve fix_conserve proc~recalculateb->proc~fix_conserve proc~fix_edges fix_edges proc~recalculateb->proc~fix_edges proc~init_comm_fix_conserve init_comm_fix_conserve proc~recalculateb->proc~init_comm_fix_conserve proc~recvflux recvflux proc~recalculateb->proc~recvflux proc~sendflux sendflux proc~recalculateb->proc~sendflux proc~resettree->proc~finish_gridvars proc~resettree->proc~init_gridvars proc~resettree->proc~amr_coarsen_refine proc~resettree->proc~errest proc~sample_create_particles->mpi_allreduce proc~sample_create_particles->mpi_bcast proc~sample_create_particles->proc~find_particle_ipe proc~sample_create_particles->proc~push_particle_into_particles_on_mype proc~sample_update_payload sample_update_payload proc~sample_create_particles->proc~sample_update_payload proc~sample_create_particles->proc~unif_01 proc~saveamrfile->proc~generate_plotfile proc~saveamrfile->proc~getbc proc~saveamrfile->proc~mpistop proc~saveamrfile->proc~sync_geometry_host proc~printlog_default printlog_default proc~saveamrfile->proc~printlog_default proc~printlog_regression_test printlog_regression_test proc~saveamrfile->proc~printlog_regression_test proc~write_collapsed write_collapsed proc~saveamrfile->proc~write_collapsed proc~write_particles_snapshot write_particles_snapshot proc~saveamrfile->proc~write_particles_snapshot proc~write_slice write_slice proc~saveamrfile->proc~write_slice proc~write_snapshot write_snapshot proc~saveamrfile->proc~write_snapshot proc~set_coordinate_system->proc~mpistop proc~ipe_cf ipe_cf proc~set_neighbor_ipe->proc~ipe_cf proc~ipe_fc ipe_fc proc~set_neighbor_ipe->proc~ipe_fc proc~ipe_srl ipe_srl proc~set_neighbor_ipe->proc~ipe_srl proc~snapshot_read_header->proc~mpistop proc~snapshot_read_header->proc~get_snapshot_index proc~snapshot_read_header->proc~mpi_file_read_wrapper proc~tecplot->proc~mpistop proc~tecplot->proc~calc_grid proc~tecplot->proc~calc_x proc~tecplot->proc~getheadernames proc~save_conntec save_conntec proc~tecplot->proc~save_conntec proc~tecplot_mpi->proc~mpistop proc~tecplot_mpi->mpi_allreduce proc~tecplot_mpi->mpi_barrier proc~tecplot_mpi->proc~mpi_recv_wrapper proc~tecplot_mpi->proc~mpi_send_wrapper proc~tecplot_mpi->proc~calc_grid proc~tecplot_mpi->proc~calc_x proc~tecplot_mpi->proc~getheadernames proc~tecplot_mpi->proc~save_conntec proc~unstructuredvtk->proc~mpistop proc~unstructuredvtk->proc~calc_grid proc~unstructuredvtk->proc~calc_x proc~unstructuredvtk->proc~getheadernames proc~save_connvtk save_connvtk proc~unstructuredvtk->proc~save_connvtk proc~unstructuredvtk_mpi->proc~mpistop proc~unstructuredvtk_mpi->mpi_barrier proc~unstructuredvtk_mpi->proc~mpi_recv_wrapper proc~unstructuredvtk_mpi->proc~mpi_send_wrapper proc~unstructuredvtk_mpi->proc~calc_grid proc~unstructuredvtk_mpi->proc~calc_x proc~unstructuredvtk_mpi->proc~getheadernames proc~unstructuredvtk_mpi->proc~write_vtk proc~unstructuredvtkb->mpi_allreduce proc~unstructuredvtkb->mpi_barrier proc~unstructuredvtkb->proc~mpi_recv_wrapper proc~unstructuredvtkb->proc~mpi_send_wrapper proc~unstructuredvtkb->proc~calc_grid proc~unstructuredvtkb->proc~calc_x proc~unstructuredvtkb->proc~getheadernames proc~unstructuredvtkb64->mpi_allreduce proc~unstructuredvtkb64->mpi_barrier proc~unstructuredvtkb64->proc~mpi_recv_wrapper proc~unstructuredvtkb64->proc~mpi_send_wrapper proc~unstructuredvtkb64->proc~calc_grid proc~unstructuredvtkb64->proc~calc_x proc~unstructuredvtkb64->proc~getheadernames proc~update_gridvars->mpi_wtime proc~output_ensemble output_ensemble proc~write_particle_output->proc~output_ensemble proc~output_individual output_individual proc~write_particle_output->proc~output_individual proc~add_igrid_to_c nbprocs_info_t%add_igrid_to_c proc~add_to_c->proc~add_igrid_to_c proc~add_igrid_to_f nbprocs_info_t%add_igrid_to_f proc~add_to_f->proc~add_igrid_to_f proc~add_igrid_to_srl nbprocs_info_t%add_igrid_to_srl proc~add_to_srl->proc~add_igrid_to_srl proc~advect->proc~mpistop proc~advect->proc~init_comm_fix_conserve proc~advect1 advect1 proc~advect->proc~advect1 proc~advect_update_payload->proc~interpolate_var proc~idecode nbprocs_info_t%idecode proc~alloc_buffers_srl->proc~idecode proc~amr_morton_order->proc~mpistop proc~asign_tree_neighbor->proc~find_neighbor specialbound_usr specialbound_usr proc~bc_phys->specialbound_usr proc~calc_grid->proc~mpistop proc~calc_grid->phys_to_primitive proc~to_cartesian to_cartesian proc~calc_grid->proc~to_cartesian proc~check_pole_setup->proc~mpistop proc~coarsen_grid_siblings->proc~mpistop proc~coarsen_grid_siblings->alloc_node proc~coarsen_grid_siblings->proc~initial_condition proc~coarsen_grid_siblings->proc~mpi_irecv_wrapper proc~coarsen_grid_siblings->proc~mpi_isend_wrapper proc~coarsen_grid coarsen_grid proc~coarsen_grid_siblings->proc~coarsen_grid proc~coarsen_tree_leaf->proc~add_to_linked_list proc~delete_from_linked_list delete_from_linked_list proc~coarsen_tree_leaf->proc~delete_from_linked_list proc~comm_faces->mpi_waitall proc~comm_faces->proc~mpi_irecv_wrapper proc~comm_faces->proc~mpi_isend_wrapper proc~comm_particles->proc~mpistop proc~comm_particles->mpi_waitall proc~comm_particles->proc~mpi_irecv_wrapper proc~comm_particles->proc~mpi_isend_wrapper proc~comm_particles->proc~find_particle_ipe proc~comm_particles->proc~pull_particle_from_particles_on_mype proc~comm_particles->proc~push_particle_into_particles_on_mype proc~apply_periodb apply_periodB proc~comm_particles->proc~apply_periodb proc~destroy_particles destroy_particles proc~comm_particles->proc~destroy_particles proc~particle_in_igrid particle_in_igrid proc~comm_particles->proc~particle_in_igrid proc~exchange_coarsened_blocks->proc~mpistop proc~exchange_coarsened_blocks->mpi_waitall proc~exchange_coarsened_blocks->proc~mpi_irecv_wrapper proc~exchange_coarsened_blocks->proc~mpi_isend_wrapper proc~exchange_coarsened_blocks->mpi_get_count proc~layout_runs layout_runs proc~exchange_coarsened_blocks->proc~layout_runs proc~fake_update fake_update proc~fake_advance->proc~fake_update proc~store_edge store_edge proc~fake_advance->proc~store_edge proc~store_flux store_flux proc~fake_advance->proc~store_flux proc~find_neighbor->proc~find_root_neighbor proc~get_igslice get_igslice proc~find_particle_ipe->proc~get_igslice proc~particle_in_domain particle_in_domain proc~find_particle_ipe->proc~particle_in_domain proc~fix_conserve->proc~mpistop proc~fix_conserve->mpi_waitall proc~fix_conserve->mpi_get_count usr_refine_grid usr_refine_grid proc~forcedrefine_grid->usr_refine_grid proc~gca_update_payload->proc~get_vec proc~cross cross proc~gca_update_payload->proc~cross proc~get_bfield get_bfield proc~gca_update_payload->proc~get_bfield proc~get_efield get_efield proc~gca_update_payload->proc~get_efield proc~get_vec->proc~interpolate_var proc~getheadernames->proc~mpistop proc~init_bc->proc~mpistop proc~init_comm_fix_conserve->proc~mpistop proc~build_message_layout build_message_layout proc~init_comm_fix_conserve->proc~build_message_layout proc~init_tree_leaf->proc~add_to_linked_list proc~interpolate_var->proc~mpistop proc~mortonencode mortonEncode proc~level1_morton_order->proc~mortonencode proc~limiter_type->proc~mpistop proc~load_balance->mpi_waitall proc~load_balance->getnode proc~load_balance->proc~amr_morton_order proc~load_balance->proc~get_morton_range proc~load_balance->putnode proc~change_ipe_tree_leaf change_ipe_tree_leaf proc~load_balance->proc~change_ipe_tree_leaf proc~exchange_migrated_blocks exchange_migrated_blocks proc~load_balance->proc~exchange_migrated_blocks proc~lb_recv lb_recv proc~load_balance->proc~lb_recv proc~lb_send lb_send proc~load_balance->proc~lb_send proc~lorentz_update_payload->proc~cross proc~lorentz_update_payload->proc~get_bfield proc~lorentz_update_payload->proc~get_efield proc~get_lfac get_lfac proc~lorentz_update_payload->proc~get_lfac proc~mg_ghost_cell_buffer_size~3 mg_ghost_cell_buffer_size proc~mg_allocate_storage~3->proc~mg_ghost_cell_buffer_size~3 proc~mg_prolong_buffer_size~3 mg_prolong_buffer_size proc~mg_allocate_storage~3->proc~mg_prolong_buffer_size~3 proc~mg_restrict_buffer_size~3 mg_restrict_buffer_size proc~mg_allocate_storage~3->proc~mg_restrict_buffer_size~3 proc~mg_build_rectangle~3->proc~mg_add_children~3 proc~mg_build_rectangle~3->proc~mg_set_leaves_parents~3 proc~mg_build_rectangle~3->proc~mg_set_neighbors_lvl~3 proc~mg_build_rectangle~3->proc~mg_set_next_level_ids~3 proc~add_single_child~3 add_single_child proc~mg_build_rectangle~3->proc~add_single_child~3 proc~most_popular~3 most_popular proc~mg_load_balance_parents~3->proc~most_popular~3 proc~update_lvl_info~3 update_lvl_info proc~mg_load_balance_parents~3->proc~update_lvl_info~3 proc~mg_has_children~3 mg_has_children proc~mg_set_leaves_parents~3->proc~mg_has_children~3 proc~set_neighbs~3 set_neighbs proc~mg_set_neighbors_lvl~3->proc~set_neighbs~3 proc~mg_set_refinement_boundaries~3->proc~mg_has_children~3 proc~mg_update_refinement->proc~mg_tree_from_amrvac proc~mg_deallocate_storage~3 mg_deallocate_storage proc~mg_update_refinement->proc~mg_deallocate_storage~3 proc~mpi_file_read_at_wrapper->mpi_file_read proc~output_ensemble->proc~mpi_recv_wrapper proc~output_ensemble->proc~mpi_send_wrapper mpi_allgather mpi_allgather proc~output_ensemble->mpi_allgather proc~output_particle output_particle proc~output_ensemble->proc~output_particle proc~output_individual->proc~output_particle proc~printlog_default->mpi_wtime proc~printlog_default->mpi_file_open mpi_file_write mpi_file_write proc~printlog_default->mpi_file_write proc~get_volume_average get_volume_average proc~printlog_default->proc~get_volume_average proc~get_volume_coverage get_volume_coverage proc~printlog_default->proc~get_volume_coverage proc~printlog_regression_test->mpi_file_open proc~printlog_regression_test->mpi_file_write proc~printlog_regression_test->proc~get_volume_average proc~proper_nesting->mpi_allreduce proc~proper_nesting->proc~find_neighbor proc~proper_nesting->mpi_allgather proc~recvflux->proc~mpi_irecv_wrapper proc~refine_grids->alloc_node proc~refine_grids->proc~initial_condition dealloc_node dealloc_node proc~refine_grids->dealloc_node proc~prolong_grid prolong_grid proc~refine_grids->proc~prolong_grid proc~refine_tree_leaf->proc~find_neighbor proc~refine_tree_leaf->proc~init_tree_leaf proc~refine_tree_leaf->proc~delete_from_linked_list proc~sample_update_payload->phys_to_conserved proc~sample_update_payload->proc~interpolate_var proc~nodenumbertec3d nodenumbertec3D proc~save_conntec->proc~nodenumbertec3d proc~select_active_particles->mpi_allreduce proc~sendflux->proc~mpi_isend_wrapper proc~set_geometry_index_ranges->proc~mpistop proc~set_pole->proc~mpistop proc~next rng_t%next proc~unif_01->proc~next proc~put_collapse put_collapse proc~write_collapsed->proc~put_collapse proc~write_particles_snapshot->proc~mpi_recv_wrapper proc~write_particles_snapshot->proc~mpi_send_wrapper proc~append_to_snapshot append_to_snapshot proc~write_particles_snapshot->proc~append_to_snapshot proc~write_pvtu->proc~getheadernames proc~put_slice put_slice proc~write_slice->proc~put_slice proc~write_snapshot->mpi_barrier proc~write_snapshot->mpi_file_close proc~write_snapshot->mpi_file_seek proc~write_snapshot->proc~count_ix proc~write_snapshot->proc~mpi_recv_wrapper proc~write_snapshot->proc~mpi_send_wrapper mpi_file_get_position mpi_file_get_position proc~write_snapshot->mpi_file_get_position proc~write_snapshot->mpi_file_write proc~block_shape_io block_shape_io proc~write_snapshot->proc~block_shape_io proc~create_output_file create_output_file proc~write_snapshot->proc~create_output_file proc~mpi_file_write_wrapper mpi_file_write_wrapper proc~write_snapshot->proc~mpi_file_write_wrapper proc~snapshot_write_header snapshot_write_header proc~write_snapshot->proc~snapshot_write_header proc~write_forest write_forest proc~write_snapshot->proc~write_forest proc~write_vtk->proc~save_connvtk proc~init_cf_info nbinfo_cf_t%init_cf_info proc~add_igrid_to_c->proc~init_cf_info proc~add_igrid_to_f->proc~init_cf_info proc~iencode nbprocs_info_t%iencode proc~add_igrid_to_srl->proc~iencode proc~init_srl_info init_srl_info proc~add_igrid_to_srl->proc~init_srl_info proc~advect1->proc~getbc proc~advect1->proc~fix_conserve proc~advect1->proc~recvflux proc~advect1->proc~sendflux finite_volume_local finite_volume_local proc~advect1->finite_volume_local proc~apply_periodb->proc~find_particle_ipe proc~block_shape_io->proc~count_ix proc~build_message_layout->proc~mpistop proc~build_message_layout->proc~layout_runs proc~create_output_file->proc~mpistop proc~create_output_file->mpi_file_open proc~cross->proc~mpistop proc~destroy_particles->mpi_allreduce proc~destroy_particles->proc~output_ensemble proc~destroy_particles->proc~pull_particle_from_particles_on_mype proc~exchange_migrated_blocks->proc~mpistop proc~exchange_migrated_blocks->mpi_waitall proc~exchange_migrated_blocks->proc~mpi_irecv_wrapper proc~exchange_migrated_blocks->proc~mpi_isend_wrapper proc~exchange_migrated_blocks->mpi_get_count proc~exchange_migrated_blocks->proc~layout_runs proc~b_from_vector_potentiala b_from_vector_potentialA proc~fake_update->proc~b_from_vector_potentiala proc~get_bfield->proc~get_vec proc~get_bfield->proc~interpolate_var proc~get_efield->proc~get_vec proc~get_efield->proc~interpolate_var proc~get_efield->proc~get_bfield proc~get_igslice->proc~mpistop proc~get_volume_average->mpi_allreduce proc~get_volume_coverage->mpi_allreduce proc~rank_keys rank_keys proc~layout_runs->proc~rank_keys proc~lb_recv->proc~mpistop proc~lb_recv->alloc_node proc~lb_recv->proc~mpi_irecv_wrapper proc~lb_send->proc~mpistop proc~lb_send->proc~mpi_isend_wrapper proc~buffer_ghost_cells~3 buffer_ghost_cells proc~mg_ghost_cell_buffer_size~3->proc~buffer_ghost_cells~3 proc~buffer_refinement_boundaries~3 buffer_refinement_boundaries proc~mg_ghost_cell_buffer_size~3->proc~buffer_refinement_boundaries~3 proc~set_ghost_cells~3 set_ghost_cells proc~mg_ghost_cell_buffer_size~3->proc~set_ghost_cells~3 proc~mpi_file_write_wrapper->mpi_file_write proc~rotl rotl proc~next->proc~rotl proc~nodenumbertec3d->proc~mpistop proc~partcoord_to_cartesian partcoord_to_cartesian proc~output_particle->proc~partcoord_to_cartesian proc~prolong_grid->proc~sync_positions_host proc~prolong_grid->phys_to_conserved proc~prolong_grid->phys_to_primitive proc~old_neighbors old_neighbors proc~prolong_grid->proc~old_neighbors proc~prolong_2nd prolong_2nd proc~prolong_grid->proc~prolong_2nd proc~put_collapse->proc~mpistop proc~put_collapse->mpi_barrier proc~put_collapse->mpi_reduce proc~alloc_subnode alloc_subnode proc~put_collapse->proc~alloc_subnode proc~allocate_collapsed allocate_collapsed proc~put_collapse->proc~allocate_collapsed proc~collapse_subnode collapse_subnode proc~put_collapse->proc~collapse_subnode proc~dealloc_subnode dealloc_subnode proc~put_collapse->proc~dealloc_subnode proc~integrate_subnode integrate_subnode proc~put_collapse->proc~integrate_subnode proc~output_collapsed_csv output_collapsed_csv proc~put_collapse->proc~output_collapsed_csv proc~output_collapsed_vti output_collapsed_vti proc~put_collapse->proc~output_collapsed_vti proc~put_slice->proc~mpistop proc~put_slice->mpi_barrier proc~put_slice->mpi_bcast proc~put_slice->mpi_file_close proc~put_slice->mpi_file_open proc~put_slice->mpi_file_seek proc~put_slice->mpi_waitall proc~put_slice->proc~mpi_recv_wrapper proc~put_slice->proc~mpi_send_wrapper proc~put_slice->mpi_type_commit proc~put_slice->mpi_type_create_subarray proc~put_slice->proc~getheadernames proc~put_slice->mpi_file_get_position proc~put_slice->mpi_file_write mpi_file_iwrite_at mpi_file_iwrite_at proc~put_slice->mpi_file_iwrite_at mpi_type_free mpi_type_free proc~put_slice->mpi_type_free phys_write_info phys_write_info proc~put_slice->phys_write_info proc~put_slice->proc~alloc_subnode proc~put_slice->proc~dealloc_subnode proc~roundoff_minmax roundoff_minmax proc~put_slice->proc~roundoff_minmax proc~select_slice select_slice proc~put_slice->proc~select_slice proc~find_neighb~3 find_neighb proc~set_neighbs~3->proc~find_neighb~3 proc~snapshot_write_header1 snapshot_write_header1 proc~snapshot_write_header->proc~snapshot_write_header1 proc~write_forest->mpi_file_write proc~alloc_subnode->proc~mpistop proc~allocate_collapsed->proc~mpistop proc~b_from_vector_potentiala->proc~mpistop proc~buffer_for_nb~3 buffer_for_nb proc~buffer_ghost_cells~3->proc~buffer_for_nb~3 proc~buffer_refinement_boundaries~3->proc~mg_has_children~3 proc~buffer_for_fine_nb~3 buffer_for_fine_nb proc~buffer_refinement_boundaries~3->proc~buffer_for_fine_nb~3 proc~collapse_subnode->proc~mpistop proc~collapse_subnode->proc~calc_grid proc~collapse_subnode->proc~calc_x proc~dealloc_subnode->proc~mpistop proc~mg_ix_to_ichild~3 mg_ix_to_ichild proc~find_neighb~3->proc~mg_ix_to_ichild~3 proc~integrate_subnode->proc~mpistop proc~output_collapsed_csv->proc~mpistop proc~output_collapsed_csv->proc~getheadernames proc~output_collapsed_vti->proc~mpistop proc~output_collapsed_vti->proc~getheadernames proc~prolong_2nd->proc~sync_positions_host proc~prolong_2nd->phys_to_conserved proc~already_fine already_fine proc~prolong_2nd->proc~already_fine proc~prolong_2nd_stg prolong_2nd_stg proc~prolong_2nd->proc~prolong_2nd_stg proc~select_slice->proc~mpistop proc~select_slice->mpi_allreduce proc~select_slice->proc~get_igslice mpi_gather mpi_gather proc~select_slice->mpi_gather proc~fill_subnode fill_subnode proc~select_slice->proc~fill_subnode proc~quicksort_integer quicksort_integer proc~select_slice->proc~quicksort_integer proc~bc_to_gc~3 bc_to_gc proc~set_ghost_cells~3->proc~bc_to_gc~3 proc~box_get_gc~3 box_get_gc proc~set_ghost_cells~3->proc~box_get_gc~3 proc~box_set_gc~3 box_set_gc proc~set_ghost_cells~3->proc~box_set_gc~3 proc~copy_from_nb~3 copy_from_nb proc~set_ghost_cells~3->proc~copy_from_nb~3 proc~fill_buffered_nb~3 fill_buffered_nb proc~set_ghost_cells~3->proc~fill_buffered_nb~3 proc~fill_refinement_bnd~3 fill_refinement_bnd proc~set_ghost_cells~3->proc~fill_refinement_bnd~3 proc~snapshot_write_header1->mpi_file_write proc~snapshot_write_header1->phys_write_info proc~box_gc_for_fine_neighbor~3 box_gc_for_fine_neighbor proc~buffer_for_fine_nb~3->proc~box_gc_for_fine_neighbor~3 proc~mg_get_child_offset~3 mg_get_child_offset proc~buffer_for_fine_nb~3->proc~mg_get_child_offset~3 proc~box_gc_for_neighbor~3 box_gc_for_neighbor proc~buffer_for_nb~3->proc~box_gc_for_neighbor~3 proc~copy_from_nb~3->proc~box_set_gc~3 proc~copy_from_nb~3->proc~box_gc_for_neighbor~3 proc~fill_buffered_nb~3->proc~box_set_gc~3 proc~fill_refinement_bnd~3->proc~box_gc_for_fine_neighbor~3 proc~fill_refinement_bnd~3->proc~mg_get_child_offset~3 proc~sides_rb~3 sides_rb proc~fill_refinement_bnd~3->proc~sides_rb~3 proc~fill_subnode->proc~mpistop proc~fill_subnode->proc~calc_grid proc~fill_subnode->proc~calc_x proc~fill_subnode->proc~alloc_subnode proc~fill_subnode_info fill_subnode_info proc~fill_subnode->proc~fill_subnode_info proc~prolong_2nd_stg->phys_face_to_center proc~quicksort_integer->proc~quicksort_integer proc~fill_subnode_info->proc~mpistop

Variables

Type Attributes Name Initial
integer :: ierror

Functions

function fixgrid()

Return true if the AMR grid should not be adapted any more. This is controlled by tfixgrid or itfixgrid. Other conditions may be included.

Arguments

None

Return Value logical

function timetosave(ifile)

Save times are defined by either tsave(isavet(ifile),ifile) or itsave(isaveit(ifile),ifile) or dtsave(ifile) or ditsave(ifile) tsavestart(ifile) determines first start time. This only affects read out times determined by dtsave(ifiles). Other conditions may be included.

Arguments

Type IntentOptional Attributes Name
integer :: ifile

Return Value logical


Subroutines

subroutine main()

The main driver, called after MPI and GPUs are initialized

Arguments

None

subroutine set_openacc_device()

Arguments

None

subroutine set_openmp_device()

Arguments

None

subroutine timeintegration(time0)

Arguments

Type IntentOptional Attributes Name
double precision, intent(in) :: time0

Source Code

program agile
  use mpi
  integer        :: ierror
  ! Initialize MPI
  call MPI_INIT(ierror)
  ! The GPU device must be set before any data is initialized on the GPU
#if defined(_OPENACC) && defined(_OPENMP)
  error stop "Both OpenACC and OpenMP are enabled, this is not supported"
#endif
#ifdef _OPENACC
  call set_openacc_device()
#endif
#ifdef _OPENMP
  call set_openmp_device()
#endif
  call main()

contains

#ifdef _OPENACC
  subroutine set_openacc_device
    use mpi
    use openacc
    integer :: local_rank, comm_shared, my_device, num_devices, ierror
    integer(acc_device_kind) :: dev_type

    call MPI_COMM_SPLIT_TYPE(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, comm_shared, ierror)
    call MPI_COMM_RANK(comm_shared, local_rank, ierror)

    dev_type = ACC_DEVICE_DEFAULT
    num_devices = acc_get_num_devices(dev_type)

    if (num_devices < 1) error stop "No devices available on host"

    my_device = mod(local_rank, num_devices)
    call acc_set_device_num(my_device, dev_type)

  end subroutine set_openacc_device
#endif

#ifdef _OPENMP
  subroutine set_openmp_device
    use mpi
    use omp_lib
    integer :: local_rank, comm_shared, my_device, num_devices, ierror

    call MPI_COMM_SPLIT_TYPE(MPI_COMM_WORLD, MPI_COMM_TYPE_SHARED, 0, MPI_INFO_NULL, comm_shared, ierror)
    call MPI_COMM_RANK(comm_shared, local_rank, ierror)

    num_devices = omp_get_num_devices()

    if (num_devices < 1) error stop "No devices available on host"

    my_device = mod(local_rank, num_devices)
    call omp_set_default_device(my_device)

  end subroutine set_openmp_device
#endif

  !> The main driver, called after MPI and GPUs are initialized
  subroutine main
    use mod_global_parameters
    use mod_input_output
    use mod_usr_methods
    use mod_ghostcells_update
    use mod_usr
    use mod_initialize
    use mod_initialize_amr, only: initlevelone, modify_IC

    use mod_initialize_amr, only: improve_initial_condition

    use mod_selectgrids, only: selectgrids
    use mod_particles
    use mod_fix_conserve
    use mod_advance, only: process
    use mod_multigrid_coupling
    use mod_convert, only: init_convert

    use mod_physics
    use mod_amr_grid, only: resettree, settree, resettree_convert
  !FIXME:
  !  use mod_trac, only: initialize_trac_after_settree
    use mod_convert_files, only: generate_plotfile
    use mod_comm_lib, only: comm_start, comm_finalize,mpistop
    use mod_geometry, only: set_coordinate_system_from_config, sync_geometry_host


    double precision :: time0, time_in
    logical,save     :: part_file_exists=.false.


    call comm_start()

    time0 = MPI_WTIME()
    time_advance = .false.
    
    time_bc      = zero

    ! read command line arguments first
    call read_arguments()

    ! Derive the coordinate system from the GEOM define before usr_init, so
    ! that ndir is set before phys_activate needs it and coordinate is set
    ! before read_par_files converts the angular domain bounds. A case may
    ! still call set_coordinate_system itself; it need not.
    call set_coordinate_system_from_config()

    ! the user_init routine should load a physics module
    call usr_init()

    call initialize_amrvac()

    if (restart_from_file /= undefined) then
    !AGILE: not yet implemented, data movement needs to happen here
! #ifdef _OPENACC
!        call mpistop("restart or convert on GPU not yet implemented")
! #endif
       ! restart from previous file or dat file conversion
       ! get input data from previous AMRVAC run

       ! read in dat file
       call read_snapshot()

       ! rewrite it=0 snapshot when restart from it=0 state
       if(it==0.and.itsave(1,2)==0) snapshotnext=snapshotnext-1

       if (reset_time) then
         ! reset it and global time to original value
         it           = it_init
         global_time  = time_init
         ! reset snapshot number
         snapshotnext=0
       end if

       if (reset_it) then
         ! reset it to original value
         it           = it_init
       end if

       ! modify initial condition
       if (firstprocess) then
         ! update ghost cells for all need-boundary variables before modification
         call getbc(global_time,0.d0,ps,1,nwflux+nwaux)
         call modify_IC
       end if

       ! select active grids
       call selectgrids

       ! update ghost cells for all need-boundary variables
       call getbc(global_time,0.d0,ps,1,nwflux+nwaux)

       ! reset AMR grid
       if (reset_grid) then
         call settree
       end if

       ! all blocks refined to the same level for output
       if(convert .and. level_io>0 .or. level_io_min.ne.1 .or. &
          level_io_max.ne.nlevelshi) call resettree_convert


       ! improve initial condition after restart and modification
       if(firstprocess) call improve_initial_condition()


       if (use_multigrid) call mg_setup_multigrid()

       if(use_particles) then
         call read_particles_snapshot(part_file_exists)
         call init_gridvars()
         if (.not. part_file_exists) call particles_create()
         if(convert) then
           call handle_particles()
           call finish_gridvars()
           call time_spent_on_particles()
           call comm_finalize
           stop
         end if
       end if

       if(convert) then
         if (npe/=1.and.(.not.(index(convert_type,&
            'mpi')>=1)) .and. convert_type .ne. 'user')  call &
            mpistop("non-mpi conversion only uses 1 cpu")
         if(mype==0.and.level_io>0) write(unitterm,&
            *)'reset tree to fixed level=',level_io

         ! Optionally call a user method that can modify the grid variables
         ! before saving the converted data
         if (associated(usr_process_grid) .or. associated(usr_process_global)) &
            then
            call process(it,global_time)
         end if
         !here requires -1 snapshot
         if (autoconvert .or. snapshotnext>0) snapshotnext = snapshotnext - 1

         if(associated(phys_special_advance)) then
           ! e.g. calculate MF velocity from magnetic field
           call phys_special_advance(global_time,ps)
         end if

         ! standalone convert bypasses saveamrfile, so this is where the
         ! device-side cell metrics have to come back to the host
         call sync_geometry_host()
         call generate_plotfile
         call comm_finalize
         stop
       end if

    else

       ! form and initialize all grids at level one
       call initlevelone

       ! set up and initialize finer level grids, if needed
       call settree

       if (use_multigrid) call mg_setup_multigrid()


       ! improve initial condition
       call improve_initial_condition()


       ! select active grids
       call selectgrids

       if (use_particles) then
         call init_gridvars()
         call particles_create()
       end if

    end if

  !FIXME:
    ! initialize something base on tree information
  !  call initialize_trac_after_settree

    if (mype==0) then
       print*,'-------------------------------------------------------------------------------'
       write(*,'(a,f17.3,a)')' Startup phase took : ',MPI_WTIME()-time0,' sec'
       print*,'-------------------------------------------------------------------------------'
    end if

    ! an interface to allow user to do special things before the main loop
    if (associated(usr_before_main_loop)) call usr_before_main_loop()

    ! do time integration of all grids on all levels
    call timeintegration(time0)

    if (mype==0) then
       print*,'-------------------------------------------------------------------------------'
       write(*,'(a,f17.3,a)')' Finished AMRVAC in : ',MPI_WTIME()-time0,' sec'
       print*,'-------------------------------------------------------------------------------'
    end if

    call comm_finalize

  end subroutine main

  subroutine timeintegration(time0)
    use mod_nvtx
    use mod_timing
    use mod_advance, only: advance, process, process_advanced
    use mod_amr_grid, only: resettree, settree, resettree_convert
    use mod_forest, only: nleafs_active
    use mod_global_parameters
    use mod_input_output, only: saveamrfile
    use mod_input_output_helper, only: save_now
    use mod_ghostcells_update
    use mod_multigrid_coupling
    use mod_dt, only: setdt
    use mod_particles
    use mod_usr_methods
    use mod_geometry, only: sync_positions_host

    double precision, intent(in) :: time0

    integer :: level, ifile, fixcount, ncells_block, igrid, iigrid, itimelevel
    integer(kind=8) ncells_update
    logical :: crashall
    double precision :: time_last_print, time_write0, time_write,&
        time_before_advance, dt_loop

    time_in=MPI_WTIME()
    time_last_print = -bigdouble
    fixcount=1

    n_saves(filelog_:fileout_) = snapshotini

    do ifile=nfile,1,-1
       if(resume_previous_run) then
         tsavelast(ifile)=aint((global_time+&
            smalldouble)/dtsave(ifile))*dtsave(ifile)
         itsavelast(ifile)=it/ditsave(ifile)*ditsave(ifile)
       else
         tsavelast(ifile)=global_time
         itsavelast(ifile)=it
       end if
    end do

    ! the next two are used to keep track of the performance during runtime:
    itTimeLast=it
    timeLast=MPI_WTIME()

    !  ------ start of integration loop. ------------------
    if (mype==0) then
      write(*, '(A,ES9.2,A)') ' Start integrating, print status every ',&
          time_between_print, ' seconds'
      write(*, '(A4,A10,A12,A12,A12)') '  #', 'it', 'time', 'dt', 'wc-time(s)'
    end if

    timeloop0=MPI_WTIME()
    time_bc=0.d0
    time_write=0.d0
    ncells_block=(ixGhi1-2*nghostcells)*(ixGhi2-2*nghostcells)*(ixGhi3-&
       2*nghostcells)
    ncells_update=0
    dt_loop=0.d0

    time_advance=.true.
    

    time_evol : do

       time_before_advance=MPI_WTIME()
       ! set time step
       call nvtxStartRange("setdt");       call setdt()
       call nvtxEndRange

       
       ! Optionally call a user method that can modify the grid variables at the
       ! beginning of a time step
       if (associated(usr_process_grid) .or. associated(usr_process_global)) &
          then
          call process(it,global_time)
       end if

       ! Check if output needs to be written
       do ifile=nfile,1,-1
         save_file(ifile) = timetosave(ifile)
       end do

       timeio0=MPI_WTIME()

       if (timeio0 - time_last_print > time_between_print) then
         time_last_print = timeio0
         if (mype == 0) then
           write(*, '(A4,I10,ES12.4,ES12.4,ES12.4)') " #", it, global_time, dt,&
               timeio0 - time_in
         end if
       end if

       ! output data
       if (any(save_file)) then
         if(associated(usr_modify_output)) then
           ! Users can modify or set variables before output is written
           ! (usr_modify_output reads ps(igrid)%x on the host)
           call sync_positions_host()
           do iigrid=1,igridstail; igrid=igrids(iigrid);
             dxlevel(1)=rnode(rpdx1_,igrid);dxlevel(2)=rnode(rpdx2_,igrid)
             dxlevel(3)=rnode(rpdx3_,igrid);
             block=>ps(igrid)
             call usr_modify_output(ixGlo1,ixGlo2,ixGlo3,ixGhi1,ixGhi2,ixGhi3,&
                ixMlo1,ixMlo2,ixMlo3,ixMhi1,ixMhi2,ixMhi3,global_time,&
                ps(igrid)%w,ps(igrid)%x)
           end do
         end if
         time_write=0.d0
         do ifile=nfile,1,-1
           if (save_file(ifile)) then
             time_write0=MPI_WTIME()
             call saveamrfile(ifile)
             time_write=time_write+MPI_WTIME()-time_write0
           end if
         end do
       end if


       ! output a snapshot when user write a file named 'savenow' in the same
       ! folder as the executable amrvac
       if (mype==0) inquire(file='savenow',exist=save_now)
       if (npe>1) call MPI_BCAST(save_now,1,MPI_LOGICAL,0,icomm,ierrmpi)

       if (save_now) then
          if(mype==0) write(*,'(a,i7,a,i7,a,es12.4)') ' save a snapshot No.',&
             snapshotnext,' at it=',it,' global_time=',global_time
          call saveamrfile(1)
          call saveamrfile(2)
          call MPI_FILE_DELETE('savenow',MPI_INFO_NULL,ierrmpi)
       end if
       timeio_tot=timeio_tot+MPI_WTIME()-timeio0

       pass_wall_time=MPI_WTIME()-time0+dt_loop+4.d0*time_write &
          >=wall_time_max

       ! exit time loop if time is up
       if (it>=it_max .or. global_time>=time_max .or. pass_wall_time .or. &
          final_dt_exit) exit time_evol

       ! solving equations
       call advance(it)
       
       !opedit: FIXME, this seems to take a long time!
       ! if met unphysical values, output the last good status and stop the run
       ! call MPI_ALLREDUCE(crash,crashall,1,MPI_LOGICAL,MPI_LOR,icomm,ierrmpi)
       ! if (crashall) then
       !   call saveamrfile(1)
       !   call saveamrfile(2)
       !   if(mype==0) write(*,*) "Error: small value encountered, run crash."
       !   call MPI_ABORT(icomm, iigrid, ierrmpi)
       ! end if

       ! Optionally call a user method that can modify the grid variables at the
       ! end of a time step: this is for two-way coupling to PIC, e.g.
       if (associated(usr_process_adv_grid) .or. &
          associated(usr_process_adv_global)) then
          call process_advanced(it,global_time)
       end if

       ! update AMR mesh and tree
       timegr0=MPI_WTIME()
       if(ditregrid>1) then
          if(fixcount<ditregrid) then
             fixcount=fixcount+1
          else
             if (refine_max_level>1 .and. .not.(fixgrid())) call resettree
             fixcount=1
          end if
       else
          if (refine_max_level>1 .and. .not.(fixgrid())) call resettree
       end if
       timegr_tot=timegr_tot+(MPI_WTIME()-timegr0)

       ! update time variables
       it = it + 1
       global_time = global_time + dt

       if(it>9000000)then
          it = slowsteps+it_init
          itsavelast(:)=0
       end if

       ! count updated cells
       ncells_update=ncells_update+ncells_block*nleafs_active

       ! time lapses in one loop
       dt_loop=MPI_WTIME()-time_before_advance
    end do time_evol

    if(use_particles) then
      call finish_gridvars()
    end if

    time_advance=.false.
    

    timeloop=MPI_WTIME()-timeloop0

    if (mype==0) then
       write(*,'(a,f12.3,a)')' Total timeloop took        : ',timeloop,' sec'
       write(*,'(a,f12.3,a)')' Time spent on AMR          : ',timegr_tot,&
          ' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*timegr_tot/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on IO in loop   : ',timeio_tot,&
          ' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*timeio_tot/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on ghost cells  : ',time_bc,' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*time_bc/timeloop,' %'
       write(*,'(a,f12.3,a)')' Time spent on computing    : ',&
          timeloop-timeio_tot-timegr_tot-time_bc,' sec'
       write(*,'(a,f12.2,a)')'                  Percentage: ',&
          100.0*(timeloop-timeio_tot-timegr_tot-time_bc)/timeloop,' %'
       write(*,'(a,es12.3 )')' Cells updated / proc / sec : ',&
          dble(ncells_update)*dble(nstep)/dble(npe)/(timeloop-timeio_tot)
    end if

    ! output end state
    timeio0=MPI_WTIME()
    do ifile=nfile,1,-1
       if(itsavelast(ifile)<it) call saveamrfile(ifile)
    end do
    if (mype==0 .and. log_fh > 0) then
      call MPI_FILE_CLOSE(log_fh,ierrmpi)
    endif
    timeio_tot=timeio_tot+(MPI_WTIME()-timeio0)

    if (mype==0) then
       write(*,'(a,f12.3,a)')' Total time spent on IO     : ',timeio_tot,&
          ' sec'
       write(*,'(a,f12.3,a)')' Total timeintegration took : ',&
          MPI_WTIME()-time_in,' sec'
       write(*, '(A4,I10,ES12.3,ES12.3,ES12.3)') " #", it, global_time, dt,&
           timeio0 - time_in
    end if



    if(use_particles) call time_spent_on_particles

    if (use_multigrid) call mg_timers_show(mg)
  end subroutine timeintegration

  !> Save times are defined by either tsave(isavet(ifile),ifile) or
  !> itsave(isaveit(ifile),ifile) or dtsave(ifile) or ditsave(ifile)
  !> tsavestart(ifile) determines first start time. This only affects
  !> read out times determined by dtsave(ifiles).
  !> Other conditions may be included.
  logical function timetosave(ifile)
    use mod_global_parameters

    integer:: ifile
    logical:: oksave

    oksave=.false.
    if (it==itsave(isaveit(ifile),ifile)) then
       oksave=.true.
       isaveit(ifile)=isaveit(ifile)+1
    end if
    if (it==itsavelast(ifile)+ditsave(ifile)) oksave=.true.

    if (global_time>=tsave(isavet(ifile),&
       ifile).and.global_time-dt<tsave(isavet(ifile),ifile)) then
       oksave=.true.
       isavet(ifile)=isavet(ifile)+1
    end if

    if(global_time>=tsavestart(ifile)-smalldouble)then
      if (global_time>=tsavelast(ifile)+dtsave(ifile)-smalldouble)then
         oksave=.true.
         n_saves(ifile) = n_saves(ifile) + 1
      endif
    endif

    if (oksave) then
       tsavelast(ifile) =global_time
       itsavelast(ifile)=it
    end if
    timetosave=oksave

    return
  end function timetosave

  !> Return true if the AMR grid should not be adapted any more. This is
  !> controlled by tfixgrid or itfixgrid. Other conditions may be included.
  logical function fixgrid()
    use mod_global_parameters

    fixgrid= (global_time>=tfixgrid .or. it>=itfixgrid)
  end function fixgrid

end program agile