Invalid character errors (Solved)

Discussion about building and installing Elmer
Post Reply
Gary R
Posts: 108
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Invalid character errors (Solved)

Post 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
Last edited by Gary R on 04 Apr 2020, 21:25, edited 1 time in total.
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Invalid character errors

Post by kevinarden »

I just compiled on a Debian machine yesterday, which fortran compiler are you using?
Gary R
Posts: 108
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Invalid character errors

Post by Gary R »

Thanks for the reply. I'm using gfortran-7.

Gary R
kevinarden
Posts: 1210
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Invalid character errors

Post 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
Gary R
Posts: 108
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Invalid character errors(solved)

Post 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
ceanwang
Posts: 14
Joined: 20 Mar 2021, 02:09
Antispam: Yes

Re: Invalid character errors (Solved)

Post 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.
raback
Site Admin
Posts: 4173
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Invalid character errors (Solved)

Post 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
Post Reply