cross-compiling with CMake

45 views
Skip to first unread message

Ronald Rahaman

unread,
Jul 29, 2014, 7:03:16 PM7/29/14
to openmc...@googlegroups.com
Hi all,

Does OpenMC v0.6.0 have support for cross-compilation environments?  If not, do you have any suggestions for setting up cross-compilation with Cmake?

Right now, when I try to compile on BG/Q, cmake is auto-detecting the wrong compiler (it's detecting the compiler for the login node).  I'm considering setting up some toolchains, as described here (http://www.cmake.org/Wiki/CMake_Cross_Compiling), but I don't have any experience with it and any suggestions would be appreciated.  

Thanks and best wishes,
Ron Rahaman

Sterling Harper

unread,
Jul 30, 2014, 3:37:30 AM7/30/14
to openmc...@googlegroups.com
Greetings,

You can tell CMake which compiler you want to use by setting the "FC" environment variable.  For example, see http://mit-crpg.github.io/openmc/usersguide/install.html#compiling-with-mpi

Sterling

Paul Romano

unread,
Jul 30, 2014, 11:49:03 AM7/30/14
to openmc...@googlegroups.com
Hi Ron,

I don't think anyone has tried cross-compilation environments in any serious effort. I did once make a feeble attempt to cross compile for Windows with mingw on a Linux machine -- it didn't work on the first try, and I didn't care that much so I gave up.

As Sterling suggested, you should be able to set the compiler explicitly using FC. That should solve your current woes on BG/Q, although I would consider that separate from a discussion of cross-compilation.

Paul


--
You received this message because you are subscribed to the Google Groups "OpenMC Users Group" group.
To unsubscribe from this group and stop receiving emails from it, send an email to openmc-users...@googlegroups.com.
To post to this group, send email to openmc...@googlegroups.com.
Visit this group at http://groups.google.com/group/openmc-users.
For more options, visit https://groups.google.com/d/optout.

Ronald Rahaman

unread,
Jul 30, 2014, 12:03:59 PM7/30/14
to openmc...@googlegroups.com
Thanks, guys!  I will use Sterling's suggestion as a quick fix, and I will look into cross-compilation toolchains as a long-term solution.  Looks like this issue has been addressed for other projects here at ANL ( https://wiki.alcf.anl.gov/parts/index.php/Mira_Build_System_Software_Documentation ), so I should be able to hunt down some experts.  
Reply all
Reply to author
Forward
0 new messages