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

Adding multitask feature #2353

Merged
merged 18 commits into from
Sep 22, 2020
Merged

Conversation

avancinirodrigo
Copy link
Contributor

@avancinirodrigo avancinirodrigo commented Aug 11, 2020

@avancinirodrigo avancinirodrigo added this to the 2.0.1 milestone Aug 11, 2020
@pedro-andrade-inpe pedro-andrade-inpe modified the milestones: 2.0.1, 2.1 Aug 20, 2020
@avancinirodrigo
Copy link
Contributor Author

@pedro-andrade-inpe
@tiagogsc
HPA is ready for use. There are some limitations and problems that must be fixed for use internally in TerraME (#2362 #2357 #2358 #2359), but nothing prevents it from being used by end-users as you can see in execution tests.

src/hpa/hpa.cpp Outdated
HPA::~HPA(){
if(mainStack) {
if( mainStack->getState() ) removeWorkers(mainStack->getState());
removeLockSections();
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Check indentation

//informacao sobre a quantidade de cores da maquina
SYSTEM_INFO sysinfo;
GetSystemInfo(&sysinfo);
setNumCpu(sysinfo.dwNumberOfProcessors);
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Does it always use all processors available?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It does.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It would be interesting if the user could choose the amount of processors to be used.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

There is a method for that np(). See it in hpa cmd tests.

try{
fileModel.open(modelPath.c_str(), ifstream::in);
}catch(exception e){
cout << "problema ao abrir o modelo, verifique o path" << endl;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please translate to english at least the messages.

end

function fillCsB()
forEachCell(csB, function(cell)
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I was thinking about having a forEachParallelCell(). Would that be possible?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think so, but it doesn't work with a cellular space as an argument.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Why not?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Probably something that needs to be done in C++ level.

@pedro-andrade-inpe
Copy link
Member

@avancinirodrigo, thanks. May I merge?

@avancinirodrigo
Copy link
Contributor Author

@avancinirodrigo, thanks. May I merge?

Yes.

@pedro-andrade-inpe pedro-andrade-inpe merged commit e87f563 into TerraME:master Sep 22, 2020
@tiagogsc
Copy link

tiagogsc commented Sep 23, 2020 via email

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

Successfully merging this pull request may close these issues.

None yet

3 participants