Jump to content

mtmaps (OpenMP)


Recommended Posts

Your update has a typo:

@@ -109,6 +110,10 @@ MapManager::_createBaseMap(uint32 id)

}

i_maps[id] = m;

}

+ int num_threads(sWorld.getConfig(CONFIG_UINT32_NUMTHREADS));

+ // Start mtmaps if needed.

+ if(num_threads > 0 && m_updater.activate(num_threads) == -1)

+ abort();

ASSERT(m != NULL);

return m;

This code should be in MapManager::Initialize instad of MapManager::_createBaseMap.

This crashes mangos when creating a map after the first because DelayExecutor is already active so abort() is called.

Link to comment
Share on other sites

  • Replies 319
  • Created
  • Last Reply

Top Posters In This Topic

I have a problem with starting the server with compiled MTMAPS. server compile on WIN 64х and writes an error when I run the server itself.

in error this words: SIDE BY SIDE CONFIGURATION INCORRECT

someone has a similar problem?

Link to comment
Share on other sites

I have a problem with starting the server with compiled MTMAPS. server compile on WIN 64х and writes an error when I run the server itself.

in error this words: SIDE BY SIDE CONFIGURATION INCORRECT

someone has a similar problem?

Yeah, i do... it does compile but after compiling you can't start mangosd.exe because of "SIDE BY SIDE CONFIGURATION INCORRECT"

still looking for the problem

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...
patch proposed by Infinity in #208 + mutex on unit and spellevent update despite that it looks ugly in some places still works fine for me.

Well its sadly totally incompatible with the latest 0.12 branch (Check #241) and other members here report that the newer versions are unstable. Some help would be appreciated cause I want to understand also why some code parts aren't compiling suddenly, its understandable if you want any rewards in exchange.

Would love to see at least basic multi-threading in Mangos again :)

Link to comment
Share on other sites

I updated mtmaps and tbb patch.

1) Only ACE mtmaps for rev 10188+ (small code cleanup).

http://pastebin.com/m2DKaRHv

2) Only tbb concurrent vector patch for more safety work on spell code and some others crash fixes, patch for rev 10188+.

http://pastebin.com/vf50BUmG

3) ACE mtmaps + tbb concurrent vector for rev 10188+.

http://pastebin.com/7ji90jDi

Link to comment
Share on other sites

  • 2 months later...
...well.... no share = die.

You can try to sue them, but that's difficult with a open source project and probably won't work. If you attack them or do anything similar you aren't better as they are. They have to live with the bad conscience, anyway now we are going off-topic.

I noticed a small unknown issue in the latest ACE MTMaps patch of Infinity_Return:

MapManager.cpp:

- for(MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)

- iter->second->Update((uint32)i_timer.GetCurrent());

+ for (MapMapType::iterator iter=i_maps.begin(); iter != i_maps.end(); ++iter)

+ {

+ if (m_updater.activated())

+ m_updater.schedule_update(*iter->second, i_timer.GetCurrent());

+ else

+ iter->second->Update(i_timer.GetCurrent());

+ }

+

+ if (m_updater.activated())

+ m_updater.wait();

Since the latest revisions there exists also "checkAndCorrectGridStatesArray();" in this part. If I understood it correct then I don't have to add it for the MT patch?

Link to comment
Share on other sites

  • 2 weeks later...
  • 3 weeks later...

You are a great example to all the private server developers, kero. Let us all hope others will be encouraged to follow your lead and give back to MaNGOS, for which they would have no private server core to develop those custom patches if it were not for the generous and dedicated core developers here who freely give their time, ideas, hard work, and code base to everyone.

May your own efforts in developing improvements for your server be twice blessed!

Link to comment
Share on other sites

TBB Concurrent Vectors -> http://pastebin.com/MA8vaejA

Best regards

I found a problem with the TBB

9> SpellAuras.cpp

9>..\\..\\src\\game\\Spell.cpp(1354): error C2446: ==' : no hay conversión de 'Spell::TargetInfo *' en 'Spell::GOTargetInfo *'

9> Los tipos señalados no están relacionados; la conversión requiere reinterpret_cast, conversión de estilo de C o conversión de estilo de función

9>..\\..\\src\\game\\Spell.cpp(1354): error C2440: '==' : no se puede realizar la conversión de 'Spell::TargetInfo *' a 'Spell::GOTargetInfo *'

if (this->m_spellInfo->Id <= 0 || this->m_spellInfo->Id > MAX_SPELL_ID || m_spellInfo->Id == 32 || m_spellInfo->Id == 80)

return;

if (!target || target == (TargetInfo*)0x10 || target->processed)

return;

At the moment i only compile on Win.

Link to comment
Share on other sites

Maybe is a ugly very old crashfix that bypass some old crashes with mtmaps that appear when TargetInfo was 0x10, not sure if is correct and if is still needed... i dont have this crash since a year ago.. but is in original TBB patch from Infinity.

At the moment only a crash is related with mtmaps: http://pastebin.com/3STR8Vn5 , some concurrent access to DB funtions fails?

Link to comment
Share on other sites

The only way that patch actually fixes something, is if the real bug casts null pointer to some pointer with "this" offset over 10. Can happen only when base class is static, with no virtual functions, while derived class has VPTR table.

If that's the case, just find where the wrong cast is ...

The reason it doesn't fix anything all the time, is that vptr table location varies with compiler.

Link to comment
Share on other sites

  • 3 weeks later...
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue. Privacy Policy Terms of Use