[petsc-users] multiple definition of `main' with intel compilers
Satish Balay
balay at mcs.anl.gov
Thu May 21 16:37:55 CDT 2020
Do you get this error when building PETSc examples [C and/or fortran] - when you build them with the corresponding petsc makefile?
Can you send the log of the example compiles?
Satish
---
[the attachment got deleted - don't know by who..]
DENIAL OF SERVICE ALERT
A denial of service protection limit was exceeded. The file has been removed.
Context: 'configure.log.7z'
Reason: The data size limit was exceeded
Limit: 10 MB
Ticket Number : 0c9c-5ec6-f30f-0001
For further information, contact your system administrator.
Copyright 1999-2014 McAfee, Inc.
All Rights Reserved.
http://www.mcafee.com
On Thu, 21 May 2020, Alfredo Jaramillo wrote:
> dear PETSc team,
>
> I have compiled PETSc with a 2016 version of the intel compilers. The
> installation went well, but when I tried to compile my code the following
> error appears in the final step of compilation (linking with ld)
>
> ../build/linux_icc/obj_linux_icc_opt/main.o: In function `main':
> main.c:(.text+0x0): multiple definition of `main'
> /opt/intel/parallel_studio_xe_2016_update2/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64/libifcore_pic.a(for_main.o):for_main.c:(.text+0x0):
> first defined here
> /opt/intel/parallel_studio_xe_2016_update2/compilers_and_libraries_2016.2.181/linux/compiler/lib/intel64/libifcore_pic.a(for_main.o):
> In function `main':
> for_main.c:(.text+0x3e): undefined reference to `MAIN__'
>
> I searched for this and I found that the option "-nofor_main" should be
> added when compiling with ifort, but our code is written only in C an C++.
> The FORTRAN compiler is used when PETSc compiles MUMPS. So I dont know if
> this would work for this case.
>
> The configure.log file and the log of the compilation giving the error are
> attached to this message. These logs were obtained in a cluster, I'm
> getting the same error on my personal computer with a 2020 version of the
> Intel Parallel Studio.
>
> thank you for any help on this
> Alfredo
>
More information about the petsc-users
mailing list