Compiler flags for compiling FEM2DLiB with g95 and/or gfortran 
Author Message
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Please can someone shed some light on the command line options to use
when compiling FEM2DLiB with either g95 or gfortran. Alternatively, a
project makefile or compiled library will also be of help.

Thank you.

H I SALEH



Sun, 21 Aug 2011 17:11:52 GMT  
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Quote:

> Please can someone shed some light on the command line options to use
> when compiling FEM2DLiB with either g95 or gfortran. Alternatively, a
> project makefile or compiled library will also be of help.

What's wrong with a "typical" set of flags (i.e. your defaults for an
optimized build)?  Are there specific build/run errors?


Mon, 22 Aug 2011 05:13:37 GMT  
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Quote:

> > Please can someone shed some light on the command line options to use
> > when compilingFEM2DLiBwith either g95 or gfortran. Alternatively, a
> > project makefile or compiled library will also be of help.

> What's wrong with a "typical" set of flags (i.e. your defaults for an
> optimized build)? ?Are there specific build/run errors?

When I compile with typical flags, I get tons of error messages.
Specifically when I type

 gfortran -c fem2dlib_dbl.f90 -o fem2dlib_dbl.mod

I get the following errors,

MEMALLOC_DBL.F90:998.132:
    Included at fem2dlib_dbl.f90:51:

%BCType,TmpBC%Value,TmpBC%CauchyVal,TmpBC%ts,TmpBC%GP,TmpBC
%NNodes,TmpBC%No

1
Error: 'no' at (1) is not a member of the 'boundcond' structure
MEMALLOC_DBL.F90:998.132:
    Included at fem2dlib_dbl.f90:51:

%BCType,TmpBC%Value,TmpBC%CauchyVal,TmpBC%ts,TmpBC%GP,TmpBC
%NNodes,TmpBC%No

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1366.132:
    Included at fem2dlib_dbl.f90:51:

NElements)=msh%Nodes(i)%ElmntsId(1:msh%nodes(i)
%NElements)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1687.132:
    Included at fem2dlib_dbl.f90:51:

)%NTFXY)=msh%Elements(i)%FXYDefId(1:TempElmnts(i)
%NTFXY)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1694.132:
    Included at fem2dlib_dbl.f90:51:

%NTFT)=msh%Elements(i)%FTDefId(1:TempElmnts(i)
%NTFT)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1729.132:
    Included at fem2dlib_dbl.f90:51:

(i)%NTFXY)=TempElmnts(i)%FXYDefId(1:TempElmnts(i)
%NTFXY)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1736.132:
    Included at fem2dlib_dbl.f90:51:

i)%NTFT)=TempElmnts(i)%FTDefId(1:TempElmnts(i)
%NTFT)

1
Warning: Line truncated at (1)
WRKSPC_DBL.F90:948.26:
    Included at fem2dlib_dbl.f90:59:

                    elseif (Any(ActiveBCs(i)%NodesID(1:ActiveBCs(i)
%NNodes).ne.
                          1
Error: Unexpected junk after ELSE statement at (1)
WRKSPC_DBL.F90:948.132:
    Included at fem2dlib_dbl.f90:59:

tiveBCs(i)%NNodes).ne.OldActiveBCs(i)%NodesID(1:OldActiveBCs(i)
%NNodes))) t

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:23.27:
    Included at fem2dlib_dbl.f90:63:

        character filename*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
PDFUTILS_DBL.f90:358.27:
    Included at fem2dlib_dbl.f90:63:

        character filename*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
PDFUTILS_DBL.f90:431.114:
    Included at fem2dlib_dbl.f90:63:

5,f15.5))',unit=un,err=100) (WS%Mesh%Properties(i)%NodeProperties(j)
%NodeID,WS%

1
Error: Expected a right parenthesis in expression at (1)
PDFUTILS_DBL.f90:431.132:
    Included at fem2dlib_dbl.f90:63:

,err=100) (WS%Mesh%Properties(i)%NodeProperties(j)%NodeID,WS%Mesh
%Propertie

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:432.70:
    Included at fem2dlib_dbl.f90:63:

                                                                   min
(k+2,WS%M

1
Error: 'min' at (1) is not a variable
PDFUTILS_DBL.f90:508.132:
    Included at fem2dlib_dbl.f90:63:

rr=100) WS%Mesh%elements(i)%ID, WS%Mesh%elements(i)%ElmType, WS%Mesh
%elemen

1
Error: 'elemen' at (1) is not a member of the 'mesh' structure
PDFUTILS_DBL.f90:508.132:
    Included at fem2dlib_dbl.f90:63:

rr=100) WS%Mesh%elements(i)%ID, WS%Mesh%elements(i)%ElmType, WS%Mesh
%elemen

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:509.50:
    Included at fem2dlib_dbl.f90:63:

                                                  WS%Mesh%elements(i)
%GP
                                                  1
Error: Unclassifiable statement at (1)
PDFUTILS_DBL.f90:523.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Alpha

1
Error: 'alpha' at (1) is not a member of the 'element' structure
PDFUTILS_DBL.f90:523.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Alpha

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:525.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Lambd

1
Error: 'lambd' at (1) is not a member of the 'element' structure
PDFUTILS_DBL.f90:525.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Lambd

1
Warning: Line truncated at (1)
ERRORHNDL_DBL.f90:26.27:
    Included at fem2dlib_dbl.f90:65:

        character SSubName*STR_SIZE,SubName*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
ERRORHNDL_DBL.f90:30.18:
    Included at fem2dlib_dbl.f90:65:

        character*STR_SIZE,optional::SVal1,SVal2
                  1
Error: Syntax error in character length specification at (1)
ERRORHNDL_DBL.f90:40.26:
    Included at fem2dlib_dbl.f90:65:

        SubName=SSubName(1:index(SSubName,' '))
                          1
Error: Syntax error in argument list at (1)
ERRORHNDL_DBL.f90:161.132:
    Included at fem2dlib_dbl.f90:65:

ient allocated space for number of forcing funtion definitions. Elmnt
ID:',

1
Error: Expected expression in PRINT statement at (1)
ERRORHNDL_DBL.f90:161.132:
    Included at fem2dlib_dbl.f90:65:

ient allocated space for number of forcing funtion definitions. Elmnt
ID:',

1
Warning: Line truncated at (1)
ERRORHNDL_DBL.f90:14.51:
    Included at fem2dlib_dbl.f90:65:

    Subroutine PrintErrorMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVa
                                                   1
Error: Symbol 'ssubname' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:14.93:
    Included at fem2dlib_dbl.f90:65:

ntErrorMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVal1,DVal2,SVal1,SVa

1
Error: Symbol 'sval1' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:14.99:
    Included at fem2dlib_dbl.f90:65:

rMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVal1,DVal2,SVal1,SVal2)

1
Error: Symbol 'sval2' at (1) has no IMPLICIT type
PDFUTILS_DBL.f90:17.59:
    Included at fem2dlib_dbl.f90:63:

    Subroutine ReadWorkspaceFile(errorflag,WS,WsId,filename)
                                                           1
Error: Symbol 'filename' at (1) has no IMPLICIT type
PDFUTILS_DBL.f90:352.55:
    Included at fem2dlib_dbl.f90:63:

    Subroutine WriteWorkspaceFile(errorflag,WS,filename)
                                                       1
Error: Symbol 'filename' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:39.15:
    Included at fem2dlib_dbl.f90:65:

        SubName=' '
               1
Error: Symbol 'subname' at (1) has no IMPLICIT type
GENUTILS_DBL.F90:302.53:
    Included at fem2dlib_dbl.f90:61:

                    call PrintErrorMessage
(ErrorFlag,'MakeElmntIdsTable ',TmpEl
                                                     1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:309.53:
    Included at fem2dlib_dbl.f90:61:

                    call PrintErrorMessage
(ErrorFlag,'MakeElmntIdsTable ',TmpEl
                                                     1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:329.65:
    Included at fem2dlib_dbl.f90:61:

                                call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsT
                                                                 1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:340.65:
    Included at fem2dlib_dbl.f90:61:

                                call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsT
                                                                 1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:358.61:
    Included at fem2dlib_dbl.f90:61:

                            call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsTable
                                                             1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
Fatal Error: Error count reached limit of 25.
gfortran: Internal error: Aborted (program f951)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.

Please I will appreciate pointers on resolving this problem.

Thank you.



Tue, 23 Aug 2011 17:07:38 GMT  
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Quote:

> > Please can someone shed some light on the command line options to use
> > when compilingFEM2DLiBwith either g95 or gfortran. Alternatively, a
> > project makefile or compiled library will also be of help.

> What's wrong with a "typical" set of flags (i.e. your defaults for an
> optimized build)? ?Are there specific build/run errors?

A compile with typical flags generate errors.  When I do

 gfortran -c fem2dlib_dbl.f90 -o fem2dlib_dbl.mod

I get the following errors

MEMALLOC_DBL.F90:998.132:
    Included at fem2dlib_dbl.f90:51:

%BCType,TmpBC%Value,TmpBC%CauchyVal,TmpBC%ts,TmpBC%GP,TmpBC
%NNodes,TmpBC%No

1
Error: 'no' at (1) is not a member of the 'boundcond' structure
MEMALLOC_DBL.F90:998.132:
    Included at fem2dlib_dbl.f90:51:

%BCType,TmpBC%Value,TmpBC%CauchyVal,TmpBC%ts,TmpBC%GP,TmpBC
%NNodes,TmpBC%No

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1366.132:
    Included at fem2dlib_dbl.f90:51:

NElements)=msh%Nodes(i)%ElmntsId(1:msh%nodes(i)
%NElements)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1687.132:
    Included at fem2dlib_dbl.f90:51:

)%NTFXY)=msh%Elements(i)%FXYDefId(1:TempElmnts(i)
%NTFXY)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1694.132:
    Included at fem2dlib_dbl.f90:51:

%NTFT)=msh%Elements(i)%FTDefId(1:TempElmnts(i)
%NTFT)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1729.132:
    Included at fem2dlib_dbl.f90:51:

(i)%NTFXY)=TempElmnts(i)%FXYDefId(1:TempElmnts(i)
%NTFXY)

1
Warning: Line truncated at (1)
MEMALLOC_DBL.F90:1736.132:
    Included at fem2dlib_dbl.f90:51:

i)%NTFT)=TempElmnts(i)%FTDefId(1:TempElmnts(i)
%NTFT)

1
Warning: Line truncated at (1)
WRKSPC_DBL.F90:948.26:
    Included at fem2dlib_dbl.f90:59:

                    elseif (Any(ActiveBCs(i)%NodesID(1:ActiveBCs(i)
%NNodes).ne.
                          1
Error: Unexpected junk after ELSE statement at (1)
WRKSPC_DBL.F90:948.132:
    Included at fem2dlib_dbl.f90:59:

tiveBCs(i)%NNodes).ne.OldActiveBCs(i)%NodesID(1:OldActiveBCs(i)
%NNodes))) t

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:23.27:
    Included at fem2dlib_dbl.f90:63:

        character filename*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
PDFUTILS_DBL.f90:358.27:
    Included at fem2dlib_dbl.f90:63:

        character filename*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
PDFUTILS_DBL.f90:431.114:
    Included at fem2dlib_dbl.f90:63:

5,f15.5))',unit=un,err=100) (WS%Mesh%Properties(i)%NodeProperties(j)
%NodeID,WS%

1
Error: Expected a right parenthesis in expression at (1)
PDFUTILS_DBL.f90:431.132:
    Included at fem2dlib_dbl.f90:63:

,err=100) (WS%Mesh%Properties(i)%NodeProperties(j)%NodeID,WS%Mesh
%Propertie

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:432.70:
    Included at fem2dlib_dbl.f90:63:

                                                                   min
(k+2,WS%M

1
Error: 'min' at (1) is not a variable
PDFUTILS_DBL.f90:508.132:
    Included at fem2dlib_dbl.f90:63:

rr=100) WS%Mesh%elements(i)%ID, WS%Mesh%elements(i)%ElmType, WS%Mesh
%elemen

1
Error: 'elemen' at (1) is not a member of the 'mesh' structure
PDFUTILS_DBL.f90:508.132:
    Included at fem2dlib_dbl.f90:63:

rr=100) WS%Mesh%elements(i)%ID, WS%Mesh%elements(i)%ElmType, WS%Mesh
%elemen

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:509.50:
    Included at fem2dlib_dbl.f90:63:

                                                  WS%Mesh%elements(i)
%GP
                                                  1
Error: Unclassifiable statement at (1)
PDFUTILS_DBL.f90:523.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Alpha

1
Error: 'alpha' at (1) is not a member of the 'element' structure
PDFUTILS_DBL.f90:523.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Alpha

1
Warning: Line truncated at (1)
PDFUTILS_DBL.f90:525.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Lambd

1
Error: 'lambd' at (1) is not a member of the 'element' structure
PDFUTILS_DBL.f90:525.132:
    Included at fem2dlib_dbl.f90:63:

 write(fmt='(i5)',unit=un,advance='NO',err=100) WS%Mesh%elements(i) %
Lambd

1
Warning: Line truncated at (1)
ERRORHNDL_DBL.f90:26.27:
    Included at fem2dlib_dbl.f90:65:

        character SSubName*STR_SIZE,SubName*STR_SIZE
                           1
Error: Syntax error in character length specification at (1)
ERRORHNDL_DBL.f90:30.18:
    Included at fem2dlib_dbl.f90:65:

        character*STR_SIZE,optional::SVal1,SVal2
                  1
Error: Syntax error in character length specification at (1)
ERRORHNDL_DBL.f90:40.26:
    Included at fem2dlib_dbl.f90:65:

        SubName=SSubName(1:index(SSubName,' '))
                          1
Error: Syntax error in argument list at (1)
ERRORHNDL_DBL.f90:161.132:
    Included at fem2dlib_dbl.f90:65:

ient allocated space for number of forcing funtion definitions. Elmnt
ID:',

1
Error: Expected expression in PRINT statement at (1)
ERRORHNDL_DBL.f90:161.132:
    Included at fem2dlib_dbl.f90:65:

ient allocated space for number of forcing funtion definitions. Elmnt
ID:',

1
Warning: Line truncated at (1)
ERRORHNDL_DBL.f90:14.51:
    Included at fem2dlib_dbl.f90:65:

    Subroutine PrintErrorMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVa
                                                   1
Error: Symbol 'ssubname' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:14.93:
    Included at fem2dlib_dbl.f90:65:

ntErrorMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVal1,DVal2,SVal1,SVa

1
Error: Symbol 'sval1' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:14.99:
    Included at fem2dlib_dbl.f90:65:

rMessage
(ErrorFlag,SSubName,IVal1,IVal2,Rval1,Rval2,DVal1,DVal2,SVal1,SVal2)

1
Error: Symbol 'sval2' at (1) has no IMPLICIT type
PDFUTILS_DBL.f90:17.59:
    Included at fem2dlib_dbl.f90:63:

    Subroutine ReadWorkspaceFile(errorflag,WS,WsId,filename)
                                                           1
Error: Symbol 'filename' at (1) has no IMPLICIT type
PDFUTILS_DBL.f90:352.55:
    Included at fem2dlib_dbl.f90:63:

    Subroutine WriteWorkspaceFile(errorflag,WS,filename)
                                                       1
Error: Symbol 'filename' at (1) has no IMPLICIT type
ERRORHNDL_DBL.f90:39.15:
    Included at fem2dlib_dbl.f90:65:

        SubName=' '
               1
Error: Symbol 'subname' at (1) has no IMPLICIT type
GENUTILS_DBL.F90:302.53:
    Included at fem2dlib_dbl.f90:61:

                    call PrintErrorMessage
(ErrorFlag,'MakeElmntIdsTable ',TmpEl
                                                     1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:309.53:
    Included at fem2dlib_dbl.f90:61:

                    call PrintErrorMessage
(ErrorFlag,'MakeElmntIdsTable ',TmpEl
                                                     1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:329.65:
    Included at fem2dlib_dbl.f90:61:

                                call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsT
                                                                 1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:340.65:
    Included at fem2dlib_dbl.f90:61:

                                call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsT
                                                                 1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
GENUTILS_DBL.F90:358.61:
    Included at fem2dlib_dbl.f90:61:

                            call PrintErrorMessage
(ErrorFlag,'MakeElmntIDsTable
                                                             1
Error: Type mismatch in argument 'ssubname' at (1); passed CHARACTER
(1) to UNKNOWN
Fatal Error: Error count reached limit of 25.
gfortran: Internal error: Aborted (program f951)
Please submit a full bug report.
See <http://gcc.gnu.org/bugs.html> for instructions.



Tue, 23 Aug 2011 17:26:52 GMT  
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Quote:

> I get the following errors,
...
> Warning: Line truncated at (1)

Sounds suspiciously to me as though the code has source code lines
longer than allowed by the standard. That would indeed be likely to
result in an awful lot of errors.

--
Richard Maine                    | Good judgment comes from experience;
email: last name at domain . net | experience comes from bad judgment.
domain: summertriangle           |  -- Mark Twain



Wed, 24 Aug 2011 00:57:31 GMT  
 Compiler flags for compiling FEM2DLiB with g95 and/or gfortran

Quote:


>> I get the following errors,
> ...
>> Warning: Line truncated at (1)

> Sounds suspiciously to me as though the code has source code lines
> longer than allowed by the standard. That would indeed be likely to
> result in an awful lot of errors.

I would suggest R'ing TFM, as I vaguely remember that there may be a
gfortran option to allow longer source lines (assuming that it's not
practical to modify the library to make it standard-conforming).


Wed, 24 Aug 2011 03:27:21 GMT  
 
 [ 6 post ] 

 Relevant Pages 

1. compiler flags for gfortran on Intel Xeon 64-bit wkstation

2. automatic arrays with negative size in g95 and gfortran

3. Common statement does not work with gfortran, but g95 gives the correct answer

4. gfortran or g95

5. gfortran vs. g95

6. difference between g95 and gfortran

7. g95 AND gfortran problem ONLY on PPC OSX Tiger

8. problem with very small numbers - g95 versus gfortran

9. gfortran, g95, and dual-core

10. g95 versus gfortran

11. Gfortran 2 years behind G95 and still not ready for prime time

12. Vector instruction support in G95 or Gfortran?

 

 
Powered by phpBB® Forum Software