Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error while running examples #15

Open
fede-boinc opened this issue Jan 16, 2020 · 28 comments
Open

Error while running examples #15

fede-boinc opened this issue Jan 16, 2020 · 28 comments

Comments

@fede-boinc
Copy link

Hi everybody,
I am at the very beginning in using nastran-95 on my Ubuntu system, so I thought starting from the provided examples could be a good idea.
The problem is that I can not run successfully even the examples included in the installation folder!

Am I doing anything wrong?
What I did is:
install the nastran package with "sudo apt install nastran", then go to the examples directory "/usr/share/doc/nastran/examples", chose one random example like "d01011a.inp.gz", extract it to a generic folder and run from the terminal "nastran d01011a.inp" in that folder.

I got some output files but they are always containing a bunch of string like those. Does anybody knows how to run at least the provided examples?

0*** USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
****SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0

@JuanP74
Copy link

JuanP74 commented Jan 23, 2020

It works fine for me. Could you provide some more details about output files and error?

@fede-boinc
Copy link
Author

This is the complete output file that i obtain from running in the terminal "nastran d01011a.inp"
the output file is named "d01011a.inp.out".

_ NASTRAN FILES=NPTP

                              ****
                            *      *
                           *        *
                           *  N A S T R A N
                           *        *
                            *      *
                              ****


                        INTEL COMPUTER SYSTEMS   
                             LINUX VERSION 

                      SYSTEM RELEASE -  1995 ED.

                            DISTRIBUTED BY

     COMPUTER SOFTWARE MANAGEMENT AND INFORMATION CENTER (COSMIC)
             UNIVERSITY OF GEORGIA, ATHENS, GEORGIA 30602
             PHONE: (706)542-3265      FAX: (706)542-4807

1 / 95 INTEL LINUX NASTRAN / JAN 27, 20 / PAGE 2

0

                     INSTALLATION CENTER USER INFORMATION GIVEN IN THIS SECTION                      
                                                                                                     
                                 *********************************************                       
                                 *                                           *                       
                                 *  PLEASE READ THE COMMENT IN DEMO PROBLEM  *                       
                                 *  D01002A ABOUT SYSTEM TIMING CONSTANTS    *                       
                                 *                                           *                       
                                 *********************************************                       
                                                                                                     
                     ===X=    TOP OF PAGE REQUEST IF 'X' IS REPLACED BY '='                          

1 / 95 INTEL LINUX NASTRAN / JAN 27, 20 / PAGE 3

0
0*** USER INFORMATION MESSAGE 225, GINO TIME CONSTANTS ARE BEING COMPUTED
(SEE NASINFO FILE FOR ELIMINATION OF THESE COMPUTATIONS)
1 / 95 INTEL LINUX NASTRAN / JAN 27, 20 / PAGE 4

0 N A S T R A N E X E C U T I V E C O N T R O L D E C K E C H O
0

 ID    D01011A,NASTRAN                                                           
 CHKPNT   YES                                                                    
 DIAG 15                                                                         
 APP      DISPLACEMENT                                                           
 SOL      1,1                                                                    
 TIME     15                                                                     
 CEND                                                                            

0*** USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
*SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
0
USER FATAL MESSAGE 8020, SYNTAX ERROR NEAR COLUMN 16 IN THE FOLLOWING CARD-
****SBST 1, 3
0 1 2 3 4 5 6 7 8
1 0 0 0 0 0 0 0 0
ERRTRC CALLED
NAME=WRTMSG
IVAL= 100

                                    * * * END OF JOB * * *

1
JOB TITLE =
DATE: 1/27/20
END TIME: 12:19:43
TOTAL WALL CLOCK TIME 0 SEC.
_

@JuanP74
Copy link

JuanP74 commented Jan 28, 2020

It is likely that either your installation or unzipped file went corrupt...I cannot reproduce your output. Even the USER FATAL MESSAGE 8020 is not found in MSSG.TXT, but it might be outdated compared to the system. I have attached what you should get in a zip file. I modified the output file extension to f06 (MSC/NASTRAN standard).
d01011a.zip

@fede-boinc
Copy link
Author

It appears that the problem is with the version 19.10 of Ubuntu.... I have tried it on a machine with installed Ubuntu 16.04 and it worked fine.
I leave this comment to help other users with useful information, I have no technical skills to even figure out what kind of problem it is

@AeroDME
Copy link

AeroDME commented Jan 30, 2020 via email

@fede-boinc
Copy link
Author

I did nothing more than:
1-"sudo apt install nastran"

then i saved d01011a.inp on a usb drive and run in that folder
"nastran d01011a.inp"

On 16.04 it worked fine, on 19.10 i got that errors

@JuanP74
Copy link

JuanP74 commented Jan 30, 2020

Good to now. I tested it on Ubuntu 18.04 LTS (32bit), Ubuntu 18.04.2 LTS (64bit), freeBSD 12.0 and even the Ubuntu App for Windows 10. All of them work.

@AeroDME
Copy link

AeroDME commented Feb 2, 2020 via email

@Bruno02468
Copy link

Bruno02468 commented Jun 12, 2020

Ran into this exact same issue at work. The proposed solution (switching distro) isn't exactly necessary... I think it's a libgfortran issue. By switching to an older Ubuntu release, I think you're actually forcing yourselves to use an older version of libgfortran by default.

I think not many people are getting this issue yet because most distros aren't using the latest gcc build, but I think it'll be more common with time if my theory is correct.

Maybe NASTRAN relies on some undefined behavior on gfortran's part, I don't. Just know that you don't have to switch distros, just compile an older gfortran from source or get it from package archives.

This is "solved" apparently, but I'd really like to know what makes NASTRAN incompatible with newer gfortran releases. Should we compile a table of compatible gcc releases for now?

  • 7.5.0 known not to produce this issue
  • 10.1.0 know to produce this issue

@AeroDME
Copy link

AeroDME commented Jun 12, 2020 via email

@Bruno02468
Copy link

Bruno02468 commented Jun 15, 2020

I'm using the makefile from this repo, which contains all the flags you mentioned, and also had to use -fallow-invalid-boz in order for it to compile, so it can't be those flags.

The only way we could get rid of this error was by using a much older release of gcc/gfortran. It would be desirable to find a way round this, as changes in ABIs could make it actually impossible to run them on newer kernel releases (just like you can't run GCC 4 anymore because 5 included a C++ ABI change, so kernels compiled with GCC 5+ can't run GCC 4). Being stuck with older GCC releases is a ticking time bomb.

@gah4
Copy link

gah4 commented Jun 23, 2020

Following this on comp.lang.fortran, I suspect that the problem is '\r'
(carriage return) characters in input files.

They are usual for Windows input, and not for Unix/Linux. If they come through
to the input routine, they will be invalid characters. It might be that libgfortran
changed its input processing.

Otherwise: tr -d '\r' < infile > outfile

will remove them, though usually not overwriting infile.

@gah4
Copy link

gah4 commented Jun 23, 2020

It seems that in addition to reading the specified input file, it also reads other files.

There are files in the um and rf directories that have ****SBST in them, and also have '\r'
in them.

@ghost
Copy link

ghost commented Jul 5, 2020

rf/DISP1 has this line:
****SBST 1, 3

@gah4
Copy link

gah4 commented Jul 5, 2020

and '\r' in column 16?

@ghost
Copy link

ghost commented Jul 5, 2020

3(0x33) is at location 16, after that, it is 0x0d (CR) and 0x0a(LF)

This message is print out in mis/xrgdev.f file.

` SUBROUTINE XRGDEV

C PURPOSE - XRGDEV PROCESSES A FIELD FROM A ****CARD, ****FILE,

C ****SBST, OR A ****RFMT CARD FROM THE RIGID FORMAT

C DATA BASE`

...

` WRITE (NOUT,10) UFM,K,RECORD,J,(I,I=1,8),IERROR,(J,I=1,8)

10 FORMAT (A23,' 8020, SYNTAX ERROR NEAR COLUMN ',I3,' IN THE FOLLOWING CARD-',/20X,20A4, /,(20X,I1,I9,7I10))`

@gah4
Copy link

gah4 commented Jul 7, 2020

Actually, closer to:

****SBST 1, 3

It looks like the 3 is in column 16, but maybe it counts wrong.

In any case, the files do have '\r' in them.

@ghost
Copy link

ghost commented Jul 8, 2020

Under windows 10, I use NotePad++'s Eidt/EOL Conversion to switch the file between Windows/Unix style. But still the problem could not be solved.

@gah4
Copy link

gah4 commented Jul 8, 2020

Which file did you change? There are a lot of them.

rf/AERO10
rf/AERO11
rf/AERO9
rf/DISP0
rf/DISP1
rf/DISP10
rf/DISP11
rf/DISP12
rf/DISP13
rf/DISP14
rf/DISP15
rf/DISP16
rf/DISP17
rf/DISP18
rf/DISP19
rf/DISP2
rf/DISP3
rf/DISP4
rf/DISP5
rf/DISP6
rf/DISP7
rf/DISP8
rf/DISP9
rf/HEAT1
rf/HEAT3
rf/HEAT9
um/RFMT.TXT

@ghost
Copy link

ghost commented Jul 8, 2020

I changed all.
um/RFMT.TXT is user manual. Should be all right.

Maybe need to change it into full 80 character a line.

@gah4
Copy link

gah4 commented Jul 8, 2020

This was posted to the comp.lang.fortran newsgroup, which is where I found out about it,
and suggested someone to put a line like:

  WRITE(NOUT,*)  ISTATE, ITYPE, ICHAR(K)

after the WRITE statement at line 81 in xrgdev.f

This prints out a little more of the context at the time of the error.

It doesn't seem like anyone ever tried it.

@ghost
Copy link

ghost commented Jul 8, 2020

I tried to add that line. When building, there is an error:
ar: lib/libnas.a: Malformed archive

I have to delete libnas.a first, then build. But it seems there is no change in the output F06 file.

Then I noticed xrgdev goes into lib/libnasmis.a, So I delete all the libs, then build.

After this, the F06 file doesn't have 'USER FATAL MESSAGE 8020' any more. I'll check if the result is right now.

To conclude, Sometimes, even you add an empty line, may also result in remove this wild error situation.

@sodaxyh
Copy link

sodaxyh commented Jul 28, 2020

I did what you did, run from the terminal "nastran d01011a.inp" in that folder. Then the terminal shows :"Segmentation fault", and there's no output.
Does anyone know how to solve it?
Thank you in advance.

@ghost
Copy link

ghost commented Jul 29, 2020

Which OS? Which fork of Nastran95?

@sodaxyh
Copy link

sodaxyh commented Jul 29, 2020

Which OS? Which fork of Nastran95?

The OS is Ubuntu 16.04 on VMware.
nasa/NASTRAN-95.

Thank you for your reply.

uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jul 30, 2020
Recent changes in gfortran seem to have broken this port so that it doesn't
produce valid results anymore. See [1] for more details.

This port would likely be a good candidate for LLVM Fortran but I currently
don't have time for to try (patches welcome).

Use dos2unix, as it seems necessary but not sufficient for a future fix.
Pet portlint while here.

Approved by:	therry (mentor)

[1] nasa/NASTRAN-95#15


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@543805 35697150-7ecd-e111-bb59-0022644237b5
uqs pushed a commit to freebsd/freebsd-ports that referenced this issue Jul 30, 2020
Recent changes in gfortran seem to have broken this port so that it doesn't
produce valid results anymore. See [1] for more details.

This port would likely be a good candidate for LLVM Fortran but I currently
don't have time for to try (patches welcome).

Use dos2unix, as it seems necessary but not sufficient for a future fix.
Pet portlint while here.

Approved by:	therry (mentor)

[1] nasa/NASTRAN-95#15
Jehops pushed a commit to Jehops/freebsd-ports-legacy that referenced this issue Jul 30, 2020
Recent changes in gfortran seem to have broken this port so that it doesn't
produce valid results anymore. See [1] for more details.

This port would likely be a good candidate for LLVM Fortran but I currently
don't have time for to try (patches welcome).

Use dos2unix, as it seems necessary but not sufficient for a future fix.
Pet portlint while here.

Approved by:	therry (mentor)

[1] nasa/NASTRAN-95#15


git-svn-id: svn+ssh://svn.freebsd.org/ports/head@543805 35697150-7ecd-e111-bb59-0022644237b5
@JuanP74
Copy link

JuanP74 commented Sep 21, 2020

I modified the compilation instructions removing -std=legacy and then you don't get that error. However I get error when running the 2 following input files (from AeroDME fork makefile): d03021a.inp and d03031a.inp. I get the following error:

c:\nast95>python ./sbin/nastran.py -o OUTPUT inp/d03021a_.inp
Program received signal SIGSEGV: Segmentation fault - invalid memory reference.
Backtrace for this error:
#0 0xa8f8e3
#1 0xa8748d
#2 0x4010d0

I used gfortran 9.2.0 (MinGW.org GCC Build-2) under windows 10 (x64).

If I use -std=legacy for compilation, I reproduce the above errors. However as a workaround if I change the SOL card from SOL 1,0 or SOL 1,1 to just SOL 1, then it works...

It looks like the problem only affects SOLs 1,2,7,8,9,10,11,12 and 14.

@foxy-tux
Copy link

So I found the following work-around for this issue :

Obviously the problem is related to the library libgfortran. So I compiled the nastran executable on a working enviroment (i.e. ubuntu 16.04 or caelinux 2018 in my case) applying -static-libgfortran for the link process.

The obtained nastran executable then runs fine on the other system (i.e. ubuntu 22.04) without the discribed problem (i.e. accepting sol 1,1).

@cabrtech
Copy link

cabrtech commented Aug 6, 2024

3(0x33) is at location 16, after that, it is 0x0d (CR) and 0x0a(LF)

This message is print out in mis/xrgdev.f file.

` SUBROUTINE XRGDEV

C PURPOSE - XRGDEV PROCESSES A FIELD FROM A ****CARD, ****FILE,

C ****SBST, OR A ****RFMT CARD FROM THE RIGID FORMAT

C DATA BASE`

...

` WRITE (NOUT,10) UFM,K,RECORD,J,(I,I=1,8),IERROR,(J,I=1,8)

10 FORMAT (A23,' 8020, SYNTAX ERROR NEAR COLUMN ',I3,' IN THE FOLLOWING CARD-',/20X,20A4, /,(20X,I1,I9,7I10))`

I change CRLF to LF but not work . pity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

8 participants