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

I have these lines of code, module_mfm.f90 , VS2017,intel parallel studio 2017

I have these lines of code, module_mfm.f90 , VS2017,intel parallel studio 2017

all of my project works with gfortran in command line,but when I use visual studio i got errors,maybe it couldn't find use files such as use module_compiler_dependant and so far...

module module_mfm
!-----------------------------------------------------------------------
! Module to manage MFM (Modulef Formatted Mesh) files
!
! Licensing: This code is distributed under the GNU GPL license.
! Author: Francisco Pena, fran(dot)pena(at)usc(dot)es
! Last update: 15/05/2013
!
! PUBLIC PROCEDURES:
!   load_mfm: loads a mesh from a MFM format file
!   save_mfm: saves a mesh in a MFM format file
!-----------------------------------------------------------------------
use module_compiler_dependant, only: real64
use module_os_dependant, only: maxpath
use module_report, only: error
use module_convers, only: string, int
use module_feed, only: feed, empty
implicit none

contains

!-----------------------------------------------------------------------
! load_mfm: mesh load
!-----------------------------------------------------------------------
subroutine load_mfm(filename, iu, nel, nnod, nver, dim, lnn, lnv, lne, lnf, &
nn, mm, nrc, nra, nrv, z, nsd)
character(*), intent(in) :: filename !mesh filename
integer, intent(in)    :: iu         !file unit
integer, intent(inout) :: nel        !global number of elements
integer, intent(inout) :: nnod       !global number of nodes
integer, intent(inout) :: nver       !global number of vertices
integer, intent(inout) :: dim        !space dimension
integer, intent(inout) :: lnv        !local number of vertices
integer, intent(inout) :: lne        !local number of edges
integer, intent(inout) :: lnf        !local number of faces
integer, intent(inout) :: lnn        !local number of nodes
integer, allocatable   :: nn(:,:)    !nodes index array
integer, allocatable   :: mm(:,:)    !vertices index array
integer, allocatable   :: nrv(:,:)   !vertices reference array
integer, allocatable   :: nra(:,:)   !edge reference array
integer, allocatable   :: nrc(:,:)   !face reference array
real(real64), allocatable :: z(:,:)  !vertices coordinates array
integer, allocatable   :: nsd(:)     !subdomain index array
integer :: i, j, k, ln2, ios
character(maxpath) :: str

!open file
open (unit=iu, file=filename, form='formatted', status='old', position='rewind', iostat=ios)
if (ios /= 0) call error('load/open, #'//trim(string(ios)))

!try read scalar data from file: nel, nnod, nver, dim, lnn, lnv, lne, lnf
read (unit=iu, fmt='(a)', iostat=ios) str
if (ios /= 0) call error('read (str), #'//trim(string(ios)))
read (str, fmt=*, iostat=ios) nel, nnod, nver, dim, lnn, lnv, lne, lnf
if (ios /= 0) then
!try read scalar data from file: nel, nnod, nver
read (str, fmt=*, iostat=ios) nel, nnod, nver
if (ios /= 0) call error('read (nel, nnod, nver), #'//trim(string(ios)))
if (dim <= 0 .or. lnn <= 0 .or. lnv <= 0) &
call error('RECONVXX format does not include dimensions and the user did not provide them, unable to allocate')
end if

!allocation
if (allocated(nn))  then
deallocate( nn,           stat=ios); if (ios /= 0) call error('dealloc (nn), unable to deallocate');  end if
allocate( nn(lnn, nel), stat=ios); if (ios /= 0) call error(  'alloc (nn), unable to allocate')
if (allocated(mm))  then
deallocate( mm,           stat=ios); if (ios /= 0) call error('dealloc (mm), unable to deallocate');  end if
allocate( mm(lnv, nel), stat=ios); if (ios /= 0) call error(  'alloc (mm), unable to allocate')
if (allocated(nrc)) then
deallocate(nrc,           stat=ios); if (ios /= 0) call error('dealloc (nrc), unable to deallocate'); end if
allocate(nrc(lnf, nel), stat=ios); if (ios /= 0) call error(  'alloc (nrc), unable to allocate')
if (allocated(nra)) then
deallocate(nra,           stat=ios); if (ios /= 0) call error('dealloc (nra), unable to deallocate'); end if
allocate(nra(lne, nel), stat=ios); if (ios /= 0) call error(  'alloc (nra), unable to allocate')
if (allocated(nrv)) then
deallocate(nrv,           stat=ios); if (ios /= 0) call error('dealloc (nrv), unable to deallocate'); end if
allocate(nrv(lnv, nel), stat=ios); if (ios /= 0) call error(  'alloc (nrv), unable to allocate')
if (allocated(z))   then
deallocate( z,            stat=ios); if (ios /= 0) call error('dealloc (z), unable to deallocate');   end if
allocate( z(dim, nver), stat=ios); if (ios /= 0) call error(  'alloc (z), unable to allocate')
if (allocated(nsd)) then
deallocate(nsd,           stat=ios); if (ios /= 0) call error('dealloc (nsd), unable to deallocate'); end if
allocate(nsd(nel),      stat=ios); if (ios /= 0) call error(  'alloc (nsd), unable to allocate')
!ln2: lecture of nodes, only if (nnod /= nver)
ln2 = 0; if (nnod /= nver) ln2 = lnn
!arrays from file ([nn,if nnod/=nver], mm, [nrc,if dim==3], [nra,if dim==2], nrv, x)
select case(dim)
case(1)
read (unit=iu, fmt=*, iostat=ios) ((nn(i,k),  i=1,ln2), k=1,nel), &
((mm(i,k),  i=1,lnv), k=1,nel), &
((nrv(i,k), i=1,lnv), k=1,nel), &
((z(i,j),   i=1,dim), j=1,nver)
case(2)
read (unit=iu, fmt=*, iostat=ios) ((nn(i,k),  i=1,ln2), k=1,nel), &
((mm(i,k),  i=1,lnv), k=1,nel), &
((nra(i,k), i=1,lne), k=1,nel), &
((nrv(i,k), i=1,lnv), k=1,nel), &
((z(i,j),   i=1,dim), j=1,nver)
case(3)
read (unit=iu, fmt=*, iostat=ios) ((nn(i,k),  i=1,ln2), k=1,nel), &
((mm(i,k),  i=1,lnv), k=1,nel), &
((nrc(i,k), i=1,lnf), k=1,nel), &
((nra(i,k), i=1,lne), k=1,nel), &
((nrv(i,k), i=1,lnv), k=1,nel), &
((z(i,j),   i=1,dim), j=1,nver)
case default
call error('load, invalid dimension DIM')
end select
if (ios /= 0) call error('read (mm,...) #'//trim(string(ios)))
!subdomain index array (nsd)
read (unit=iu, fmt=*, iostat=ios) (nsd(k), k=1,nel)
if (ios /= 0) call error('read (nsd), #'//trim(string(ios)))
close(iu)
! nn was read only if (nnod /= nver)
!if (nnod == nver) nn(1:lnv,1:nel) = mm

print'(a,i9)','File loaded!'
print'(a,i9)','Global number of elements: ', nel
print'(a,i9)','Global number of nodes:    ', nnod
print'(a,i9)','Global number of vertices: ', nver
print'(a,i9)','Space dimension :          ', dim
print'(a,i9)','Local number of nodes :    ', lnn
print'(a,i9)','Local number of vertices : ', lnv
print'(a,i9)','Local number of edges :    ', lne
print'(a,i9)','Local number of faces :    ', lnf
end subroutine

!-----------------------------------------------------------------------
! save_mfm: save mesh
!-----------------------------------------------------------------------
subroutine save_mfm(filename, iu, nel, nnod, nver, dim, lnn, lnv, lne, lnf, &
nn, mm, nrc, nra, nrv, z, nsd)
character(*), intent(in) :: filename !mesh filename
integer, intent(in) :: iu            !file unit
integer, intent(in) :: nel           !global number of elements
integer, intent(in) :: nnod          !global number of nodes
integer, intent(in) :: nver          !global number of vertices
integer, intent(in) :: dim           !space dimension
integer, intent(in) :: lnv           !local number of vertices
integer, intent(in) :: lne           !local number of edges
integer, intent(in) :: lnf           !local number of faces
integer, intent(in) :: lnn           !local number of nodes
integer, intent(in) :: nn(:,:)       !nodes index array
integer, intent(in) :: mm(:,:)       !vertices index array
integer, intent(in) :: nrv(:,:)      !vertices reference array
integer, intent(in) :: nra(:,:)      !edge reference array
integer, intent(in) :: nrc(:,:)      !face reference array
real(real64), intent(in) :: z(:,:)   !vertices coordinates array
integer, intent(in) :: nsd(:)        !subdomain index array
integer :: i, j, k, ln2, le2, lf2, ios
  
!open file
open (unit=iu, file=filename, form='formatted', position='rewind', iostat=ios)
if (ios /= 0) call error('save/open, #'//trim(string(ios)))
print'(a,i9)','Writing data ...'
!write data (nel, nnod, nver, dim, ...)   
call feed(iu, string(nel)); call feed(iu, string(nnod)); call feed(iu, string(nver))
call feed(iu, string(dim)); call feed(iu, string(lnn));  call feed(iu, string(lnv))
call feed(iu, string(lne)); call feed(iu, string(lnf));  call empty(iu)
!ln2: write nodes, only if (nnod /= nver) 
ln2 = lnn; if (nnod == nver) ln2 = 0  
le2 = lne; if (dim < 2)      le2 = 0
lf2 = lnf; if (dim < 3)      lf2 = 0
!arrays from file ([nn,if nnod/=nver], mm, [nrc,if dim==3], [nra,if dim==2], nrv, x)  
do k = 1, nel;  do i = 1, ln2; call feed(iu, string(nn(i,k)));  end do; end do
do k = 1, nel;  do i = 1, lnv; call feed(iu, string(mm(i,k)));  end do; end do
do k = 1, nel;  do i = 1, lf2; call feed(iu, string(nrc(i,k))); end do; end do
do k = 1, nel;  do i = 1, le2; call feed(iu, string(nra(i,k))); end do; end do
do k = 1, nel;  do i = 1, lnv; call feed(iu, string(nrv(i,k))); end do; end do
do j = 1, nver; do i = 1, dim; call feed(iu, string(z(i,j)));   end do; end do
call empty(iu)
!subdomain index array (nsd)
do k = 1, nel; call feed(iu, string(nsd(k)));  end do
call empty(iu)
close(iu)
print'(a,i9)','Global number of elements: ', nel
print'(a,i9)','Global number of nodes:    ', nnod
print'(a,i9)','Global number of vertices: ', nver
print'(a,i9)','Space dimension :          ', dim
print'(a,i9)','Local number of nodes :    ', lnn
print'(a,i9)','Local number of vertices : ', lnv
print'(a,i9)','Local number of edges :    ', lne
print'(a,i9)','Local number of faces :    ', lnf
end subroutine

end module

when I run the project ,I got these lines of errors:

Severity	Code	Description	Project	File	Line	Suppression State
Error		error #6580: Name in only-list does not exist.   [REAL64]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	13	
Error		Compilation Aborted (code 1)		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	1	
Error		error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_COMPILER_DEPENDANT]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	13	
Error		error #6580: Name in only-list does not exist.   [MAXPATH]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	14	
Error		error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_OS_DEPENDANT]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	14	
Error		error #6580: Name in only-list does not exist.   [ERROR]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	15	
Error		error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_REPORT]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	15	
Error		error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_CONVERS]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	16	
Error		error #6580: Name in only-list does not exist.   [STRING]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	16	
Error		error #6580: Name in only-list does not exist.   [INT]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	16	
Error		error #6580: Name in only-list does not exist.   [EMPTY]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	17	
Error		error #6580: Name in only-list does not exist.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	17	
Error		error #7002: Error in opening the compiled module file.  Check INCLUDE paths.   [MODULE_FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	17	
Error		error #6683: A kind type parameter must be a compile-time constant.   [REAL64]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	42	
Error		error #6279: A specification expression object must be a dummy argument, a COMMON block object, or an object accessible through host or use association.   [MAXPATH]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	45	
Error		error #6404: This name does not have a type, and must have an explicit type.   [MAXPATH]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	45	
Error		error #6362: The data types of the argument(s) are invalid.   [TRIM]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	49	
Error		error #6404: This name does not have a type, and must have an explicit type.   [STRING]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	49	
Error		error #6362: The data types of the argument(s) are invalid.   [TRIM]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	53	
Error		error #6362: The data types of the argument(s) are invalid.   [TRIM]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	58	
Error		error #6362: The data types of the argument(s) are invalid.   [TRIM]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	110	
Error		error #6362: The data types of the argument(s) are invalid.   [TRIM]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	113	
Error		error #6683: A kind type parameter must be a compile-time constant.   [REAL64]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	149	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [ERROR]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	155	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	158	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	158	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	158	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	159	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	159	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	159	
Error		error #6406: Conflicting attributes or multiple declaration of name.   [FEED]		F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90	160	

so my project links is at https://github.com/victorsndvg/FEconv/blob/master/source/mfm/module_mfm.f90

Here is my Makefile.gfortran.windows file:

#################################################################
# Makefile created using the tool 'Creamake'
# 
# Creamake is distributed under the GNU GPL license
# Author: Francisco Pena, fran.pena(at)usc.es
# Download page: http://sourceforge.net/projects/creamake/
#################################################################
 
#################################################################
# User-modifiable options
#################################################################
 
# SOURCE AND COMMONS FOLDERS (separated by spaces)
dir_fuentes = source source\basicmod source\basicmod\gfortran \
source\basicmod\args source\basicmod\alloc source\basicmod\vtk \
source\cuthill_mckee source\ansys source\patran source\unv source\mfm \
source\mum source\vtu source\mphtxt source\pmh source\flux source\freefem \
source\fem_extract source\gmsh
 
# OBJECT AND .MOD FOLDER
dir_objetos = object
 
# MAIN SOURCE FILE (include relative path from folder where Makefile is)
condir_principal = source\main.f90
 
# EXECUTABLE NAME 
ejecutable = feconv.exe
 
# NEEDED TO convert ejecutable THE DEFAULT RULE: 
$(ejecutable): $(condir_principal) 
 
# MODULES
modulos = module_field_database.f90 module_compiler_gfortran.f90 \
module_os_dependant.f90 module_report.f90 module_set.f90 module_math.f90 \
module_convers.f90 module_files.f90 module_feed.f90 module_args.f90 \
module_alloc_char_r1.f90 module_alloc_char_r2.f90 module_alloc_int_r1.f90 \
module_alloc_int_r2.f90 module_alloc_int_r3.f90 module_alloc_log_r1.f90 \
module_alloc_real64_r1.f90 module_alloc_real64_r2.f90 \
module_alloc_real64_r3.f90 module_alloc.f90 module_system.f90 IR_Precision.f90 \
Lib_VTK_IO.f90 LIB_VTK_IO_READ.f90 module_writevtu.f90 \
module_ALLOC_int_alloc_r2.f90 module_ALLOC_log_r2.f90 module_ALLOC_real_r2.f90 \
module_assign_references.f90 module_desplazamientos.f90 module_fuerzas.f90 \
module_cells.f90 module_dataset.f90 module_FE_DB.f90 module_groups.f90 \
module_patran.f90 module_mesh.f90 module_mfm.f90 module_mum.f90 \
module_fe_database_pmh.f90 module_pmh.f90 module_utils_mphtxt.f90 \
module_write_mphtxt.f90 module_read_mphtxt.f90 module_manage_mphtxt.f90 \
module_mphtxt.f90 module_vtu.f90 module_pvd.f90 module_muf.f90 module_mff.f90 \
module_dataset_2467.f90 module_dataset_2414.f90 module_dataset_2412.f90 \
module_dataset_2411.f90 module_manage_unv.f90 module_unv.f90 \
module_utils_msh.f90 module_read_msh.f90 module_ip.f90 \
module_cuthill_mckee.f90 module_transform.f90 module_write_msh.f90 \
module_manage_msh.f90 module_msh.f90 module_dex.f90 module_utils_pf3.f90 \
module_read_pf3.f90 module_write_pf3.f90 module_manage_pf3.f90 module_pf3.f90 \
module_freefem.f90 module_fem_extract_complex.f90 module_fem_extract_real.f90 \
module_fem_extract.f90 module_gmsh.f90 module_feconv.f90
 
# MODULE DEPENDENCIES
# if pru1 depends on pru2... pru1.o: pru2.o
module_os_dependant.obj: module_compiler_gfortran.obj
module_report.obj: module_compiler_gfortran.obj module_os_dependant.obj
module_set.obj: module_os_dependant.obj module_report.obj
module_math.obj: module_compiler_gfortran.obj
module_convers.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj
module_files.obj: module_os_dependant.obj module_report.obj module_convers.obj
module_feed.obj: module_convers.obj
module_args.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj
module_alloc_char_r1.obj: module_os_dependant.obj module_report.obj
module_alloc_char_r2.obj: module_os_dependant.obj module_report.obj \
module_alloc_char_r1.obj
module_alloc_int_r1.obj: module_os_dependant.obj module_report.obj
module_alloc_int_r2.obj: module_os_dependant.obj module_report.obj \
module_alloc_int_r1.obj
module_alloc_int_r3.obj: module_os_dependant.obj module_report.obj \
module_alloc_int_r1.obj module_alloc_int_r2.obj
module_alloc_log_r1.obj: module_os_dependant.obj module_report.obj \
module_alloc_int_r1.obj
module_alloc_real64_r1.obj: module_compiler_gfortran.obj \
module_os_dependant.obj module_report.obj module_alloc_int_r1.obj
module_alloc_real64_r2.obj: module_compiler_gfortran.obj \
module_os_dependant.obj module_report.obj module_alloc_real64_r1.obj
module_alloc_real64_r3.obj: module_compiler_gfortran.obj \
module_os_dependant.obj module_report.obj module_alloc_real64_r1.obj \
module_alloc_real64_r2.obj
module_alloc.obj: module_alloc_int_r1.obj module_alloc_int_r2.obj \
module_alloc_int_r3.obj module_alloc_real64_r1.obj module_alloc_real64_r2.obj \
module_alloc_real64_r3.obj module_alloc_char_r1.obj module_alloc_char_r2.obj \
module_alloc_log_r1.obj
module_system.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc_char_r1.obj module_files.obj
Lib_VTK_IO.obj: IR_Precision.obj
LIB_VTK_IO_READ.obj: Lib_VTK_IO.obj module_alloc.obj
module_writevtu.obj: Lib_VTK_IO.obj
module_ALLOC_int_alloc_r2.obj: module_alloc.obj
module_ALLOC_log_r2.obj: module_report.obj
module_ALLOC_real_r2.obj: module_report.obj
module_desplazamientos.obj: module_alloc.obj module_ALLOC_int_alloc_r2.obj \
module_ALLOC_real_r2.obj module_ALLOC_log_r2.obj module_convers.obj
module_fuerzas.obj: module_alloc.obj module_ALLOC_int_alloc_r2.obj \
module_ALLOC_real_r2.obj module_convers.obj
module_dataset.obj: module_report.obj module_convers.obj
module_FE_DB.obj: module_os_dependant.obj
module_groups.obj: module_alloc.obj
module_patran.obj: module_compiler_gfortran.obj module_desplazamientos.obj \
module_fuerzas.obj module_math.obj module_groups.obj \
module_assign_references.obj
module_mesh.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_alloc.obj module_files.obj
module_mfm.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_feed.obj
module_mum.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_feed.obj
module_pmh.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj module_args.obj \
module_feed.obj module_fe_database_pmh.obj module_set.obj module_files.obj \
module_set.obj
module_utils_mphtxt.obj: module_alloc.obj module_pmh.obj
module_write_mphtxt.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_mesh.obj module_pmh.obj \
module_utils_mphtxt.obj
module_read_mphtxt.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj module_mesh.obj \
module_pmh.obj module_utils_mphtxt.obj
module_manage_mphtxt.obj: module_alloc.obj module_files.obj module_mesh.obj \
module_read_mphtxt.obj module_write_mphtxt.obj module_utils_mphtxt.obj
module_mphtxt.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_manage_mphtxt.obj module_mesh.obj \
module_pmh.obj module_fe_database_pmh.obj
module_vtu.obj: module_compiler_gfortran.obj module_report.obj \
module_files.obj module_convers.obj module_alloc.obj module_set.obj \
Lib_VTK_IO.obj LIB_VTK_IO_READ.obj module_writevtu.obj module_pmh.obj \
module_fe_database_pmh.obj
module_pvd.obj: module_vtu.obj module_pmh.obj module_set.obj \
module_os_dependant.obj
module_muf.obj: module_compiler_gfortran.obj module_files.obj \
module_convers.obj module_report.obj module_pmh.obj
module_mff.obj: module_compiler_gfortran.obj module_files.obj \
module_convers.obj module_report.obj module_pmh.obj
module_dataset_2467.obj: module_dataset.obj module_mesh.obj module_cells.obj \
module_groups.obj module_pmh.obj module_fe_database_pmh.obj
module_dataset_2414.obj: module_compiler_gfortran.obj module_alloc.obj \
module_dataset.obj module_convers.obj module_pmh.obj \
module_fe_database_pmh.obj
module_dataset_2412.obj: module_alloc.obj module_dataset.obj module_mesh.obj \
module_FE_DB.obj module_cells.obj module_pmh.obj module_fe_database_pmh.obj
module_dataset_2411.obj: module_compiler_gfortran.obj module_alloc.obj \
module_dataset.obj module_pmh.obj
module_manage_unv.obj: module_alloc.obj module_files.obj module_pmh.obj \
module_dataset_2411.obj module_dataset_2412.obj module_dataset_2467.obj \
module_dataset_2414.obj
module_unv.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj module_set.obj \
module_args.obj module_pmh.obj module_fe_database_pmh.obj \
module_manage_unv.obj module_mesh.obj
module_utils_msh.obj: module_alloc.obj module_report.obj module_convers.obj \
module_pmh.obj module_fe_database_pmh.obj module_compiler_gfortran.obj
module_read_msh.obj: module_alloc.obj module_convers.obj module_pmh.obj \
module_utils_msh.obj
module_ip.obj: module_compiler_gfortran.obj module_files.obj \
module_convers.obj module_report.obj module_utils_msh.obj module_pmh.obj
module_cuthill_mckee.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_vtu.obj
module_transform.obj: module_os_dependant.obj module_report.obj \
module_alloc_int_r1.obj module_alloc_int_r2.obj module_vtu.obj \
module_cuthill_mckee.obj module_pmh.obj
module_write_msh.obj: module_transform.obj module_pmh.obj module_utils_msh.obj \
module_alloc.obj module_set.obj
module_manage_msh.obj: module_alloc.obj module_files.obj module_transform.obj \
module_mesh.obj module_pmh.obj module_read_msh.obj module_write_msh.obj \
module_utils_msh.obj
module_msh.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_mesh.obj module_pmh.obj \
module_fe_database_pmh.obj module_manage_msh.obj
module_dex.obj: module_compiler_gfortran.obj module_files.obj \
module_convers.obj module_report.obj module_pmh.obj
module_utils_pf3.obj: module_alloc.obj module_pmh.obj
module_read_pf3.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj module_mesh.obj \
module_pmh.obj module_utils_pf3.obj
module_write_pf3.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_set.obj module_convers.obj module_mesh.obj \
module_pmh.obj module_utils_pf3.obj
module_manage_pf3.obj: module_alloc.obj module_files.obj module_mesh.obj \
module_read_pf3.obj module_write_pf3.obj
module_pf3.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_manage_pf3.obj module_mesh.obj \
module_pmh.obj module_fe_database_pmh.obj
module_freefem.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj module_args.obj \
module_feed.obj module_fe_database_pmh.obj module_pmh.obj
module_fem_extract.obj: module_fem_extract_real.obj \
module_fem_extract_complex.obj
module_gmsh.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_alloc.obj \
module_fe_database_pmh.obj module_pmh.obj module_args.obj
module_feconv.obj: module_compiler_gfortran.obj module_os_dependant.obj \
module_report.obj module_convers.obj module_files.obj module_alloc.obj \
module_args.obj module_transform.obj module_cuthill_mckee.obj module_msh.obj \
module_unv.obj module_patran.obj module_mfm.obj module_mum.obj module_vtu.obj \
module_pvd.obj module_mphtxt.obj module_pf3.obj module_field_database.obj \
module_mff.obj module_muf.obj module_freefem.obj module_pmh.obj \
module_fem_extract.obj module_gmsh.obj module_dex.obj module_ip.obj
 
# INCLUDES
includes = 
 
# COMPILER
FC = gfortran
 
# COMPILER OPTIONS
FFLAGS = -J$(dir_objetos)
 
# LINKER OPTIONS
LDFLAGS = -static
 
#################################################################
# Non-modifiable part
#################################################################
 
# SOURCE FOLDERS
VPATH =   $(subst ,:,$(strip $(dir_fuentes)))
vpath %.obj $(dir_objetos)
 
# SOURCES
fuentes_ = $(filter %.f %.F %.for %.FOR %.f90 %.F90 %.f95 %.F95 %.f03 %.F03,$(shell dir /b $(dir_fuentes)))
fuentes  = $(filter-out $(notdir $(condir_principal)) $(modulos),$(fuentes_))
 
# OBJECTS
modulos_obj = $(addsuffix .obj,$(basename $(modulos)))
fuentes_obj = $(addsuffix .obj,$(basename $(fuentes)))
 
# OBJECTS WIRH PATH
condir_modulos_obj = $(addprefix $(dir_objetos)/,$(modulos_obj))
condir_fuentes_obj = $(addprefix $(dir_objetos)/,$(fuentes_obj))
 
# COMPILATION OPTIONS
FFLAGS += $(patsubst %,-I%,$(dir_fuentes))
FFLAGS += -I$(dir_objetos)
 
# MAIN RULE
all: $(ejecutable)
 
$(ejecutable): $(includes) $(modulos_obj) $(fuentes_obj)
	$(FC) -o $(ejecutable) $(FFLAGS) $(condir_principal) $(condir_modulos_obj) $(condir_fuentes_obj) $(LDFLAGS) 
 
# SOURCES RULE
$(fuentes_obj): $(includes) $(modulos_obj)
 
# RULE PATTERNS
%.obj:%.f
	$(FC) -c -o $@ $(FFLAGS) $<
	@copy $@ $(dir_objetos) 
	@del $@ 
%.obj:%.F
	$(FC) -c -o $@ $(FFLAGS) $< 
	@copy $@ $(dir_objetos) 
	@del $@ 
%.obj:%.for
	$(FC) -c -o $@ $(FFLAGS) $< 
	@copy $@ $(dir_objetos) 
	@del $@ 
%.obj:%.FOR
	$(FC) -c -o $@ $(FFLAGS) $< 
	@copy $@ $(dir_objetos) 
	@del $@ 
%.obj:%.f90
	$(FC) -c -o $@ $(FFLAGS) $< 
	@copy $@ $(dir_objetos) 
	@del $@ 
%.obj:%.F90
	$(FC) -c -o $@ $(FFLAGS) $< 
	@copy $@ $(dir_objetos) 
	@del $@ 
 
.PHONY: clean
clean:
	del $(dir_objetos)\*.obj    
	del $(dir_objetos)\*.mod    
	del $(ejecutable)



so what should I do?

regards

0 Kudos
7 Replies
Highlighted
Black Belt
22 Views

Your post has no relation to Intel Fortran, and it is unlikely that a pure Gfortran problem will be resolved here.

0 Kudos
Highlighted
Beginner
22 Views

I want to use this program in intel Fortran.
0 Kudos
Highlighted
22 Views

>>Error error #7002: Error in opening the compiled module file.
>>  Check INCLUDE paths.   [MODULE_COMPILER_DEPENDANT]
>> F:\Users\admin\Downloads\Compressed\FEconv-master\FEconv-master\source\mfm\module_mfm.f90 13

The module "module_compiler_dependent" was not found in your INCLUDE path (or not available)

Jim Dempsey
 

0 Kudos
Highlighted
Beginner
22 Views

Yes,which file format does it have example .f90 or .mod or .obj. Or this is only a module in any .f90 file? How could i access that and other similar modules? Regards
0 Kudos
Highlighted
Black Belt
22 Views

Module files have the .mod file extension. If you have all your source files in one subdirectory and build using Visual Studio, the compiler analyses the source file dependencies and compiles the source files in the order that honors those dependencies. The resulting .mod, .obj and .exe files are placed in the project Debug or Release subdirectory.

If you have source files in more than one subdirectory, or wish to have the .mod files placed in their own subdirectory, etc., you have to inform the compiler of their locations, by setting the INCLUDE environment variable or by using the /module:<path> option at the command line, or in the corresponding setting in one of the VS menus.

If you are not familiar with these requirements, it would be beneficial to practice building a small project with two or three source files that contain Fortran modules.

0 Kudos
Highlighted
Beginner
22 Views

My problem solved as i found and add libraries dependencies.no error.but this module is not useful for me.because I have a large project as I add all that's library dependencies it got to have about 1000 errors.most of them are about not finding libraries but the libraries are existed in Fortran console application under source item as I do add existing items from directory.so I confused what to do.some of sub directories have separated makefile themselves. Regards guys.
0 Kudos
Highlighted
Black Belt
22 Views

I find your #7 almost impossible to understand. 

Visual Studio does not use makefiles unless you make special provisions for doing so.

If you are building using makefiles, the normal procedure, regardless of which Fortran compiler is being used, is for the master makefile to spawn makes in each of the subdirectories, using the makefiles in those subdirectories. After all the objects have been produced, one or more linking steps are used to produce the EXE. If you are using this procedure, I do not see why things should be any different with Intel Fortran as compared to doing the same with Gfortran (the compiler options, of course, are different, but those are taken care of by the FOPTS in the makefile or a make.inc file).

0 Kudos