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

Get error when opened many coordinators simultaneously #330

Open
monarchBacilluscoli opened this issue Jul 28, 2020 · 0 comments
Open

Get error when opened many coordinators simultaneously #330

monarchBacilluscoli opened this issue Jul 28, 2020 · 0 comments

Comments

@monarchBacilluscoli
Copy link

I want to launch many (about 100-200) sc2 games at the same time.
during their launch, there is always an error shown 2-3 times like this :

Deferred error: 536936448 (0x20010000)
Deferred error details: Bad profiling data. TimeMS: 22722180.000000 Conversion: 1.000000e-03

I have no idea about it and I can not find anything through directly searching the error.

The code is like this:

void CSetAndStart(Coordinator &cor, int port, int argc, char *argv[], Agent *bot1, Agent *bot2)
{
    cor.LoadSettings(argc, argv);
    cor.SetParticipants({CreateParticipant(Terran, bot1), CreateParticipant(Terran, bot2)});
    cor.SetPortStart(port);
    cor.SetMapPath("PCANP_EnemyZealotModVSMarines.SC2Map"); // map designed by myself
    cor.SetStepSize(1);
    cor.LaunchStarcraft();
    cor.StartGame();
}

int main(){
    std::vector<Coordinator> cors(100);
    ANBot bots1[100];
    ANBot bots2[100];
    int count = 100; // num of sc2 processes
    std::vector<std::future<void>> cors_futures(100);
    for (int i = 0; i < count; ++i) // launch, the error occured during the launch process
    {
        cors_futures[i] = std::async(std::launch::async, CSetAndStart, std::ref(cors[i]), 4000 + 10 * i, argc, argv, &(bots1[i]), &(bots2[i]));
    }
    for (int i = 0; i < count; ++i)
    {
        cors_futures[i].wait();
    }
    return 0;
}
@monarchBacilluscoli monarchBacilluscoli changed the title Get error when I opend many coordinators simultaneously Get error when opened many coordinators simultaneously Jul 28, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant