Skip to content
New issue

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

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

Already on GitHub? # to your account

Compilation Error: Incorrect Argument Type for link Intrinsic in endsys.f #2

Closed
Foadsf opened this issue Apr 26, 2024 · 1 comment
Closed

Comments

@Foadsf
Copy link
Owner

Foadsf commented Apr 26, 2024

Description:
While compiling the NASTRAN-95 project on WSL Ubuntu, an error occurs in the Fortran file endsys.f due to an incorrect argument type passed to the link intrinsic function. This issue halts the build process at 22%.

Error Message:

[ 22%] Building Fortran object CMakeFiles/nasmis.dir/mis/endsys.f.o
/mnt/c/dev/NASTRAN-95/mis/endsys.f:263:17:

  263 |       CALL LINK (I,ITAB10(I76),0)
      |                 1
Error: ‘path1’ argument of ‘link’ intrinsic at (1) must be CHARACTER
gmake[2]: *** [CMakeFiles/nasmis.dir/build.make:5587: CMakeFiles/nasmis.dir/mis/endsys.f.o] Error 1
gmake[1]: *** [CMakeFiles/Makefile2:91: CMakeFiles/nasmis.dir/all] Error 2
gmake: *** [Makefile:91: all] Error 2

Steps to Reproduce:

  1. Clone the repository. and git check out 83469ca0548e6456f7c6db39a308248ed56642be
  2. Initiate the build process with ./build.sh

Expected Behavior:
The code should compile without errors, allowing the build to complete successfully.

Actual Behavior:
The compilation fails with a type mismatch error for the link intrinsic function argument.

Possible Fix:
It appears that the link intrinsic expects a character type for its first argument, but an integer is being passed instead. Reviewing the usage of link and ensuring the correct data types are used might resolve this error.

Environment:

  • OS: Ubuntu WSL
  • Compiler: GNU GFortran 11.4.0
  • Build system: CMake

Additional Context:
This issue might be related to legacy Fortran practices that are not fully compatible with modern Fortran standards or compilers. A thorough check of the argument types and the intrinsic function's requirements could be beneficial.

@Foadsf
Copy link
Owner Author

Foadsf commented Apr 26, 2024

According to Harry G. Schaeffer, in his book "NASTRAN Primer Static and Normal Modes Analysis":

remove endsys.f. It is no longer used.

Foadsf added a commit that referenced this issue Apr 27, 2024
added some info to README.md
fixes a bunch of fortran issues including #2 and others yet to be opened on GitHub

for example [this one](https://community.hpe.com/t5/operating-system-hp-ux/directive-cdir-integer-64/m-p/7213307/highlight/true#M948824)
Foadsf added a commit that referenced this issue Apr 27, 2024
…n on Linux Ubuntu WSL

switched to Ninja for faster build
fixes issue #2 and more
@Foadsf Foadsf closed this as completed Apr 27, 2024
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant