The openMX code (http://www.openmx-square.org/download.html) is a software package for nano-scale material simulations based on density functional theories. it has a make file which contains C and fortran compiler executable, libraries and include files,
CC = mpicc -O3 -fopenmp -Dnosse -I/usr/include -I/mirror/fftw/include -I/mirror/mpich/include
FC = mpif90 -O3 -fopenmp -Dnosse -I/usr/include -I/mirror/fftw/include -I/mirror/mpich/include
LIB=-L/mirror/lib -llapack -lblas -lfftw3 -L/mirror/mpich -lmpi -lmpicxx -lmpifort -lpthread -lgfortran
I want to compile this program for windows as can be run independently. I don't know is it possible with MinGw? how can i use mpicc and mpif90 compilers and lapack, blas and fftw3 libraries for mingw?
Thank you
OK. Couple things:
mpicc/mpif90 are wrappers, which add proper compile / link flags. there is no need for them to be available to build programs.
MinGW used to be the way to go on Windows in my view. Nowadays, I'd invest the energy in setting up CMake for the project and actually build with VisualStudio.
If you want to use gcc etc for building, that's totally fine, but I would not use MinGW, but do cross compilation on Linux. That's truly a time saver. The configure scripts need sometimes 10 times longer or more to finish under MinGW that when cross compiling with Linux.
MPI is not as trivially done on Windows. You need Windows domain with domain authentication for MPI to work. comparable to you ssh public key.
check this page for example: https://www.gnu.org/software/automake/manual/html_node/Cross_002dCompilation.html