Could guys help me on a boost MPI link error

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
2 messages Options
Reply | Threaded
Open this post in threaded view
|

Could guys help me on a boost MPI link error

Boost - Users mailing list
Hi All

I have built boost binary library on my PC workstation in windows 10 using VS 2017 for boost 1.65.1 successfully for application of MPI in my project. I had a simple test for MPI which worked perfectly. So I moved to a further test using boost example "odeint-v2/examples/mpi/phase_chain.cpp", which is applied to solve ODE with MPI capacity. When I tried to build the project, it gives me an error

Severity Code Description Project File Line Suppression State
Error LNK1112 module machine type 'x86' conflicts with target machine type 'x64' MPI-test2 C:\Users\renfanluo\source\repos\MPI-test2\MPI-test2\libboost_mpi-vc141-mt-1_65_1.lib(environment.obj) 1

I googled, then I went to properties->Linker->Advanced->Target Machine, changed to "MachineX86 (/MACHINE:X86)", then rebuild the project, now the error changes to

Severity Code Description Project File Line Suppression State
Error LNK1112 module machine type 'x64' conflicts with target machine type 'x86' MPI-test2 C:\Users\renfanluo\source\repos\MPI-test2\MPI-test2\x64\Release\MPItest2.obj      1

So this shows that simply changing the target machine setting in VS will not work. Could you guys give me some indications of how to fix this problem.

Best regards
Renfan
_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users
Reply | Threaded
Open this post in threaded view
|

Re: Could guys help me on a boost MPI link error

Boost - Users mailing list
On 16 November 2017 at 05:37, Renfan Luo via Boost-users <[hidden email]> wrote:
So this shows that simply changing the target machine setting in VS will not work. Could you guys give me some indications of how to fix this problem.

You have more than one problem (apparently) related to mixing 32 and 64 bit binaries. You don't state what you would like to have as a binary, 32 or 64 bit, but you should decide and then verify that all your to be linked in libraries are all in that bitness.

Then I suggest you just create a new project from scratch (copy the source files from the old project into the new project), respecting the bitness. i.e. choose Win32 or x64 from the pull-down menu at the top of the IDE.

This seems a bit drastic, but you'll save yourself the trouble of debugging your project (for a 5 minute job). Once you've got a working project I suggest you create a project template from that, so in the future a new project can be generated from that template (in seconds). Just do the google or checkout f.e. this or this (just some results that popped up doing some duckin).

Hope that helps,

degski

_______________________________________________
Boost-users mailing list
[hidden email]
https://lists.boost.org/mailman/listinfo.cgi/boost-users