<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=utf-8">
</head>
<body text="#000000" bgcolor="#FFFFFF">
Dear PETSc/SLEPc users,<br>
<br>
I am encountering a problem when I try to isolate my calls to
PETSc/SLEPc routines in a module. When I have a single file
everything works fine, but when I have, say:<br>
<blockquote>- modA.f90 (Independant modules)<br>
- modB.F90 (Contains all the calls to PETSc and SLEPc)<br>
- main.f90 or main.F90<br>
</blockquote>
When calling EPSSolve, I keep having the error "[1]PETSC ERROR:
Caught signal number 8 FPE: Floating Point Exception,probably divide
by zero" plus "User provided function() line 0 in unknown file."<br>
With gdb: "Thread 1 "main" received signal SIGFPE, Arithmetic
exception. 0x00007ffff1662cf6 in dlamch_ () from
/home/linuxbrew/.linuxbrew/lib/libopenblas.so.0"<br>
<br>
The PETSc/SLEPc module looks like<br>
USE SlepcEps<br>
IMPLICIT NONE<br>
#include <slepc/finclude/slepcepsdef.h><br>
<br>
which is the only preprocessed directive used. I tried to add more
(petscsys, petscmat, petscvec, slepseps), tried to change main.f90
to main.F90 and incorporate the preprocessed directives there as
well without any effect. My code calls CHKERRQ(ierr) systematically.
My makefile looks like<br>
<br>
include ${SLEPC_DIR}/lib/slepc/conf/slepc_common<br>
INCL = -I$(PETSC_DIR)/include/ -I$(SLEPC_DIR)/include/<br>
%.o: %.f90<br>
$(FC) $(FLAGS) $(INCL) -c $< -o $@ $(SLEPC_EPS_LIB)<br>
%.o: %.F90<br>
$(FC) $(FLAGS) $(INCL) -c $< -o $@ $(SLEPC_EPS_LIB)<br>
$(EXEC): $(OBJS)<br>
$(FC) $(FLAGS) $(INCL) $(OBJS) -o $@ $(SLEPC_EPS_LIB)<br>
<br>
Could you spot anything I am doing wrong or dangerous? Furthermore,
do you know how to avoid the warnings "Same actual argument
associated with INTENT(IN) argument 'errorcode' and INTENT(OUT)
argument 'ierror' at (1)" when calling CHKERRQ(ierr) when ierr is
declared as INTEGER?<br>
<br>
Thanks in advance for your continued support,<br>
<br>
Thibaut<br>
</body>
</html>