Intel® Fortran Compiler
Build applications that can scale for the future with optimized code designed for Intel® Xeon® and compatible processors.
28457 Discussions

Problem with an old fortran program on a new machine

gerges__joseph
Beginner
2,404 Views

Hello ,

I'm a noob in fortran

I used to use an old fortran program on a unix machine (5 Years ago)

 

I'm tryig to reuse now on a windows machine. I'm trying to compile it in vain (usign ifort .in an intel compiler using : ifort mkmodel.f)

I know i should use fft libraries but i don't know how.

This is the program i'm trying to compile.

Thanks in advance

0 Kudos
1 Solution
Steve_Lionel
Honored Contributor III
2,385 Views

Never mind - I see what you did in your earlier upload.

You have this in routine FF_PARAM:

C       FORCE_FIELD
        FF_file(1:20) = '/mnt/c/bin/FF'
        FF_file(21:25) = FF
        FF_file(26:26) = '/'
        FF_file(27:31) = INTRA_PROP
        FF_file(32:35) = '.tab'

That first assignment will insert 7 blanks after the 'FF', since the value is 13 characters and the substring is 20.

View solution in original post

0 Kudos
21 Replies
GVautier
New Contributor II
175 Views

Effectively

FF_file='/mnt/c/bin/FF'//trim(FF)//'/'//trim(INTRA_PROP)//'.tab'

Another solution but less safe because it fails if the resulting string is longer than FF_file length

write(FF_file,"('/mnt/c/bin/FF',A,'/',A,'.tab')")trim(FF),trim(NTRA_PROP)

 

0 Kudos
Reply