Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

error code checking #520

Open
wkliao opened this issue Jun 2, 2023 · 0 comments · May be fixed by #595
Open

error code checking #520

wkliao opened this issue Jun 2, 2023 · 0 comments · May be fixed by #595
Assignees
Labels

Comments

@wkliao
Copy link
Member

wkliao commented Jun 2, 2023

This error code checking is problematic. Assuming it is possible that ierr can
be different among processes, checking only root's ierr at line 1429 after bcast
at line 1422 may not detect a failure on other processes.

scorpio/src/clib/pio_nc.c

Lines 1421 to 1434 in ac679a5

/* A failure to inquire is not fatal */
mpierr = MPI_Bcast(&ierr, 1, MPI_INT, ios->ioroot, ios->my_comm);
if(mpierr != MPI_SUCCESS){
spio_ltimer_stop(ios->io_fstats->tot_timer_name);
spio_ltimer_stop(file->io_fstats->tot_timer_name);
return check_mpi(NULL, file, mpierr, __FILE__, __LINE__);
}
if(ierr != PIO_NOERR){
LOG((1, "nc*_inq_var failed, ierr = %d", ierr));
spio_ltimer_stop(ios->io_fstats->tot_timer_name);
spio_ltimer_stop(file->io_fstats->tot_timer_name);
return ierr;
}

@wkliao wkliao linked a pull request Jul 3, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants