How to use MPI (openMPI or MPICH2) with minGW - GNU gfortran compiler - eclipse

I am using the eclipse PTP IDE to develop MPI code, I want to be able to compile MPI on windows, it seems to provide c++ and c binding, but I am writing using fortran and gfortran compiler and would like to work in windows, the current problem doesn't exist on linux because there it is possible to compile the libraries locally in linux and use the .mod modules.
I wanted to compile the modules using cygwin but the GNU gfortran version on cygwin is too old, and I wasn't successful openMPI or MPICH2 on windows using miniGW
any suggestions? maybe using c++ binding in fortran 2003, I write my code in fortran 2003 so it support this feature.
Documentation on this issue is lacking.
Thank you.

According to the MPICH2 Installer's Guide MPICH2 can be built under cygwin (see section 9.3 of the same document), so the version of gfortran shouldn't be an issue. Have you followed the instructions in this document (in particular section 2)?

Related

Clang installed on Windows, where is the make executable?

I'd like to use Netbeans (12.4), on Windows, with Clang. I used the LLVM installer and Netbeans detected most of the executables. See image below.
However, whilst the C and C++ compilers have been found, I can't find anything in the LLVM folder to provide a make command.
What is the best way to resolve this?

Vim plugin does not recognize existing Perl support

I've been using the CoqIDE plugin for Vim on Linux machines for editing Coq files. Now I'm trying to install it on Windows 8. But when I try to source the plugin, I get
Your vim doesn't support Perl. Install it before using CoqIDE mode.
which is strange, because with :version I clearly see +perl/dyn included. Is this different from the +perl that I need?
I heard somewhere that you need to have Perl installed before Vim to get a Perl-enabled Vim, so I tried that as well. I uninstalled Vim, installed Strawberry Perl 5.18.2.2 (64bit), and reinstalled Vim. Still the same problem.
If the solution involves manually compiling binaries, I would really appreciate detailed instructions as I don't have any experience with it.
+perl/dyn just specifies that Vim has been compiled with dynamic Perl support; it doesn't yet check that the Perl library can be loaded successfully. To do that, try executing a Perl command, e.g.:
:perl VIM::Msg("Hello")
This probably yields on your system:
E370: Could not load library perl510.dll
Sorry, this command is disabled: the Perl library could not be loaded.
Next, you'd then have to investigate whether a proper Perl version has been installed and the DLL is accessible (though the PATH).
Download DWIMPerl for windows. I'm running win7 64 and gvim 7.4.2. Using strawberryperl and activeperl resulted in :echo has('perl') to yield 0. By switching to DWIMPerl (and ensuring my PATH env variables are proper) :echo has('perl') now yields 1 using the standard gvim distribution. This is important for vim extensions like dbext which require proper support for perl interfaces.

i had developed a tool using gtk in linux. its working fine now i want to make it port to windows?

For that tool i used glade -3 to build windows in linux and imported inside code using gtk builder, now want to port this tool to windows xp what is best way ?
thanks in advance :)
Install the GTK-all-in-one bundle available on gtk.org. Installation procedure ins included in the README file contained in the bundle. Then, install MinGW on your Windows platform, and use mingw-get (the package management tool), to install msys (a shell). For a 64-bits build, you may use MinGW-64 (which is a fork of MinGW). You then will have a platform for developing on Windows.
I personally used that platform with CMake to successfully build some code sample. Read my answer on How do I link gtk library more easily with cmake in windows? for a CMake + GTK code sample.

MinGW or Cygwin GCC?

I want to install a GCC compiler in Windows for the Eclipse IDE. I know there are two options: MinGW GCC or Cygwin GCC. Which one is better for Eclipse CDT? Any experience or suggestions will be appreciated.
Using Cygwin means your program will be dependent on cygwin1.dll, which is essentially a layer that allows POSIX functionality to be used in a Windows environment. Compiling with the standard MinGW GCC provides no such dependancy. This means however, if you intend to compile with MinGW GCC, you will not have access to POSIX functions such as fork() and exec().
For more information on the differences between Cygwin and MinGW, see here.
My offhand thoughts are, if you need cygwin, you need it. For instance compiling programs that were developed for Unix and have symbolic links and shell scripts in the build system.
If you don't need it, you don't want it. And compiling under linux on a virtual machine is often a better choice than going the cygwin route.
So mingw is perfectly fine. Works fine, simple to use.
Also: You might consider codelite (www.codelite.org) instead of Eclipse.
Personally I like Cygwin better, it has a lot of installation options and it feels a lot like the terminal you'll find on a Linux machine. It provides a pretty substantial set of Linux-like capabilities, something that Windows fails at miserably.
Cygwin and Mingw are not interchangeable alternatives. Cygwin is used to compile POSIX API programs, Mingw is used compile Windows API programs.
Chose one or the other depending on what kind program you're going to write.
Wikipedia Says:
MinGW forked from version 1.3.3 of Cygwin. Although both Cygwin and MinGW can be used to port UNIX software to Windows, they have different approaches: Cygwin aims to provide a complete POSIX layer that provides emulations of several system calls and libraries that exist on Linux, UNIX, and the BSD variants. The POSIX layer runs on top of Windows, sacrificing performance where necessary for compatibility. Accordingly, this approach requires Windows programs written with Cygwin to run on top of a copylefted compatibility library that must be distributed with the program, along with the program's source code. MinGW aims to provide native functionality and performance via direct Windows API calls. Unlike Cygwin, MinGW does not require a compatibility layer DLL and thus programs do not need to be distributed with source code.
Because MinGW is dependent upon Windows API calls, it cannot provide a full POSIX API; it is unable to compile some UNIX applications that can be compiled with Cygwin. Specifically, this applies to applications that require POSIX functionality like fork(), mmap() or ioctl() and those that expect to be run in a POSIX environment. Applications written using a cross-platform library that has itself been ported to MinGW, such as SDL, wxWidgets, Qt, or GTK+, will usually compile as easily in MinGW as they would in Cygwin.
The combination of MinGW and MSYS provides a small, self-contained environment that can be loaded onto removable media without leaving entries in the registry or files on the computer. Cygwin Portable provides a similar feature. By providing more functionality, Cygwin becomes more complicated to install and maintain.
It is also possible to cross-compile Windows applications with MinGW-GCC under POSIX systems. This means that developers do not need a Windows installation with MSYS to compile software that will run on Windows without Cygwin.

Mex problem, how to support c99(matlab)

I'm using windows os. I want to choose some compilers which can support c99 to mex my cpp files. What should I do? I have installed visual c++ in my os, but I guess it does not support c99
Thanks
Zhong
Well, comparing the list of compilers supported by mex with the list of compilers supporting C99, it looks like the best you can do would probably be Open Watcom or Intel C++, which each have partial support for C99.
If you are able to run on Linux or Mac OS X, you can use GCC, which has better C99 support, but given that you are on Windows, it doesn't appear that Matlab on Windows supports GCC.
A proposed solution for working with MinGW can be found here.
Transparency: the solution was posted by me.