rebay
April 20, 2007, 11:04am
1
Hi,
i have developped a code on my laptop. Now i am trying to compile this code on a opteron cluster with pgi fortran compiler but before the end the compilation stops with the following msg error:
pgf90 -c -O kinds.f90
pgf90 -c -O luflus.f90
pgf90 -c -O nodal.f90
pgf90 -c -O feref.f90
pgf90 -c -O gauss1.f90
pgf90 -c -O gauss2.f90
pgf90 -c -O gauss3.f90
pgf90 -c -O fequa.f90
pgf90 -c -O fe.f90
PGF90-W-0016-Identifier, eval_geometry_shape_at_quadrature_points, truncated to 31 chars (fe.f90: 77)
PGF90-W-0016-Identifier, eval_unknown_shape_at_quadrature_points, truncated to 31 chars (fe.f90: 78)
PGF90-W-0016-Identifier, eval_geometry_shape_at_unknown_interpolation_nodes, truncated to 31 chars (fe.f90: 81)
0 inform, 3 warnings, 0 severes, 0 fatal for fe_set
pgf90 -c -O grid.f90
pgf90 -c -O metric.f90
pgf90 -c -O gas.f90
pgf90 -c -O symmetry.f90
pgf90 -c -O wall.f90
pgf90 -c -O outflow.f90
pgf90 -c -O inflow.f90
pgf90 -c -O far.f90
pgf90 -c -O icbc.f90
pgf90 -c -O nslib.f90
pgf90 -c -O roe.f90
pgf90 -c -O gdnv.f90
pgf90 -c -O vlh.f90
pgf90 -c -O ns2d.f90
pgf90 -c -O field.f90
pgf90 -c -O tec.f90
pgf90 -c -O adv.f90
pgf90 -c -O dif.f90
pgf90 -c -O sla.f90
pgf90 -c -O umf.f90
pgf90 -c -O bdm.f90
pgf90 -c -O solver.f90
pgf90 -c -O system.f90
pgf90 -c -O be.f90
pgf90 -c -O rk.f90
pgf90 -c -O fmg.f90
pgf90 -c -O main.f90
pgf90 -O -o main.exe main.o adv.o be.o rk.o dif.o far.o fe.o feref.o field.o gas.o gauss1.o gauss2.o gauss3.o fmg.o gdnv.o grid.o icbc.o inflow.o kinds.o luflus.o main.o metric.o nodal.o ns2d.o nslib.o outflow.o fequa.o roe.o bdm.o sla.o solver.o symmetry.o system.o umf.o vlh.o wall.o tec.o
~/Lib/lapack_LINUX.a ~/Lib/libslap.a ~/Lib/libumfpack.a ~/Lib/blas_LINUX.a
main.o(.text+0x0): In function MAIN_': : multiple definition of
MAIN_’
main.o(.text+0x0): first defined here
make: *** [main.exe] Error 2
I really don’t know what i have to do to find this error…infact i have checked and i have only one “main” program (main.f90). I am not able to check in which file there is the definition of another main.
Waiting for your kind reply.
With best regards,
Antonio
Hi Antonio,
With Fortran, you define where the main program is using the “PROGRAM program_name … END PROGRAM program_name” syntax. The compiler then links in an actual subroutine named “main” which will be the bridge between the operating system’s loader program and your program’s “MAIN_” (which is what “PROGRAM” gets translated into).
This means that you can not have a function or subroutine named “main”. Please rename it.
Hope this helps,
Mat
rebay
April 23, 2007, 9:04am
3
Hello,
unfortunately i have tried to rename the program name but the error is still appearing as you can see:
make
pgf90 -c -O kinds.f90
pgf90 -c -O luflus.f90
pgf90 -c -O nodal.f90
pgf90 -c -O feref.f90
pgf90 -c -O gauss1.f90
pgf90 -c -O gauss2.f90
pgf90 -c -O gauss3.f90
pgf90 -c -O fequa.f90
pgf90 -c -O fe.f90
PGF90-W-0016-Identifier, eval_geometry_shape_at_quadrature_points, truncated to 31 chars (fe.f90: 77)
PGF90-W-0016-Identifier, eval_unknown_shape_at_quadrature_points, truncated to 31 chars (fe.f90: 78)
PGF90-W-0016-Identifier, eval_geometry_shape_at_unknown_interpolation_nodes, truncated to 31 chars (fe.f90: 81)
0 inform, 3 warnings, 0 severes, 0 fatal for fe_set
pgf90 -c -O grid.f90
pgf90 -c -O metric.f90
pgf90 -c -O gas.f90
pgf90 -c -O symmetry.f90
pgf90 -c -O wall.f90
pgf90 -c -O outflow.f90
pgf90 -c -O inflow.f90
pgf90 -c -O far.f90
pgf90 -c -O icbc.f90
pgf90 -c -O nslib.f90
pgf90 -c -O roe.f90
pgf90 -c -O gdnv.f90
pgf90 -c -O vlh.f90
pgf90 -c -O ns2d.f90
pgf90 -c -O field.f90
pgf90 -c -O tec.f90
pgf90 -c -O adv.f90
pgf90 -c -O dif.f90
pgf90 -c -O sla.f90
pgf90 -c -O umf.f90
pgf90 -c -O bdm.f90
pgf90 -c -O solver.f90
pgf90 -c -O system.f90
pgf90 -c -O be.f90
pgf90 -c -O rk.f90
pgf90 -c -O fmg.f90
pgf90 -c -O dg.f90
pgf90 -O -o dg.exe dg.o adv.o be.o rk.o dif.o far.o fe.o feref.o field.o gas.o gauss1.o gauss2.o gauss3.o fmg.o gdnv.o grid.o icbc.o inflow.o kinds.o luflus.o dg.o metric.o nodal.o ns2d.o nslib.o outflow.o fequa.o roe.o bdm.o sla.o solver.o symmetry.o system.o umf.o vlh.o wall.o tec.o
~/Lib/lapack_LINUX.a ~/Lib/libslap.a ~/Lib/libumfpack.a ~/Lib/blas_LINUX.a
dg.o(.text+0x0): In function MAIN_': : multiple definition of
MAIN_’
dg.o(.text+0x0): first defined here
make: *** [dg.exe] Error 2
i have reamed the program_name (the name is “dg” now) and is now contained in the file dg.f90.
What can i do now to try to resolve the problem?
Best regards,
Antonio
rebay
April 23, 2007, 2:09pm
4
Dear Mat,
i have finally found the error…a problem in the makefile. Thanks for your help and i apologize for wasting your time.
Best regards
Antonio
Not a problem. I’m glad I could help.
i wish you could write the solution.