fortran 실행관련 질문

minsubsim의 이미지

fortran으로 짜여진 geant321라는 프로그램의 example을 실행하려고 합니다

소스코드는 아래 경로에 있는 것들과 동일한 내용입니다
http://cernlib.web.cern.ch/cernlib/download/2006_source/src/geant321/examples/gexam1/

관련 라이브러리 (cernlib)도 제대로 설치된것 같아서 직접 실행해 보려고 했습니다

g77 gukine.F guout.F gustep.F gutrev.F incdek.F main.F ufiles.F ugeom.F uginit.F uglast.F uhinit.F -o simple -L/usr/X11R6/lib -I/usr/include/cernlib/2006 -lX11 -lcrypt -llapack -lgeant321 -lpawlib -lgraflib -lgrafX11 -lpacklib

그랬더니 아래와 같은 에러가 발생했습니다....

ufiles.F: In subroutine `ufiles':
ufiles.F:28:
CHARACTER*(*) FILNAM, FSTAT
1
ufiles.F:48: (continued):
OPEN(UNIT=4,FILE=FILNAM,STATUS=FSTAT,FORM='FORMATTED')
2
Invalid declaration of or reference to symbol `filnam' at (2) [initially seen at (1)]
ufiles.F:28:
CHARACTER*(*) FILNAM, FSTAT
1
ufiles.F:48: (continued):
OPEN(UNIT=4,FILE=FILNAM,STATUS=FSTAT,FORM='FORMATTED')
2
Invalid declaration of or reference to symbol `fstat' at (2) [initially seen at (1)]
uglast.F: In subroutine `uglast':
uglast.F:32:
CHARACTER*(*) FILNAM, FSTAT
1
uglast.F:129: (continued):
OPEN(UNIT=99,FILE=FILNAM,STATUS=FSTAT,FORM='FORMATTED')
2
Invalid declaration of or reference to symbol `filnam' at (2) [initially seen at (1)]
uglast.F:32:
CHARACTER*(*) FILNAM, FSTAT
1
uglast.F:129: (continued):
OPEN(UNIT=99,FILE=FILNAM,STATUS=FSTAT,FORM='FORMATTED')

무엇이 잘못된 걸까요??

그리고 해당 디렉토리에 Imakefile이 있는데 이건 어떻게 활용해야하는 건가요? imake_boot(http://cernlib.web.cern.ch/cernlib/download/2006_source/src/config/)를 실행했는데도 makefile이 안생기는거면 제가 빌드를 잘못한걸까요?

그리고 포트란77버전 강좌 제대로 나온곳좀 아시면 알려주십쇼 ㅠㅠ 너무 옛날거라...

yeonpil_net의 이미지


imake를 이용해 보세요. x window 빌드용 make툴로 알고 있습니다.(사용해본 적은 없네요.)

원인은 전처리용 매크로 상수가 정의되어 있지 않기 때문일 겁니다.

저렇게 커맨드라인에서 한 줄씩 컴파일 하려면, -D로 일일이 해줘야 합니다.

코드는 대충봐서 정확한 답변은 아닐 가능성이 많습니다.

!23456---1----+----2----+----3----+----4----+----5----+----6----+----7-2--+----8
"배웠다"는 "할 수 있다"의 동의어가 아니다.

yeonpil_net의 이미지

인클루드 될 파일의 경로도 정확한지 파악하시고요.

!23456---1----+----2----+----3----+----4----+----5----+----6----+----7-2--+----8
"배웠다"는 "할 수 있다"의 동의어가 아니다.

댓글 달기

Filtered HTML

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

BBCode

  • 텍스트에 BBCode 태그를 사용할 수 있습니다. URL은 자동으로 링크 됩니다.
  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param>
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.

Textile

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • You can use Textile markup to format text.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Markdown

  • 다음 태그를 이용하여 소스 코드 구문 강조를 할 수 있습니다: <code>, <blockcode>, <apache>, <applescript>, <autoconf>, <awk>, <bash>, <c>, <cpp>, <css>, <diff>, <drupal5>, <drupal6>, <gdb>, <html>, <html5>, <java>, <javascript>, <ldif>, <lua>, <make>, <mysql>, <perl>, <perl6>, <php>, <pgsql>, <proftpd>, <python>, <reg>, <spec>, <ruby>. 지원하는 태그 형식: <foo>, [foo].
  • Quick Tips:
    • Two or more spaces at a line's end = Line break
    • Double returns = Paragraph
    • *Single asterisks* or _single underscores_ = Emphasis
    • **Double** or __double__ = Strong
    • This is [a link](http://the.link.example.com "The optional title text")
    For complete details on the Markdown syntax, see the Markdown documentation and Markdown Extra documentation for tables, footnotes, and more.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 사용할 수 있는 HTML 태그: <p><div><span><br><a><em><strong><del><ins><b><i><u><s><pre><code><cite><blockquote><ul><ol><li><dl><dt><dd><table><tr><td><th><thead><tbody><h1><h2><h3><h4><h5><h6><img><embed><object><param><hr>

Plain text

  • HTML 태그를 사용할 수 없습니다.
  • web 주소와/이메일 주소를 클릭할 수 있는 링크로 자동으로 바꿉니다.
  • 줄과 단락은 자동으로 분리됩니다.
댓글 첨부 파일
이 댓글에 이미지나 파일을 업로드 합니다.
파일 크기는 8 MB보다 작아야 합니다.
허용할 파일 형식: txt pdf doc xls gif jpg jpeg mp3 png rar zip.
CAPTCHA
이것은 자동으로 스팸을 올리는 것을 막기 위해서 제공됩니다.