Skip to content

Commit

Permalink
Merge pull request #161 from MolSSI-MDI/memory
Browse files Browse the repository at this point in the history
Fix out-of-scope variable in mdi.c
  • Loading branch information
taylor-a-barnes authored Dec 11, 2023
2 parents f9604c2 + 6760fd2 commit 9ac4790
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion MDI_Library/mdi.c
Original file line number Diff line number Diff line change
Expand Up @@ -2120,9 +2120,10 @@ int MDI_Launch_plugin(const char* plugin_name, const char* options, void* mpi_co

// If this is a Fortran code, convert the MPI communicator
void* mpi_comm_ptr_use = mpi_comm_ptr;
MPI_Comm c_comm = MPI_COMM_NULL;
if ( this_code->language == MDI_LANGUAGE_FORTRAN ) {
MPI_Fint* f_comm_ptr = (MPI_Fint*) mpi_comm_ptr;
MPI_Comm c_comm = MPI_Comm_f2c( *f_comm_ptr );
c_comm = MPI_Comm_f2c( *f_comm_ptr );
mpi_comm_ptr_use = (void*)(&c_comm);
}

Expand Down

0 comments on commit 9ac4790

Please sign in to comment.