Fatal error : Can't open module file ‘dmph_maphys_mod.mod’
I want to call Maphys from my code ... I installed Maphys with spack and used the examples as a starting point namely, xmph_examplekv.F90 and just changed the fist lines to use single real(D) :
Program DMPH_example_ff
!* Modules & co. *!
Use DMPH_maphys_mod
Use DMPH_sparse_matrix_mod, Only : &
DMPH_sm_free
Use DMPH_toolkit_mod
Implicit None
Include 'mpif.h'
and the rest is the same as the example. This is my makefile:
OPENMPI_DIR =/spackMaphys/spack/opt/spack/linux-x86_64/gcc-5.4.0/openmpi-2.0.1-5ypph4eab66ku63udgkqjcqedjy7cwee
MAPHYS_DIR =/spackMaphys/spack/opt/spack/linux-x86_64/gcc-5.4.0/maphys-0.9.6-2avvu6jyqe7ozagr2wrpogf224d4wjtj
OBJF = testMAPHYS1-Fortran.o
linklibMAPHYS:=-L$(MAPHYS_DIR)/lib -lmaphys -lpackcg -lpackgmres -lslatec -lmph_unittest
linklibTOOLKIT:=-L$(MAPHYS_DIR)/lib -lmph_toolkit
DEBUG = -g -DDEBUG_M
IMPI = -I$(OPENMPI_DIR)/include # Additional MPI include path
LMPI = -L$(OPENMPI_DIR)/lib # Additional MPI linker flags
FFLAGS = # Additional Fortran compiler flags
FOPTFLAGS = -O3 #
INCLUDE = -I$(MAPHYS_DIR)/include
LIBHIPS = $(linklibMAPHYS) $(linklibTOOLKIT)
MPIFC = mpif90
MPIFC_OPT = $(IMPI) $(FFLAGS) $(FOPTFLAGS) $(INCLUDE) $(DEBUG)
LD_OPT = -lio -lm $(LIBHIPS) $(LMPI)
MPILD = $(MPIFC)
MPILD_OPT = $(LD_OPT)
default: testMAPHYS1-Fortran.ex
testMAPHYS1-Fortran.o:maphys1.F90
$(MPIFC) $(MPIFC_OPT) $< -c -o $@
testMAPHYS1-Fortran.ex:$(OBJF) $(LIBHIPS)
$(MPILD) $^ $(MPILD_OPT) -o $@
but I got this error when typing make:
$ make
mpif90 -I/spackMaphys/spack/opt/spack/linux-x86_64/gcc-5.4.0/openmpi-2.0.1-5ypph4eab66ku63udgkqjcqedjy7cwee/include -O3 -I/spackMaphys/spack/opt/spack/linux-x86_64/gcc-5.4.0/maphys-0.9.6-2avvu6jyqe7ozagr2wrpogf224d4wjtj/include -g -DDEBUG_M maphys1.F90 -c -o testHIPS1-Fortran.o
maphys1.F90:28:6:
Use DMPH_maphys_mod
1
Fatal Error: Can't open module file ‘dmph_maphys_mod.mod’ for reading at (1): No such file or directory
compilation terminated.
Makefile:28: recipe for target 'testHIPS1-Fortran.o' failed
make: *** [testHIPS1-Fortran.o] Error 1
any idea,
Edited by Ghost User