3 #define TRAVE_NAME "TransferDriverMPI"
4 #include "artdaq/DAQdata/Globals.hh"
5 #include "artdaq/DAQrate/TransferTest.hh"
6 #include "fhiclcpp/make_ParameterSet.h"
10 #include <sys/types.h>
13 int main(
int argc,
char* argv[])
16 TLOG(TLVL_TRACE) <<
"BEGIN" ;
17 char envvar[] =
"MV2_ENABLE_AFFINITY=0";
18 if (putenv(envvar) != 0)
20 std::cerr <<
"Unable to set MV2_ENABLE_AFFINITY environment variable!";
23 auto const requested_threading = MPI_THREAD_SERIALIZED;
24 int provided_threading = -1;
25 auto rc = MPI_Init_thread(&argc, &argv, requested_threading, &provided_threading);
27 assert(requested_threading == provided_threading);
28 TLOG(TLVL_TRACE) <<
"MPI_Init_thread rc=" << rc ;
29 rc = MPI_Comm_rank(MPI_COMM_WORLD, &my_rank);
31 TLOG(TLVL_TRACE)<<
"MPI_Comm_rank rc=" << rc ;
36 std::cout <<
"argc:" << argc << std::endl;
37 for (
int i = 0; i < argc; ++i)
39 std::cout <<
"argv[" << i <<
"]: " << argv[i] << std::endl;
45 std::cerr << argv[0] <<
" requires 1 argument, " << argc - 1 <<
" provided\n";
49 cet::filepath_lookup lookup_policy(
"FHICL_FILE_PATH");
50 fhicl::ParameterSet ps;
52 auto fhicl = std::string(argv[1]);
53 make_ParameterSet(fhicl, lookup_policy, ps);
67 TLOG(TLVL_TRACE) <<
"END" ;
void configureMessageFacility(char const *progname, bool useConsole=true, bool printDebug=false)