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

Compilation Error : Attribute comes to real to complex (vice versa) in Riksfr.f90 #3

Open
Camillever opened this issue May 5, 2022 · 2 comments

Comments

@Camillever
Copy link

Camillever commented May 5, 2022

Dear Mister Gallovic,

I'm a french student working on a Python tool generating simulated ground motion by stochastic method and developed recently by a PhD student in France.
In this tool, the source model is generated by your RIKsfr fortran code.

I don't know if you can help me with my issue (about the second command) but I had somehow some errors, refering to the code source mainly, while compiling.

Files in my folder RIK, initially : Time_2d.c ; crustal.dat ; RIKsrf.in ; RIKsrf.f90.

Commands :

  • The first one :
    gcc -c -Wall -DNO-IEEE_INFINITY Time_2d.c
    Error :
    image
    'INFINITY' in Time_2d.c is also a attribute of math.h in fortran, there is an incoherence for the program.

Resolution : I decided to change all 'INFINITY' with a 'INFINITY_PERSO'. The error no longer occurs when executing the command. Time_2d.o is created.

  • The second one :
    gfortran -Ofast -fopenmp -o RIKsrf2 RIKsrf.f90 Time_2d.o
    Error :
    image

The second warning warns that the type of one of the arguments of the functions fourn and rlft3 of RIKsrf.f90 is not good. We expect a complex number while we provide a real number (or vice versa).

I checked into the source code of RIFsfr.f90 and the warning seems right and also a little bit incoherent. I don't want to modify the source code because I absolutely do not master what you have developed in your code and I'm just a casual fortran user.

Versions:
gcc version 7.4
gfortran version 8.3

Thank you

Best regards

Camille

@Camillever
Copy link
Author

Camillever commented May 6, 2022

I tried also with a older version of gfortran (version 7). Maybe it's less responsive to this type of error, I guessed.
But unfortunately, I just get the same error about the source code of .f90 with the second command.

Note: I can't install intel fort compiler on my device because of a proxy at my work place, and compile with $ifort.

@fgallovic
Copy link
Owner

Dear Camille,
Thank you for using the code.
I am aware of the warnings. They do not affect the code functioning, so I consider them unimportant.
Best regards,
Frantisek

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

2 participants