I call Send<>(), followed by a Receive<>(), and the Send<>() always times out. How do can I send and receive to/from the same Host in the same thread / mpi processor?
Send<>() will block until a corresponding Receive<>() has been issued. Because the Receive<>() is after, it will never be called. An asynchronous send should be used in this case. BeginSend<>(); Receive<>(); EndSend<>();
I get a timeout or the following exception when using a custom or non-standard .NET type:
System.ServiceModel.CommunicationException was unhandled by user code. There was an error while trying to serialize parameter :message. The InnerException message was 'Type 'SampleApplication.CustomClass' with data contract name 'CustomClass:http://schemas.datacontract.org/2004/07/SampleApplication' is not expected. Add any types not known statically to the list of known types - for example, by using the KnownTypeAttribute attribute or by adding them to the list of known types passed to DataContractSerializer.
For security reasons, WCF will only serialize / deserialize known types. You can add the following section to your app.config
<system.runtime.serialization>
<dataContractSerializer>
<declaredTypes>
<add type="Mpi.Message, Mpi">
<knownType type="SampleApplication.CustomClass, SampleApplication" />
</add>
</declaredTypes>
</dataContractSerializer>
</system.runtime.serialization>
I keep receiving the following error:
"The maximum message size quota for incoming messages has been exceeded for the remote channel."
Use the .NET service configuration editor UI located at http://msdn2.microsoft.com/en-us/library/ms732009.aspx to adjust the service binding configuration. The service binding config should have the attribute maxReceivedMessageSize set higher.
How I configure the example MandelBrot in diferents machines?
1. Rename the environment names in the app.config to the actual machine names
<Environment name="MACHINE_NAME1">
<Hosts>
<Host comms="MPI_COMM_WORLD"
client="MpiClient1"
service="MpiService1" />
<Host comms="MPI_COMM_WORLD"
client="MpiClient2"
/>
<Host comms="MPI_COMM_WORLD"
client="MpiClient3"
/>
<Host comms="MPI_COMM_WORLD"
client="MpiClient4"
/>
</Hosts>
</Environment>
2. Change the client addresses to each of the machine names
<endpoint address="net.tcp://localhost:8080/MpiService" binding="netTcpBinding"
bindingConfiguration="MpiClientBinding" contract="Mpi.IMpiService"
name="MpiClient1">
3. When creating the processor group, use Environment.MachineName as the environment name, rather than getting it out of the args
using (ProcessorGroup processors =
new ProcessorGroup(args[0], MpiProcess))
4. Then use ExecCmd instead of executing the processes locally:
ExecCmd.exe \\MACHINE_NAME1,\\MACHINE_NAME2,....
/user:username /pwd:password /N /P
....\MandelBrotSetCalculations.exe
I can't send / receive messages between non-domain computers with different users
There's a few options. One is to create users with the same passowrds on all the machines.
Another solution that apparently worked is to enable file sharing, and while accessing and save the password when prompted.
ExecuteCmd.exe returns an access is denied error.
Make sure file sharing is enabled. And that you are running it as an admin on the remote box. ExecuteCmd.exe uses the hidden admin shares to copy over a tiny service, install it and then begin communicating with it.