Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
81 Views

Cross compiler error

Hi Everyone,
              I am trying to compile c code which use MPI(message passing interface) by using intel complier- mpiicc but i got following cross compiler error.

mpiicc -O3 -g -Wall -o main -I/opt/intel/parallel_studio_xe_2018/compilers_and_libraries_2018/linux/mpi/intel64/include -I/usr/local/include/ AccumProps.o AllocArrays.o ApplyBoundaryCond.o Close.o ComputeForcesCells.o EvalProps.o Init.o LeapfrogStep.o main.o PrintSummary.o SetupJob.o Trajectory.o EvalVacf.o AccumVacf.o InitVacf.o ZeroVacf.o PrintVacf.o Integrate.o DumpState.o EvalRdf.o EvalDiffuse.o AccumDiffuse.o InitDiffuse.o ZeroDiffuse.o PrintDiffuse.o EvalVeloAcf.o AccumVeloAcf.o InitVeloAcf.o ZeroVeloAcf.o PrintVeloAcf.o EvalSpacetimeFluct.o AccumSpacetimeFluct.o InitSpacetimeFluct.o PrintSpacetimeFluct.o ZeroSpacetimeFluct.o EvalSpacetimeFluct2.o ComputeForceExternal.o AccumSpacetimeFluct2.o InitSpacetimeFluct2.o PrintSpacetimeFluct2.o ZeroSpacetimeFluct2.o EvalVelDist.o PrintVelDist.o -L/usr/local/lib -L/opt/intel/parallel_studio_xe_2018/compilers_and_libraries_2018/linux/mpi/intel64/lib -lm -lgsl -lgslcblas    
main.o: In function `main':
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:62: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:63: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:134: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:135: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:135: undefined reference to `ompi_mpi_op_sum'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:135: undefined reference to `ompi_mpi_double'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:136: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:136: undefined reference to `ompi_mpi_op_sum'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:136: undefined reference to `ompi_mpi_double'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:137: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:137: undefined reference to `ompi_mpi_op_sum'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:137: undefined reference to `ompi_mpi_double'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:138: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:138: undefined reference to `ompi_mpi_op_sum'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:138: undefined reference to `ompi_mpi_double'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:139: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:139: undefined reference to `ompi_mpi_op_sum'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:139: undefined reference to `ompi_mpi_double'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:176: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:176: undefined reference to `ompi_mpi_dblprec'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:177: undefined reference to `ompi_mpi_comm_world'
/home/ipr/Nirma_University/MPMD_v2.0/source-gravity/main.c:177: undefined reference to `ompi_mpi_dblprec'
Makefile:21: recipe for target 'main' failed
make: *** [main] Error 1

can you suggest me how to solve this error?

Tags (1)
3 Replies
Highlighted
Beginner
81 Views

Don't build your own cross-compiler, it's too complicated to get it right. There's a suitable cross-compiler available here.

 

 

0 Kudos
Highlighted
Student Ambassador
81 Views

Hi , I am having the same type of error. Did the above comment helped?

0 Kudos
Highlighted
Beginner
81 Views

I also have the same type of error. Any help!? Thanks in advance.

Core Java Online Certification

0 Kudos