-assume noold_ldout_format for GNU

nachiket k nachiket316@gmail.com
Tue May 29 06:05:00 GMT 2018


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
>



More information about the Fortran mailing list