Page 1 of 1

Invalid character errors (Solved)

Posted: 03 Apr 2020, 00:52
by Gary R
I downloaded the latest version of Elmerfem-dev from the Git repository and am trying to compile and link. I have stripped out all of the "With" statements using CMakeGUI. I then configured and generated the "MakeFile" with no errors. I then ran "make -j4" and got the following errors.

Code: Select all

/opt/elmerfem/elmerfem/fem/src/Types.F90:218:12:

     INTEGER, POINTER CONTIG :: Rows(:)=>NULL(),Cols(:)=>NULL(), Diag(:)=>NULL()
            1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:220:18:

     REAL(KIND=dp), POINTER CONTIG :: RHS(:)=>NULL(),BulkRHS(:)=>NULL(),RHS_im(:)=>NULL(),Force(:,:)=>NULL()
                  1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:221:18:

     REAL(KIND=dp), POINTER CONTIG :: BulkResidual(:)=>NULL()
                  1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:223:18:

     REAL(KIND=dp),  POINTER CONTIG :: Values(:)=>NULL(), ILUValues(:)=>NULL(), &
                  1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:228:18:

     REAL(KIND=dp),  POINTER CONTIG :: MassValues(:)=>NULL(),DampValues(:)=>NULL(), &
                  1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:265:12:

     INTEGER, POINTER CONTIG :: ILURows(:)=>NULL(),ILUCols(:)=>NULL(),ILUDiag(:)=>NULL()
            1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:350:19:

      REAL(KIND=dp), POINTER CONTIG :: &
                   1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:693:13:

      INTEGER, DIMENSION(:), POINTER CONTIG :: &
             1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:729:19:

      REAL(KIND=dp), POINTER CONTIG :: x(:)=>NULL()
                   1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:730:19:

      REAL(KIND=dp), POINTER CONTIG :: y(:)=>NULL()
                   1
Error: Invalid character in name at (1)
/opt/elmerfem/elmerfem/fem/src/Types.F90:731:19:

      REAL(KIND=dp), POINTER CONTIG :: z(:)=>NULL()
                   1
Error: Invalid character in name at (1)
fem/src/CMakeFiles/elmersolver.dir/build.make:758: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/Types.F90.o' failed
make[3]: *** [fem/src/CMakeFiles/elmersolver.dir/Types.F90.o] Error 1
fem/src/CMakeFiles/elmersolver.dir/build.make:774: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/Types.F90.o.provides' failed
make[2]: *** [fem/src/CMakeFiles/elmersolver.dir/Types.F90.o.provides] Error 2
CMakeFiles/Makefile2:737: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/all' failed
make[1]: *** [fem/src/CMakeFiles/elmersolver.dir/all] Error 2
Makefile:162: recipe for target 'all' failed
make: *** [all] Error 2


Is this a bug in the source code or am I screwing up somewhere?

OS Debian Buster Host, QEMU/KVM virtual machine and Kubuntu 18.04 Guest
AMD - 64 with 4 processors

Any help will be sincerely appreciated.

Gary R

Re: Invalid character errors

Posted: 03 Apr 2020, 11:13
by kevinarden
I just compiled on a Debian machine yesterday, which fortran compiler are you using?

Re: Invalid character errors

Posted: 03 Apr 2020, 18:26
by Gary R
Thanks for the reply. I'm using gfortran-7.

Gary R

Re: Invalid character errors

Posted: 04 Apr 2020, 12:21
by kevinarden
Mine was gfortran 8, it looks like a compiler issue, but I would think gfortran 7 should have worked.

viewtopic.php?f=2&t=7018&p=22393&hilit=debian#p22393

Re: Invalid character errors(solved)

Posted: 04 Apr 2020, 21:23
by Gary R
Thanks for the reply's.
I solved the problem by completely stripping out the software and downloading a new zip file. This installation no longer has the problem. I must have gotten a transfer error. Seems to be a good reason for using check sums, although I am too lazy to do so most of the time. So on to the next problem.

Thanks again.
Gary R

Re: Invalid character errors (Solved)

Posted: 03 Apr 2021, 06:43
by ceanwang
I also got this error. Using gfortran 8.1 under WIndows 10.

ref this:
https://www.ibm.com/docs/en/xl-fortran- ... rtran-2008

Code: Select all

INTEGER, CONTIGUOUS, POINTER :: ap(:)
Changed all CONTIG to CONTIGUOUS and added , between CONTIGUOUS and POINTER or DIMENSION, then can keep compiling.

Re: Invalid character errors (Solved)

Posted: 20 Apr 2021, 00:25
by raback
Hi

The reason here is that "CONTIGUOUS" basically helps the compiler to write faster code. Unfortunately not all Fortran compilers implement this feature of Fortran2008 standard. So the "CONTIG" may be replaced by either nothing or "CONTIGUOUS" depending on platform.

-Peter