October 25, 2024
Chicago 12, Melborne City, USA
C#

Problems with compiling MPI on notepad++


I recently tried to install MPICH2 and gcc compiler on Windows 7/64bit. I installed everything with no problems and I want it to run code through NotePad++, I included all the stuff so I can compile. But when I tried to compile the code I get this error:

CD: C:\MinGW\MPICH2\examples
Current directory: C:\MinGW\MPICH2\examples
ENV_SET: MPI_HOME = /MinGW/MPICH2
$(SYS.MPI_HOME) = /MinGW/MPICH2
gcc  -Wall -I/MinGW/MPICH2/include   -c -std=c99  -lm icpi.c
Process started >>>
<<< Process finished. (Exit code 0)
gcc  icpi.o  -L/MinGW/MPICH2/lib -lmpi -lfmpich2g -o  icpi
Process started >>>
icpi.o:icpi.c:(.text+0xc7): undefined reference to `MPI_Init'
icpi.o:icpi.c:(.text+0xde): undefined reference to `MPI_Comm_size'
icpi.o:icpi.c:(.text+0xf5): undefined reference to `MPI_Comm_rank'
icpi.o:icpi.c:(.text+0x10c): undefined reference to `MPI_Get_processor_name'
icpi.o:icpi.c:(.text+0x188): undefined reference to `MPI_Wtime'
icpi.o:icpi.c:(.text+0x1be): undefined reference to `MPI_Bcast'
icpi.o:icpi.c:(.text+0x2d4): undefined reference to `MPI_Reduce'
icpi.o:icpi.c:(.text+0x31b): undefined reference to `MPI_Wtime'
icpi.o:icpi.c:(.text+0x36d): undefined reference to `MPI_Finalize'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: icpi.o: bad reloc address 0x20 in section `.eh_frame'
c:/mingw/bin/../lib/gcc/mingw32/4.8.1/../../../../mingw32/bin/ld.exe: final link failed: Invalid operation
collect2.exe: error: ld returned 1 exit status

And this is my execute commands:

cd $(CURRENT_DIRECTORY)
ENV_SET MPI_HOME = /MinGW/MPICH2
gcc  -Wall -I$(SYS.MPI_HOME)/include   -c -std=c99  -lm $(FILE_NAME) 

gcc  $(NAME_PART).o  -L$(SYS.MPI_HOME)/lib -lmpi -lfmpich2g -o  $(NAME_PART)
mpiexec -np 10  $(CURRENT_DIRECTORY)\$(NAME_PART).exe



You need to sign in to view this answers

Leave feedback about this

  • Quality
  • Price
  • Service

PROS

+
Add Field

CONS

+
Add Field
Choose Image
Choose Video