[R-pkg-devel] Obscure-to-me parallel make issue

Tomas Kalibera tom@@@k@||ber@ @end|ng |rom gm@||@com
Fri Apr 1 18:09:29 CEST 2022


On 4/1/22 17:46, Peter Green wrote:
> I am having persistent but difficult-to-reproduce compilation errors 
> for some CRAN tests on my package Nmix. These may be instances of the 
> 'parallel make' problem. A typical error message is
> ---
>    30 |         use f2cio
>       |                 1
> Fatal Error: Cannot open module file ‘f2cio.mod’ for reading at (1): 
> No such file or directory
> ---
>
> Apart from Nmix_init.c, my src directory has 8 source files:
> ---
> .f : Nmix-sub3z, Nmix-aux, pnorm, rgamma, RNGfns
> .c: wrapper.c
> .f90: fef2cio, f2cio (each defining modules of the same name)
> ---
>
> The dependency structure among them is summarised by:
> ---
> Nmix-sub3z.f
>     calls pnorm.f rgamma.f Nmix-aux.f RNGfns.f
>     uses    fef2cio.mod f2cio.mod
> fef2cio.f90
>     uses  f2cio.mod
> Nmix-aux.f
>     calls rgamma.f RNGfns.f
> pnorm.f
>     calls RNGfns.f
> rgamma.f
>     calls RNGfns.f
> RNGfns.f
>     calls wrapper.c
> ---
>
> My Makevars is:
> ---
> C_OBJS = wrapper.o Nmix_init.o
> FT_OBJS = Nmix-aux.o Nmix-sub3z.o RNGfns.o f2cio.o fef2cio.o pnorm.o 
> rgamma2.o
> all: $(SHLIB) clean
> $(SHLIB): $(FT_OBJS) $(C_OBJS)
> f2cio.mod: f2cio.o
> fef2cio.mod: fef2cio.o f2cio.o
> Nmix-sub3z.o: f2cio.mod fef2cio.mod
> clean:
>     @rm -rf *.mod *.o
> ---
>
> What dependency am I failing to capture? Or is there some other fault 
> in the Makevars? Any clues welcome!

Maybe that fef2cio.o depends on f2cio.mod

make -d might be useful for finding out what is make doing and why.

It might be easier to debug via an incremental serial build - once the 
build succeeds (e.g. by coincidence), touch specific files and run 
"make" again to see if things that should be rebuilt actually are.

Tomas

>
> Peter Green
>
>
> ______________________________________________
> R-package-devel using r-project.org mailing list
> https://stat.ethz.ch/mailman/listinfo/r-package-devel



More information about the R-package-devel mailing list