NCAR / NCAR/DART

direct_netcdf_mod.f90 SINGLE_IO_TASK_ID and hardcoded 0

Open
#1,077 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

IO
Dominant language
Fortran
Stars
263
Forks
182
Avg merge
11d 12h
Merged PRs (30d)
7

Description

This is a hard coded 0 however, there is a integer, parameter :: SINGLE_IO_TASK_ID = 0 in the module.

https://github.com/NCAR/DART/blob/cc1da67976feb3b092ac9eae7388f6181ef33154/assimilation_code/modules/io/direct_netcdf_mod.f90#L431-L434

  • I don't think this needs a broadcast, since if all tasks are in the initialize_single_file_io routine, all tasks have access to the local variable local_model_mod_will_write_state_variables

  • double check pe vs task: since initialize_single_file_io(ens_handle, file_handle) should you be using ens_handle%my_pe rather than my_task_id for this routine? Maybe it does not matter. Similarly for read_single_file:

https://github.com/NCAR/DART/blob/cc1da67976feb3b092ac9eae7388f6181ef33154/assimilation_code/modules/io/direct_netcdf_mod.f90#L536-L538

Originally posted by @hkershaw-brown in #359

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in assimilation_code/modules/io/direct_netcdf_mod.f90 at the cited lines in initialize_single_file_io and read_single_file. Compare the hardcoded 0 with SINGLE_IO_TASK_ID, and investigate whether ens_handle%my_pe or my_task_id is correct and whether a broadcast is needed. Done means both routines use the correct task identity and their parallel behavior is verified.

Written by the indexing model from the issue text.

Assessment

Tech stack
fortran
Domain
distributed-systems
Issue type
Bug
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.