Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Highlighted
Beginner
34 Views

fortran T-matrix

Hello,

I am having difficulties with compiling the T-matrix fortran code. I have already written to the author and was told that the code is being used by hundreds of scientists and researchers and that the problem exists between my chair and keyboard :)
I attached the .zip file containing all files needed plus I exported errors which occured during compiling.
If you have any idea what I am doing wrong, please let me know.
Thank you very much for your response
Best regards
Ondrej Srom (UCT Prague)

0 Kudos
4 Replies
Highlighted
Black Belt
34 Views

What is the problem?  The file lpd.f got compiled with no error messages for me. There is no main program, so I could not run the code.

Please describe what you tried with which compiler, and other relevant details.

0 Kudos
Highlighted
Beginner
34 Views

Thank you for such a quick response! I don't exactly know what the problem is. But when I use the command: 'ifort -o test *.f' , I receive couple of error messages and the results is, that the compilation is aborted. I installed the Parallel Studio XE 2017 Update 2 containing the fortran compiler. I am not sure, whether I am using it correctly though. When I open the command line and try any command starting with 'ifort' - the message is that the command was not found. So I have to make a source to it. And this might be the main problem. When I use 'source' command and enter the path: 'source /path/to/dir/compilers_and_libraries_2017.2.174/linux/bin/ifortvars.sh intel64' , the command line finally starts to recoginize the 'ifort' command. However, doing it this way may not guarantee all the libraries and other things needed I believe.

 

This is the message I recieve during the compilation attempt: ' ifort -o test *.f '

Thank you for your help.

Error message output:

tmq.lp.f(700): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
  580    FORMAT(D14.8,I8)
-----------------^
tmq.lp.f(690): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 9100    FORMAT('CEXT=',D12.6,2X,'CSCA=',D12.6,2X,
-------------------------^
tmq.lp.f(690): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 9100    FORMAT('CEXT=',D12.6,2X,'CSCA=',D12.6,2X,
------------------------------------------^
tmq.lp.f(691): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
     &          2X,'W=',D12.6,2X,'<COS>=',D12.6)
-------------------------^
tmq.lp.f(691): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
     &          2X,'W=',D12.6,2X,'<COS>=',D12.6)
-------------------------------------------^
tmq.lp.f(652): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7800          FORMAT(' m=',I3,'  qxt=',D12.6,'  qsc=',D12.6,
-----------------------------------------^
tmq.lp.f(652): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7800          FORMAT(' m=',I3,'  qxt=',D12.6,'  qsc=',D12.6,
--------------------------------------------------------^
tmq.lp.f(550): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7337          FORMAT(' NG=',I3,'  DC2=',D8.2,'   DC1=',D8.2)
------------------------------------------^
tmq.lp.f(550): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7337          FORMAT(' NG=',I3,'  DC2=',D8.2,'   DC1=',D8.2)
---------------------------------------------------------^
tmq.lp.f(496): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7335 FORMAT('                              NMAX1 =', I3,'  DC2=',D8.2,
-------------------------------------------------------------------^
tmq.lp.f(497): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
     &      '  DC1=',D8.2)
----------------------^
tmq.lp.f(495): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7334          FORMAT(' NMAX =', I3,'  DC2=',D8.2,'   DC1=',D8.2)
----------------------------------------------^
tmq.lp.f(495): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7334          FORMAT(' NMAX =', I3,'  DC2=',D8.2,'   DC1=',D8.2)
-------------------------------------------------------------^
tmq.lp.f(420): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7400 FORMAT('LAM=',F10.6,3X,'MRR=',D10.4,3X,'MRI=',D10.4)
-------------------------------------^
tmq.lp.f(420): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7400 FORMAT('LAM=',F10.6,3X,'MRR=',D10.4,3X,'MRI=',D10.4)
-----------------------------------------------------^
tmq.lp.f(419): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 7200 FORMAT ('ACCURACY OF COMPUTATIONS DDELT = ',d8.2)
---------------------------------------------------^
tmq.lp.f(825): error #7425: A dot (.) is invalid in a format list in this context.   [.]
 5000 format ('QGAUSS DOES NOT CONVERGE, CHECK=',Q10.3)
----------------------------------------------------^
tmq.lp.f(825): error #6885: A dangling constant exists.   [3]
 5000 format ('QGAUSS DOES NOT CONVERGE, CHECK=',Q10.3)
-----------------------------------------------------^
tmq.lp.f(2704): remark #8291: Recommended relationship between field width 'W' and the number of fractional digits 'D' in this edit descriptor is 'W>=D+7'.
 1005 FORMAT ('MODIFIED POWER LAW DISTRIBUTION,  alpha=',D10.4)
----------------------------------------------------------^
compilation aborted for tmq.lp.f (code 1)
tmq.par.f(3): error #5082: Syntax error, found END-OF-FILE when expecting one of: <LABEL> <END-OF-STATEMENT> ; TYPE INTEGER REAL COMPLEX BYTE CHARACTER CLASS DOUBLE ...
     &           NPN4=100, NPN5=2*NPN4, NPN6=NPN4+1, NPL1=NPN5+1)
-----------------------------------------------------------------^
compilation aborted for tmq.par.f (code 1)

 

0 Kudos
Highlighted
Black Belt
34 Views

You have a couple of things to fix here.

The file tmq.par.f is not a compilable unit, and it is of use only when included in some other compilable unit. It is best to name it tmq.par.inc, or something else with a suffix other than '.f' or '.f90', particularly if one is prone to issuing commands such as ifort *.f*

The W >= D+7 rule is something that should be obeyed, if you do not want your program output to contain lots of asterisks with some cases of input data. The messages related to this, however, are only comments that you may choose to ignore.

0 Kudos
Highlighted
Black Belt Retired Employee
34 Views

Also, you have a Q10.3 format - this is not valid. Q is not a standard Fortran format specifier. I'm not sure what is wanted here - maybe F10.3?

0 Kudos