Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 680969
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T01:25:54+00:00 2026-05-14T01:25:54+00:00

I am trying to read some smps files with python, and found a fortran

  • 0

I am trying to read some smps files with python, and found a fortran implementation, so I thought I would give f2py a shot. The problem is that I have no experience with fortran.

I have successfully installed gfortran and f2py on my Linux box and ran the example on thew f2py page, but I have some trouble compiling and running the large program. There are two files, one with a file reader wrapper and one with all the logic. They seem to call each other, but when I compile and link or try f2py, I get errors that they somehow can’t find each other:

f95 -c FILEWR~1.F
f95 -c SMPSREAD.F90 
f95 -o smpsread SMPSREAD.o FILEWR~1.o 

FILEWR~1.o In function `file_wrapper_'
FILEWR~1.F(.text+0x3d) undefined reference to `chopen_'
usrlibgcci486-linux-gnu4.4.1libgfortranbegin.a(fmain.o) In function `main'
(.text+0x27) undefined reference to `MAIN__'
collect2 ld returned 1 exit status  

I also tried changing the name to FILE_WRAPPER.F but that did not help.

With f2py I found out I had to include a comment to get it to accept free format, and saved this as a new file and tried:

f2py -c -m smpsread smpsread.f90

I get a lot of output and warnings, but the error seems to be this one:

getctype: No C-type found in "{'typespec': 'type', 'attrspec': ['allocatable'],  'typename': 'node', 'dimension': [':']}", assuming void.

The fortran 90 spms reader can be found here.

Any help or suggestions appreciated.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T01:25:54+00:00Added an answer on May 14, 2026 at 1:25 am

    I would suggest skipping the fortran business altogether.

    http://myweb.dal.ca/gassmann/smps2.htm

    The MPS record layout is described here, and looks relatively simple to pick apart in Python.

    http://myweb.dal.ca/gassmann/smps2.htm#CoreMPSline

    You’ll have to define appropriate Python classes (or namedtuples) for all of the data anyway.

    I don’t think the Fortran is helping.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Ask A Question

Stats

  • Questions 347k
  • Answers 347k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer I think I solved this. For some reason there is… May 14, 2026 at 6:25 am
  • Editorial Team
    Editorial Team added an answer The problem was an ICON element that referenced a sourcefile… May 14, 2026 at 6:25 am
  • Editorial Team
    Editorial Team added an answer You need to call the Read method on your SqlDataReader… May 14, 2026 at 6:25 am

Related Questions

I am trying to read some Java code from a tutorial, I don't understand
I am trying to read some text files, where each line needs to be
I am trying to read some settings from php.ini using zend. The API that
Were is the problem in code.. i am trying to read the .gif file
I am trying to call out to a legacy dll compiled from FORTRAN code.

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.