Quantcast
Channel: Intel® C++ Compiler
Viewing all articles
Browse latest Browse all 1616

Primme 1.1 compilation fails multiple definition of `main'

$
0
0

Dear Sir/Madam
I need PRIMME-V1 for building SLEPC so i am trying to build the application using intel 2015 suite on CentOS 6.5.
I am getting following error:-

mpiifort -fPIC -o seq_dprimme driver_seq.o readuc.o shared_utils.o ssrcsr.o  ilut.o amux.o -L/opt/user1-INTEL/finaluser1/ToolsInstaller/Mechanical/OOFEM/PRIMME -I/opt/user1-INTEL/finaluser1/ToolsInstaller/Mechanical/OOFEM/PRIMME/PRIMMESRC/COMMONSRC -I/opt/user1/user1_Installed/Ajavascript:void(0)pplication_Dependencies/include -lprimme -llapack -lblas -lm
driver_seq.o: In function `main':
driver_seq.c:(.text+0x0): multiple definition of `main'
/opt/intel/composer_xe_2015.3.187/compiler/lib/intel64/for_main.o:for_main.c:(.text+0x0): first defined here
/opt/intel/composer_xe_2015.3.187/compiler/lib/intel64/for_main.o: In function `main':
for_main.c:(.text+0x2a): undefined reference to `MAIN__'
make[1]: *** [seq_dprimme] Error 1
make[1]: Leaving directory `/opt/user1-INTEL/finaluser1/ToolsInstaller/Mechanical/OOFEM/PRIMME/DTEST'
make: *** [seq_dprimme] Error 2
/opt/user1/user1_Installed/Application_Dependencies/lib/libprimme.a

The following commands sets the appropriate compilation options.     

tar -xzvf primme_v1.1.tar.gz
        cd PRIMME
        sed -i "/^TOP =/c TOP = $PWD" Make_flags
        sed -i "/^CC/c CC = $MPIC_COMP" Make_flags
        sed -i "/^F77/c F77 = $MPIF_COMP" Make_flags
        sed -i "/^CFLAGS/c CFLAGS = -O2 -fPIC" Make_flags
        sed -i "/^FFLAGS/c FFLAGS = -O2 -fPIC" Make_flags
        sed -i "/^LDR/c LDR = $MPIF_COMP -fPIC"  Link_flags
        sed -i "/^ LDFLAGS/c LDFLAGS =  "  Link_flags
        sed -i "/^ LIBS/c LIBS = -lprimme -llapack -lblas -lm " Link_flags
        sed -i "/^INCLUDE/c INCLUDE = -I\$(COMMONDIR) -I$user_install_path/Application_Dependencies/include"  Link_flags

         make VERBOSE=1 all

Why the compiler reports multiple definition of main function ?.Eagerly awaiting your reply.


Viewing all articles
Browse latest Browse all 1616

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>