* Re: -assume noold_ldout_format for GNU
@ 2018-05-30 12:23 Dominique d'Humières
2018-05-30 12:56 ` nachiket k
0 siblings, 1 reply; 13+ messages in thread
From: Dominique d'Humières @ 2018-05-30 12:23 UTC (permalink / raw)
To: nachiket316; +Cc: gfortran
> gfortran -c -I../lib/g2_d/ -O -C -fdefault-real-8 -J../copygb2.fd/final/1
> cpgb.f
>
> cpgb.f:482:72:
>
> & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET)
>
> Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(8) to
> INTEGER(4)
(1) Don’t use -f*-real-8.
(2) Apparently ‘ngdt1’ is a REAL on the caller side and an INTEGER on the collee one.
Without a (reduced) code it is extremely difficult to help you.
Dominique
^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-30 12:23 -assume noold_ldout_format for GNU Dominique d'Humières @ 2018-05-30 12:56 ` nachiket k 2018-05-30 13:35 ` Dominique d'Humières 0 siblings, 1 reply; 13+ messages in thread From: nachiket k @ 2018-05-30 12:56 UTC (permalink / raw) To: Dominique d'Humières; +Cc: gfortran Hi, without -fdefault-real-8 we get following errors cpgb.f:446:72: & IB1I,L1I,F1I,G1I,IRET) 1 Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) cpgb.f:482:72: & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET) 1 Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(4) to INTEGER(4) cpgb.f:600:72: & IBBI,LBI,FBI,GBI,IRET) 1 Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) cpgb.f:655:8: GFLD1%FLD => F1I 1 Error: Different types in pointer assignment at (1); attempted assignment of REAL(4) to REAL(8) cpgb.f:662:10: GFLD1%FLD => G1I 1 Error: Different types in pointer assignment at (1); attempted assignment of REAL(4) to REAL(8) cpgb.f:692:31: IF (ASSOCIATED(GFLD1%FLD,G1I)) then 1 Error: ‘target’ argument of ‘associated’ intrinsic at (1) must be the same type and kind as ‘pointer’ This is the path to the source code of file I am trying to install www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/copygb2.f This is the parent directory www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/ As there is dependency on many other libraries I am not sure how to create a reduced code for this issue. (PS without using -fdefault-real-8 even the dependency library g2 is not getting installed which has -r8 -i4 also had to uses -fno-range-check) without -fno-range-check I get gfortran -c -O3 -g -fdefault-real-8 -J../include/g2_v3.1.0_d addfield.f addfield.f:122:14: allones=Z'FFFFFFFF' 1 Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1). This check can be disabled with the option ‘-fno-range-check’ make: *** [../libg2_v3.1.0_d.a(addfield.o)] Error 1 Source of g2 library is http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/lib/g2/v3.1.0/ Sorry for inconvenience Thanks and Regards, Nachiket On Wed, May 30, 2018 at 5:52 PM, Dominique d'Humières <dominiq@lps.ens.fr> wrote: > > gfortran -c -I../lib/g2_d/ -O -C -fdefault-real-8 -J../copygb2.fd/final/1 > > cpgb.f > > > > cpgb.f:482:72: > > > > & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET) > > > > Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(8) to > > INTEGER(4) > (1) Don’t use -f*-real-8. > (2) Apparently ‘ngdt1’ is a REAL on the caller side and an INTEGER on the > collee one. > > Without a (reduced) code it is extremely difficult to help you. > > Dominique > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-30 12:56 ` nachiket k @ 2018-05-30 13:35 ` Dominique d'Humières 2018-05-31 8:06 ` nachiket k 0 siblings, 1 reply; 13+ messages in thread From: Dominique d'Humières @ 2018-05-30 13:35 UTC (permalink / raw) To: nachiket k; +Cc: gfortran > Le 30 mai 2018 à 14:56, nachiket k <nachiket316@gmail.com> a écrit : > > Hi, > without -fdefault-real-8 > we get following errors > > cpgb.f:446:72: > > & IB1I,L1I,F1I,G1I,IRET) > 1 > Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) You must compile ALL the files in the project without -f*-real-8. > cpgb.f:482:72: > > & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET) > 1 > Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(4) to INTEGER(4) I don’t know where the module GRIDTEMPLATES is defined. AFAICT ‘ngdt1’ is supposed to be an INTEGER (implicitly defined in cpgb.f). CALL INTGRIB2(0,IP,IPOPT,d,… looks suspicious if ‘d’ is not explicitly defined as an INTEGER. > cpgb.f:600:72: > > & IBBI,LBI,FBI,GBI,IRET) > 1 > Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) > cpgb.f:655:8: > > GFLD1%FLD => F1I > 1 > Error: Different types in pointer assignment at (1); attempted assignment of REAL(4) to REAL(8) > cpgb.f:662:10: > > GFLD1%FLD => G1I > 1 > Error: Different types in pointer assignment at (1); attempted assignment of REAL(4) to REAL(8) > cpgb.f:692:31: > > IF (ASSOCIATED(GFLD1%FLD,G1I)) then > 1 > Error: ‘target’ argument of ‘associated’ intrinsic at (1) must be the same type and kind as ‘pointer’ I think all the above errors are due to the use of -f*-real-8 when compiling other files (see above). > This is the path to the source code of file I am trying to install > > www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/copygb2.f > > This is the parent directory > www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/ > > As there is dependency on many other libraries I am not sure how to create a reduced code for this issue. > > (PS without using -fdefault-real-8 even the dependency library g2 is not getting installed which has -r8 -i4 also had to uses > -fno-range-check) > without -fno-range-check > I get > gfortran -c -O3 -g -fdefault-real-8 -J../include/g2_v3.1.0_d addfield.f > addfield.f:122:14: > > allones=Z'FFFFFFFF' > 1 > Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1). This check can be disabled with the option ‘-fno-range-check’ > make: *** [../libg2_v3.1.0_d.a(addfield.o)] Error 1 Not related to -fdefault-real-8. Look at the manual for BOZ behavior in gfortran. > Source of g2 library is > http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/lib/g2/v3.1.0/ > > Sorry for inconvenience > > Thanks and Regards, > Nachiket Dominique ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-30 13:35 ` Dominique d'Humières @ 2018-05-31 8:06 ` nachiket k 2018-05-31 13:34 ` Dominique d'Humières 2018-05-31 15:12 ` Steve Kargl 0 siblings, 2 replies; 13+ messages in thread From: nachiket k @ 2018-05-31 8:06 UTC (permalink / raw) To: Dominique d'Humières; +Cc: gfortran Hi, I removed all the flags I recompiled g2 There is this line in the code integer(4) :: ire00,allones allones=Z'FFFFFFFF' So here overflow error occurs integer(16) to integer(4) I tried allones=Z'FF' and integer(16) :: allones allones=Z'FFFFFFFF' Doing any of these compiles the code -Wall gives following warning In pngpack.f,jpcpack.f real(8) to real(4) rmin4 = rmin this is because of their declaration as real(4) :: rmin4 real(8) :: rmin and intmath.f:212.17: ilog2_1=ilog2_1+4 1 Warning: Possible change of value in conversion from INTEGER(4) to INTEGER(1) at (1) As all of these are warning compilation is completed but in copygb2 I still face issue copygb2.f:1072.35: CALL INTGRIB2(0,IP,IPOPT,d,nopt,opt,KGDSB, 1 Warning: Type mismatch in argument 'ngdt1' at (1); passed REAL(4) to INTEGER(4) copygb2.f:776.20: CALL CPGB1(LG1,LX1,M1, 1 Error: Dummy argument 'kgdti' of procedure 'cpgb1' at (1) has an attribute that requires an explicit interface for this procedure make: *** [copygb2.o] Error 1 Is a lot of source code change needed here ? of is there any flag that can take care of this issue ? On Wed, May 30, 2018 at 7:05 PM, Dominique d'Humières <dominiq@lps.ens.fr> wrote: > > > > Le 30 mai 2018 à 14:56, nachiket k <nachiket316@gmail.com> a écrit : > > > > Hi, > > without -fdefault-real-8 > > we get following errors > > > > cpgb.f:446:72: > > > > & IB1I,L1I,F1I,G1I,IRET) > > 1 > > Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) > > You must compile ALL the files in the project without -f*-real-8. > > > cpgb.f:482:72: > > > > & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET) > > 1 > > Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(4) to > INTEGER(4) > > I don’t know where the module GRIDTEMPLATES is defined. AFAICT ‘ngdt1’ is > supposed to be an INTEGER (implicitly defined in cpgb.f). > > CALL INTGRIB2(0,IP,IPOPT,d,… > > looks suspicious if ‘d’ is not explicitly defined as an INTEGER. > > > cpgb.f:600:72: > > > > & IBBI,LBI,FBI,GBI,IRET) > > 1 > > Error: Type mismatch in argument ‘f1’ at (1); passed REAL(8) to REAL(4) > > cpgb.f:655:8: > > > > GFLD1%FLD => F1I > > 1 > > Error: Different types in pointer assignment at (1); attempted > assignment of REAL(4) to REAL(8) > > cpgb.f:662:10: > > > > GFLD1%FLD => G1I > > 1 > > Error: Different types in pointer assignment at (1); attempted > assignment of REAL(4) to REAL(8) > > cpgb.f:692:31: > > > > IF (ASSOCIATED(GFLD1%FLD,G1I)) then > > 1 > > Error: ‘target’ argument of ‘associated’ intrinsic at (1) must be the > same type and kind as ‘pointer’ > > I think all the above errors are due to the use of -f*-real-8 when > compiling other files (see above). > > > This is the path to the source code of file I am trying to install > > > > www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/ > sorc/copygb2.fd/copygb2.f > > > > This is the parent directory > > www.nco.ncep.noaa.gov/pmb/codes/nwprod/grib_util.v1.0.5/sorc/copygb2.fd/ > > > > As there is dependency on many other libraries I am not sure how to > create a reduced code for this issue. > > > > (PS without using -fdefault-real-8 even the dependency library g2 is not > getting installed which has -r8 -i4 also had to uses > > -fno-range-check) > > without -fno-range-check > > I get > > gfortran -c -O3 -g -fdefault-real-8 -J../include/g2_v3.1.0_d addfield.f > > addfield.f:122:14: > > > > allones=Z'FFFFFFFF' > > 1 > > Error: Arithmetic overflow converting INTEGER(16) to INTEGER(4) at (1). > This check can be disabled with the option ‘-fno-range-check’ > > make: *** [../libg2_v3.1.0_d.a(addfield.o)] Error 1 > > Not related to -fdefault-real-8. Look at the manual for BOZ behavior in > gfortran. > > > Source of g2 library is > > http://www.nco.ncep.noaa.gov/pmb/codes/nwprod/lib/g2/v3.1.0/ > > > > Sorry for inconvenience > > > > Thanks and Regards, > > Nachiket > > Dominique > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-31 8:06 ` nachiket k @ 2018-05-31 13:34 ` Dominique d'Humières 2018-05-31 15:12 ` Steve Kargl 1 sibling, 0 replies; 13+ messages in thread From: Dominique d'Humières @ 2018-05-31 13:34 UTC (permalink / raw) To: nachiket k; +Cc: gfortran As a general comment, the quality of the help you’ll get is directly related to the quality of the information you provide!-( > Le 31 mai 2018 à 09:56, nachiket k <nachiket316@gmail.com> a écrit : > > Hi, > > I removed all the flags > > I recompiled g2 > > There is this line in the code > integer(4) :: ire00,allones > > allones=Z'FFFFFFFF' > > So here overflow error occurs integer(16) to integer(4) > > I tried allones=Z'FF' > and > integer(16) :: allones > allones=Z’FFFFFFFF' You may want to look at https://groups.google.com/forum/#!topic/comp.lang.fortran/u6V7QBvvF6o. > > Doing any of these compiles the code > -Wall gives following warning > > In pngpack.f,jpcpack.f > real(8) to real(4) > rmin4 = rmin > this is because of their declaration as > real(4) :: rmin4 > real(8) :: rmin > > and > > intmath.f:212.17: > > ilog2_1=ilog2_1+4 > 1 > Warning: Possible change of value in conversion from INTEGER(4) to INTEGER(1) at (1) > > As all of these are warning compilation is completed I don’t have the files. > > but in copygb2 I still face issue > > copygb2.f:1072.35: > > CALL INTGRIB2(0,IP,IPOPT,d,nopt,opt,KGDSB, > 1 > Warning: Type mismatch in argument 'ngdt1' at (1); passed REAL(4) to INTEGER(4) My guess is that ‘d’ is not explicitly typed as an integer. I don’t have the files generating the modules!-( You may try to compile the file with -fimplicit-none and look at the errors you get. > copygb2.f:776.20: > > CALL CPGB1(LG1,LX1,M1, > 1 > Error: Dummy argument 'kgdti' of procedure 'cpgb1' at (1) has an attribute that requires an explicit interface for this procedure > make: *** [copygb2.o] Error 1 > > Is a lot of source code change needed here ? of is there any flag that can take care of this issue ? An interface is required with some post F90 constructs such as INTEGER,POINTER :: TMPPTR(:) and friends. Writing the interface might be challenging. An alternative is to move the subroutine after a CONTAINS in the "root" caller. Dominique ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-31 8:06 ` nachiket k 2018-05-31 13:34 ` Dominique d'Humières @ 2018-05-31 15:12 ` Steve Kargl 1 sibling, 0 replies; 13+ messages in thread From: Steve Kargl @ 2018-05-31 15:12 UTC (permalink / raw) To: nachiket k; +Cc: Dominique d'Humières, gfortran On Thu, May 31, 2018 at 01:26:57PM +0530, nachiket k wrote: > > I removed all the flags > At this point, I think you need to contact the author(s) of the code in question and ask for help. The code clearly has a number of bugs and/or vendor-specific extensions. -- Steve ^ permalink raw reply [flat|nested] 13+ messages in thread
* -assume noold_ldout_format for GNU @ 2018-05-28 11:24 nachiket k 2018-05-28 15:38 ` Steve Kargl 0 siblings, 1 reply; 13+ messages in thread From: nachiket k @ 2018-05-28 11:24 UTC (permalink / raw) To: fortran I am trying to compile copygb2. I have intel make file I am struggling to figure out what are the equivalent flags in GNU Do you have any documentation that I can refer ? -assume noold_ldout_format -module $(MODDIR) Currently I need the equivalent flags for above intel flags Thanks, Nachiket ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-28 11:24 nachiket k @ 2018-05-28 15:38 ` Steve Kargl 2018-05-29 6:05 ` nachiket k 0 siblings, 1 reply; 13+ messages in thread From: Steve Kargl @ 2018-05-28 15:38 UTC (permalink / raw) To: nachiket k; +Cc: fortran On Mon, May 28, 2018 at 04:54:14PM +0530, nachiket k wrote: > I am trying to compile copygb2. > I have intel make file I am struggling to figure out what are the > equivalent flags in GNU > > Do you have any documentation that I can refer ? > > -assume noold_ldout_format > -module $(MODDIR) > > Currently I need the equivalent flags for above intel flags > What happens if you simply delete those options? -- Steve ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-28 15:38 ` Steve Kargl @ 2018-05-29 6:05 ` nachiket k 2018-05-29 16:35 ` Steve Kargl 0 siblings, 1 reply; 13+ messages in thread From: nachiket k @ 2018-05-29 6:05 UTC (permalink / raw) To: sgk; +Cc: fortran Hi, copygb2 has dependency on modfiles genereated from library g2 Makefile parameters for g2 were Original for intel DEFS=-DLINUX FC=ftn CC=cc CPP=CC -P MODDIR=../g2/lib/temp/incmod/g2_4 FFLAGS=-O3 -g -assume noold_ldout_format -module $(MODDIR) Changed GNU DEFS=-DLINUX FC=gfortran CC=gcc CPP=cpp -P MODDIR=../lib/incmod/g2_4 FFLAGS=-O3 -g #-freal-4-real-8 -J $(MODDIR) CFLAGS=-O3 -g $(DEFS) $(INCDIR) -D__64BIT__ (I have tried it with various flags just to sure which works here but ultimately copygb2 is still failing) Compilation of g2 was completed without errors. In compilation of copygb2 Original for intel SHELL= /bin/sh CMD= copygb2 FOPTS= -O3 -C -real-size 64 #-qnosave LOPTS= INCS= -I../lib/g2_d OBJS= copygb2.o LIBS= -L../lib -lg2_d -lw3 -lbacio_4 -lip_d -lsp_d -ljasper -lpng -lz -liomp5 -lpthread ################################################################################ $(CMD): $(OBJS) ftn $(LOPTS) $(OBJS) $(LIBS) -o $(CMD) #$(OBJS): $(INCS) copygb2.o: copygb2.f ftn -c $(INCS) $(FOPTS) $*.f clean: -rm -f $(OBJS) Changed for GNU SHELL= /bin/sh CMD= copygb2 FOPTS= -O3 -C -fno-whole-file #-Wimplicit-procedure #-freal-4-real-8 #-freal-4-real-8 #-fdefault-real-8 -ffree-form -fdollar-ok -ffixed-form -fno-whole-file -fopenmp #-qnosave LOPTS= INCS= -I../lib/g2_d OBJS= copygb2.o LIBS= -L../lib -lg2_d -lw3 -lbacio_4 -lip_d -lsp_d -lpng12 -lz -ljasper ################################################################################ $(CMD): $(OBJS) gfortran $(LOPTS) $(OBJS) $(LIBS) -o $(CMD) #$(OBJS): $(INCS) copygb2.o: copygb2.f gfortran -c $(INCS) $(FOPTS) $*.f clean: -rm -f $(OBJS) (Commented flags are some of the ones I tried which did not work ) >gfortran -c -I../lib/g2_d/ -freal-4-real-8 copygb2.f copygb2.f:1074:72: & IBBI,LBI,FBI,GBI,IRET) 1 Warning: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(8) to INTEGER(4) copygb2.f:776:20: CALL CPGB1(LG1,LX1,M1, 1 Error: Explicit interface required for ‘cpgb1’ at (1): target argument I have tried to compile CPGB1 as separate file and rest of copygb as separate file I am able to generate .o files but link time I get lot of undefined references (-I../lib/g2_d did not work ) As I am not sure which source is causing problem I though I should do literal translation of flags from intel to GNU If you have any idea on how to resolve this issue please let me know of link to resource that might help me in this regard Thanks, Nachiket On Mon, May 28, 2018 at 9:08 PM, Steve Kargl < sgk@troutmask.apl.washington.edu> wrote: > On Mon, May 28, 2018 at 04:54:14PM +0530, nachiket k wrote: > > I am trying to compile copygb2. > > I have intel make file I am struggling to figure out what are the > > equivalent flags in GNU > > > > Do you have any documentation that I can refer ? > > > > -assume noold_ldout_format > > -module $(MODDIR) > > > > Currently I need the equivalent flags for above intel flags > > > > What happens if you simply delete those options? > > -- > Steve > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-29 6:05 ` nachiket k @ 2018-05-29 16:35 ` Steve Kargl 2018-05-30 9:55 ` nachiket k 0 siblings, 1 reply; 13+ messages in thread From: Steve Kargl @ 2018-05-29 16:35 UTC (permalink / raw) To: nachiket k; +Cc: fortran On Tue, May 29, 2018 at 11:35:00AM +0530, nachiket k wrote: > Hi, > copygb2 has dependency on modfiles genereated from library g2 > > Makefile parameters for g2 were > > Original for intel > > DEFS=-DLINUX > FC=ftn > CC=cc > CPP=CC -P > MODDIR=../g2/lib/temp/incmod/g2_4 > > FFLAGS=-O3 -g -assume noold_ldout_format -module $(MODDIR) > Remove all options and only add those that are needed. You can remove '-assume noold_ldout_format' as that is an Intel specific loader option. Change -module to -I. -- Steve ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-29 16:35 ` Steve Kargl @ 2018-05-30 9:55 ` nachiket k 2018-05-30 11:43 ` Martin Tee via fortran 0 siblings, 1 reply; 13+ messages in thread From: nachiket k @ 2018-05-30 9:55 UTC (permalink / raw) To: sgk; +Cc: fortran Yes I tried removing all those flags but I am still getting same errors I tried that's why I thought may be it is due to some flags that I am missing Same source has been compiled with intel compilers Is there anything obvious about the error that I am missing ? Is this because of some format mismatch error in source (as error is reported at 72 column copygb2.f:1074:72 ) Is there any flag that I can you so control this kind of behavior ? I have also tried -ffree-line-length-0 -fconvert=swap -freal-4-real-8 -lm -fcheck=all (-static and -ffast-math too just to check) Also what does it mean to make an explicit interface available in the subprogram where this CALL occurs. I copied the subroutine in another file compilation happens with -c to create .o but when I do -o to create exe it gives undefined references PS: I am new to fortran On Tue, May 29, 2018 at 10:05 PM, Steve Kargl < sgk@troutmask.apl.washington.edu> wrote: > On Tue, May 29, 2018 at 11:35:00AM +0530, nachiket k wrote: > > Hi, > > copygb2 has dependency on modfiles genereated from library g2 > > > > Makefile parameters for g2 were > > > > Original for intel > > > > DEFS=-DLINUX > > FC=ftn > > CC=cc > > CPP=CC -P > > MODDIR=../g2/lib/temp/incmod/g2_4 > > > > FFLAGS=-O3 -g -assume noold_ldout_format -module $(MODDIR) > > > > Remove all options and only add those that are needed. > You can remove '-assume noold_ldout_format' as that is > an Intel specific loader option. Change -module to -I. > > -- > Steve > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-30 9:55 ` nachiket k @ 2018-05-30 11:43 ` Martin Tee via fortran 2018-05-30 12:05 ` nachiket k 0 siblings, 1 reply; 13+ messages in thread From: Martin Tee via fortran @ 2018-05-30 11:43 UTC (permalink / raw) To: nachiket k; +Cc: fortran .f files are fixed format? For explicit interface include an interface block or put sub-program in a module and 'USE' the module in the calling procedure. On Wed, 2018-05-30 at 15:25 +0530, nachiket k wrote: > Yes I tried removing all those flags but I am still getting same > errors > I tried that's why I thought may be it is due to some flags that I am > missing > > Same source has been compiled with intel compilers > > Is there anything obvious about the error that I am missing ? > > Is this because of some format mismatch error in source (as error is > reported at 72 column copygb2.f:1074:72 ) > Is there any flag that I can you so control this kind of behavior ? > > I have also tried > -ffree-line-length-0 -fconvert=swap -freal-4-real-8 -lm -fcheck=all > (-static and -ffast-math too just to check) > > Also what does it mean to make an explicit interface available in the > subprogram where this CALL occurs. > I copied the subroutine in another file > compilation happens with -c to create .o > but when I do -o to create exe it gives undefined references > > PS: I am new to fortran > > > > On Tue, May 29, 2018 at 10:05 PM, Steve Kargl < > sgk@troutmask.apl.washington.edu> wrote: > > > On Tue, May 29, 2018 at 11:35:00AM +0530, nachiket k wrote: > > > Hi, > > > copygb2 has dependency on modfiles genereated from library g2 > > > > > > Makefile parameters for g2 were > > > > > > Original for intel > > > > > > DEFS=-DLINUX > > > FC=ftn > > > CC=cc > > > CPP=CC -P > > > MODDIR=../g2/lib/temp/incmod/g2_4 > > > > > > FFLAGS=-O3 -g -assume noold_ldout_format -module $(MODDIR) > > > > > > > Remove all options and only add those that are needed. > > You can remove '-assume noold_ldout_format' as that is > > an Intel specific loader option. Change -module to -I. > > > > -- > > Steve > > ^ permalink raw reply [flat|nested] 13+ messages in thread
* Re: -assume noold_ldout_format for GNU 2018-05-30 11:43 ` Martin Tee via fortran @ 2018-05-30 12:05 ` nachiket k 0 siblings, 0 replies; 13+ messages in thread From: nachiket k @ 2018-05-30 12:05 UTC (permalink / raw) To: Martin Tee; +Cc: fortran Hello, Yes .f is fixed format and there is single file We referred http://people.ds.cam.ac.uk/nmm1/fortran/paper_08.pdf We tried to created module for CPGB1_ (where error is coming) gfortran -c -I../lib/g2_d/ -O -C -fdefault-real-8 -J../copygb2.fd/final/1 cpgb.f cpgb.f:482:72: & KB,IBB,LR,FR,GR,d,KGDTI,MI,IBBI,LBI,FBI,GBI,IRET) 1 Error: Type mismatch in argument ‘ngdt1’ at (1); passed REAL(8) to INTEGER(4) Same error is coming If we compile without module using -c it creates .o file while creating -o executable it gives undefined references Is there a issue with ngdt1 variable ? but as same source code is working with intel compilers I am hesitating to consider source code changes Is there any work around for this issue ? Thanks and Regards, Nachiket On Wed, May 30, 2018 at 4:42 PM, Martin Tee <martintee@btinternet.com> wrote: > .f files are fixed format? > > For explicit interface include an interface block or put sub-program in > a module and 'USE' the module in the calling procedure. > > > On Wed, 2018-05-30 at 15:25 +0530, nachiket k wrote: > > Yes I tried removing all those flags but I am still getting same > > errors > > I tried that's why I thought may be it is due to some flags that I am > > missing > > > > Same source has been compiled with intel compilers > > > > Is there anything obvious about the error that I am missing ? > > > > Is this because of some format mismatch error in source (as error is > > reported at 72 column copygb2.f:1074:72 ) > > Is there any flag that I can you so control this kind of behavior ? > > > > I have also tried > > -ffree-line-length-0 -fconvert=swap -freal-4-real-8 -lm -fcheck=all > > (-static and -ffast-math too just to check) > > > > Also what does it mean to make an explicit interface available in the > > subprogram where this CALL occurs. > > I copied the subroutine in another file > > compilation happens with -c to create .o > > but when I do -o to create exe it gives undefined references > > > > PS: I am new to fortran > > > > > > > > On Tue, May 29, 2018 at 10:05 PM, Steve Kargl < > > sgk@troutmask.apl.washington.edu> wrote: > > > > > On Tue, May 29, 2018 at 11:35:00AM +0530, nachiket k wrote: > > > > Hi, > > > > copygb2 has dependency on modfiles genereated from library g2 > > > > > > > > Makefile parameters for g2 were > > > > > > > > Original for intel > > > > > > > > DEFS=-DLINUX > > > > FC=ftn > > > > CC=cc > > > > CPP=CC -P > > > > MODDIR=../g2/lib/temp/incmod/g2_4 > > > > > > > > FFLAGS=-O3 -g -assume noold_ldout_format -module $(MODDIR) > > > > > > > > > > Remove all options and only add those that are needed. > > > You can remove '-assume noold_ldout_format' as that is > > > an Intel specific loader option. Change -module to -I. > > > > > > -- > > > Steve > > > > ^ permalink raw reply [flat|nested] 13+ messages in thread
end of thread, other threads:[~2018-05-31 15:12 UTC | newest] Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2018-05-30 12:23 -assume noold_ldout_format for GNU Dominique d'Humières 2018-05-30 12:56 ` nachiket k 2018-05-30 13:35 ` Dominique d'Humières 2018-05-31 8:06 ` nachiket k 2018-05-31 13:34 ` Dominique d'Humières 2018-05-31 15:12 ` Steve Kargl -- strict thread matches above, loose matches on Subject: below -- 2018-05-28 11:24 nachiket k 2018-05-28 15:38 ` Steve Kargl 2018-05-29 6:05 ` nachiket k 2018-05-29 16:35 ` Steve Kargl 2018-05-30 9:55 ` nachiket k 2018-05-30 11:43 ` Martin Tee via fortran 2018-05-30 12:05 ` nachiket k
This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).