I have an application that stores vector structs. These structures contain information about each GPU in a system such as memory and giga-flop / s. Each system uses a different number of GPUs.
I have a program that runs on several computers at once, and I need to collect this data. I am very new to MPI, but I can use MPI_Gather() for the most part, however I would like to know how to collect / receive these vectors with dynamic size.
class MachineData { unsigned long hostMemory; long cpuCores; int cudaDevices; public: std::vector<NviInfo> nviVec; std::vector<AmdInfo> amdVec; ... }; struct AmdInfo { int platformID; int deviceID; cl_device_id device; long gpuMem; float sgflops; double dgflops; };
Each machine in the cluster fills its own instance of MachineData . I want to collect each of these instances, but I'm not sure how to approach the collection of nviVec and amdVec , since their length depends on each machine.
source share