<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<meta http-equiv="content-type" content="text/html; charset=ISO-8859-1">
</head>
<body bgcolor="#ffffff" text="#000000">
Dear all,<br>
<br>
while compiling pw (SVN version) on Leopard I stumbled in the
following error:<br>
<br>
<pre>gfortran -O3 -g -x f95-cpp-input -D__GFORTRAN -D__STD_F95 -D__FFTW -I../include -I../iotk/src -I../Modules -I. -c sum_band.f90
sum_band.f90:177.28:
CALL sym_rho ( nspin_mag, rho%of_g(1,1) )
1
Error: Element of assumed-shaped or pointer array passed to array dummy argument 'rhog' at (1)
sum_band.f90:187.48:
IF (.NOT. gamma_only) CALL sym_rho( nspin, rho%kin_g(1,1) )
1
Error: Element of assumed-shaped or pointer array passed to array dummy argument 'rhog' at (1)
</pre>
<br>
where the compiler used is:<br>
<br>
<pre>$ gfortran -v
Using built-in specs.
COLLECT_GCC=gfortran
COLLECT_LTO_WRAPPER=/usr/local/libexec/gcc/x86_64-apple-darwin10.7.0/4.6.0/lto-wrapper
Target: x86_64-apple-darwin10.7.0
Configured with: ../gcc-4.6.0/configure --enable-languages=fortran,c++
Thread model: posix
gcc version 4.6.0 (GCC)
</pre>
I have solved the problem on my own by replacing <tt>rho%of_g(1,1)</tt>
and <tt>rho%kin_g(1,1)</tt> with <tt>rho%of_g</tt> and <tt>rho%kin_g</tt>,
respectively (however, due to my low proficiency with Fortran and
despite I tested the binary, I'm not entirely sure they actually do
the same thing :D).<br>
<br>
I have also noticed that there is a rule in the PW Makefile that
breaks the parallel compilation:<br>
<br>
<tt>generate_vdW_kernel_table.x : generate_vdW_kernel_table.o<br>
$(LD) $(LDFLAGS) -o $@ \<br>
generate_vdW_kernel_table.o $(QEMODS) libpw.a
$(LIBOBJS) $(LIBS)<br>
- ( cd ../bin; ln -fs ../PW/$@ . )<br>
<br>
</tt><br>
should be<br>
<br>
<tt>generate_vdW_kernel_table.x : generate_vdW_kernel_table.o <i>libpw.a</i><br>
$(LD) $(LDFLAGS) -o $@ \<br>
generate_vdW_kernel_table.o $(QEMODS) libpw.a
$(LIBOBJS) $(LIBS)<br>
- ( cd ../bin; ln -fs ../PW/$@ . )<br>
<br>
</tt>with a dependency from libpw.a<br>
<br>
hope this helps,<br>
Cheers,<br>
Riccardo Di Meo<br>
</body>
</html>