Re: Error in opening the Library module file




Mike wrote:
Hi

I just create a copy of the same project. The compiling, linking
results of original one is ok.
However, the copied one is not.
The error message shows:
Error: Error in opening the Library module file. [MODA]
Error: Error in opening the Library module file. [MODT]

I use CVF6.6C. I've noticed the the external files are all included
including moda.f90 and modt.f90.
In MODA, I have a subroutine to USE MODT and in MODT, I have a
subroutine to USE MODA.
Two error messages are in some subroutines in MODA and MODT.
In main program I USE:
USE MODA
USE MODT

Sometimes I am suspecting that if the sequence of modules being USEd
matters (I mean first
MODT and the MODA), however, I test it and it doesn't make any
difference.

why is there compiling error if I copy the original project which is
compiled OK?
thank you in advance.

Mike
I just do a little test

module modA
contains
subroutine suba()
use modT
print *,'suba'
end subroutine suba
end module modA
module modT
contains
subroutine subb()
use modA
print *,'subb'
end subroutine subb
end module modT


program main
use modA
use modT

call suba()
call subb()

stop
END

First I compile using CVF6.6C.
The error shows " Error: Error in opening the Library module file.
[MODT]".
Then I interchange the called sequence:
module modT
contains
subroutine subb()
use modA
print *,'subb'
end subroutine subb
end module modT
module modA
contains
subroutine suba()
use modT
print *,'suba'
end subroutine suba
end module modA

Compiled results are OK. NO error. So sequence of module did matter.
Right?
Then I switch to "First modA and then modT" again. Compiled results
are also OK.
I think that's because there are modA.mod and modT.mod now.
Then I intentionally del *.mod. I compiled again.
Error: Error in opening the Library module file. [MODT]
Error: Error in opening the Library module file. [MODA]

No longer OK. Why?

Mike

.