Dismiss Notice
Join Physics Forums Today!
The friendliest, high quality science and math community on the planet! Everyone who loves science is here!

Trouble with including modules in fortran 90

  1. May 18, 2010 #1
    I have a fortran 90 program called 'mainProg.f90' that uses a module named 'output' which in turn uses the module 'netcdf'.

    In the program I have the command:
    use netcdf

    the netcdf.mod file is in the directory /home/makwana/cdf/netcdf-4.1.1/f90

    I try to compile the program using a makefile which contains the following statement:

    output.o: output.f90 indat.f90 fouryear.f90 deriv.f90
    $(FC) $(SPEC_OPT) $(FOPTS) -w -I/home/makwana/cdf/netcdf-4.1.1/f90 -c output.f90 -o output.o

    fouryear.f90, indat.f90, deriv.f90 are other modules which are working properly.

    It gives me the following error message:

    mainProg.f90(48): error #7002: Error in opening the compiled module file. Check INCLUDE paths. [NETCDF]
    Use output
    compilation aborted for mainProg.f90 (code 1)

    I do not know what could be the problem? Any help with this would be greatly appreciated.

  2. jcsd
Share this great discussion with others via Reddit, Google+, Twitter, or Facebook

Can you offer guidance or do you also need help?
Draft saved Draft deleted