Skip to content

Commit

Permalink
Small fix to build via Spack
Browse files Browse the repository at this point in the history
  • Loading branch information
sergiorg-hpc committed Sep 28, 2023
1 parent 1e6f1bc commit 55bc4be
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/coreneuron/io/nrn_filehandler.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -8,9 +8,9 @@

#include <iostream>
#include <filesystem>
#include <mpi.h>

Check failure on line 11 in src/coreneuron/io/nrn_filehandler.cpp

View workflow job for this annotation

GitHub Actions / ubuntu-22.04 - cmake (-DNRN_ENABLE_CORENEURON=ON -DNRN_ENABLE_INTERVIEWS=OFF -DNMODL_SANITIZERS=undefinedundefined)

'mpi.h' file not found
#include "coreneuron/io/nrn_filehandler.hpp"
#include "coreneuron/nrnconf.h"
#include "coreneuron/mpi/lib/nrnmpi.hpp"

namespace coreneuron {
FileHandler::FileHandler(const std::string& filename)
Expand Down Expand Up @@ -39,7 +39,10 @@ std::string FileHandler::get_rank_fname(const char* basepath, bool create_folder
std::filesystem::create_directories(path);
}

return (path + "/" + std::to_string(nrnmpi_myid_) + ".dat");
int nrnmpi_myid = 0;
MPI_Comm_rank(MPI_COMM_WORLD, &nrnmpi_myid);

return (path + "/" + std::to_string(nrnmpi_myid) + ".dat");
}

void FileHandler::open(const std::string& filename, size_t offset, std::ios::openmode mode) {
Expand Down

0 comments on commit 55bc4be

Please sign in to comment.