new xeon v4 cpus

vlado how exactly vray see cpu amount? how do u detect number of cpu’s/cores

as u can see there r groups of cpus

We are using the Windows API for working with processor groups that was introduced in Windows 7:


			int useThreadAffinity=getUseThreadAffinity();
			if (useThreadAffinity) {
				// try using groups-aware API available in Windows 7 onwards
				TGetLogicalProcessorInformationEx pGetLogicalProcessorInformationEx =
					(TGetLogicalProcessorInformationEx) GetProcAddress(GetModuleHandle(TEXT("kernel32.dll")), "GetLogicalProcessorInformationEx");

				if (NULL != pGetLogicalProcessorInformationEx) {
					const LOGICAL_PROCESSOR_RELATIONSHIP relation = RelationNumaNode;
					DWORD bufferLen = 0;
					pGetLogicalProcessorInformationEx(relation, NULL, &bufferLen);

					VUtils::UPtr< SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX, VUtils::smile:eleterWithFree< SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX > >
						buffer((PSYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX) malloc(bufferLen));

					if (pGetLogicalProcessorInformationEx(relation, buffer.get(), &bufferLen)) {
						const DWORD recordSize = buffer->Size;
						const DWORD nodeCount = bufferLen / recordSize;

						const BYTE *it = reinterpret_cast< const BYTE* >(buffer.get());
						const BYTE *itend = it + bufferLen;
						int prefixSum = 0;

						for (DWORD i = 0; it != itend; it += recordSize, ++i) {
							const SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX &ri = *reinterpret_cast< const SYSTEM_LOGICAL_PROCESSOR_INFORMATION_EX* >(it);
							NodeInfo nodeInfo;
							nodeInfo.group = ri.NumaNode.GroupMask.Group;
							nodeInfo.mask  = ri.NumaNode.GroupMask.Mask;
							ULONG dummy = 0;

							computeNumaNodeResources(nodeInfo, prefixSum, dummy);
						}

						numProcessors = prefixSum;
						return;
					}
				}
			}
//...

/// compute cpu mask and prefix sum of available logical processors for a NUMA node
/// @param [in, out] nodeInfo record containing node info; mask and prefix-sum fields to be updated by this routine
/// @param [in, out] prefixSum running count of accessible logical processors
/// @param [in, out] processNodeCount total number of NUMA nodes available to this process
/// @param processMask custom processor mask for this process
template < typename T >
static void computeNumaNodeResources(
	NodeInfo& nodeInfo,
	T& prefixSum,
	ULONG& processNodeCount,
	const Mask processMask = Mask(-1)) {

	// if the intersection of process and node masks is non-empty, we can run on this node
	const Mask nodeMask = nodeInfo.mask & processMask;

	if (0 != nodeMask) {
		prefixSum += T(VUtils::__popcnt((size_t) nodeMask)); // count available processors so far
		++processNodeCount;
	}

	nodeInfo.mask = nodeMask;
	nodeInfo.prefixSum = prefixSum;
}

Best regards,
Vlado

just an update ;), looks like its working…

friend just downloaded a latest ver 3.3.05 and env variable :), my bad, im so sorry vlado ;), friend was using some older build of vray and he didnt told me that, and we were trying to use the env variable with previous build

once more, sorry :wink:

best regards

No worries, glad that it’s working now :slight_smile:

Best regards,
Vlado

I’m actually having the same problem with the affinity. I’m using a new dual xeon v4 and most of the times (with my older machine) I use to keep working in simple stuffs while the backburner server is on, so I use to set the affinity to something that let me work without problem, but with this new machine, the computer almost collapse everytime the render starts, then I’m able (with a lot difficulty) to set the affinity, but when a frame is over, it takes again all the cores again, so, the machine collapse until I set the affinity again… is insane, and I was wondering if I was the only one with this issue. Anyone found a solution for this?

a short update for anyone else using windows 10 and more than 64 cores… I’m very happy to report that the windows 10 anniversary update fixes the start menu and runtime broker issues. Still can’t change affinity but learning to deal with that.

Affinity was never meant to solve this problem; the correct thing to do is set the priority of the 3ds Max process to “Below normal” or “Low”. You should never tinker with the CPU affinity of a process.

Best regards,
Vlado

The trick is to set the server.exe from backburner to low, that will force the resulting max instance to be started in low priority for all your frames that will be rendered from there on :slight_smile:
Checking low priority in vray rollout help as well, we tend to do both just to be safe :wink:

Stan

Nice! that drove me insane trying to figure it out…so is the searchindex.exe not throwing this error anymore?

havent checked specifically, but runtimebroker doesnt go crazy anymore and I can use the windows button again. phew!

does anyone have any problems using Multiscatter on a multi processor groups machine?
Well we have, we use machines with >64 cores, and with Vray 3.45.01 (also the 3.40 version) it renders with multiscatter objects like grasses at least 5 x slower!
The only solution is to do it the old way with vray spawner.
I already reported this to vray and it has to do with the ‘old embree library version’.
So i was wondering… any support from you guys would help to speed things up.

Our guys are working as fast as they can; we’ve done a lot of custom modifications to Embree, so updating it is quite a bit of work. Unless you are an experienced programmer that wants to join our team, I don’t think you can help us in speeding things up.

Best regards,
Vlado

i know you mean well vlado but i was not trying to get a job as programmer (i am not smart enough :slight_smile: however i was asking the forum people for any help, if they experiance the same shit or am i the only one left that is using Multiscatter.
Nice to read that Vray is still working on this problem!