Strange mv error when compiling chapel project

P

Pete Williams

Guest
I'm trying to build a chapel project that wraps some fortran code to calculate modified Bessel functions of 2nd kind. I'm able to verify that I can link to the fortran code, but when I try to compile the project with unit tests getting strange error.

chpl test/spfuncs.chpl build/extern/calck0.o build/extern/calck1.o src/spfuncs.chpl --main-module spfuncs -o bin/test

mv: rename /var/folders/hp/xqmbhy491t5gbm1gt0ht7nh00000gn/T//chpl-pjw-89156.deleteme/test.tmp to bin/test: No such file or directory make[1]: * [/var/folders/hp/xqmbhy491t5gbm1gt0ht7nh00000gn/T//chpl-pjw-89156.deleteme/test.tmp] Error 1 error: compiling generated source make: * [bin/test] Error 1
same script name (spfuncs.chpl in test and src) causing the issue?

src/spfuncs.chpl

module SpecialFunctions {
extern {
double besk0_(double *);
double besek0_(double *);
double besk1_(double *);
double besek1_(double *);
}

proc besselk1(in z:real) : real {
return besk1_(c_ptrTo(z));
}

proc besselk0(in z:real) : real {
return besk0_(c_ptrTo(z));
}

proc main() {
writeln(besselk1(0.5)); // works in isolation
}
}



test/spfuncs.chpl

module spfuncs {

use UnitTest;
use SpecialFunctions;

proc test_bessel(test: borrowed Test) throws {
test.assertLessThan(besselk1(0.5) - 1.656441120003301, 1.0e-12);
test.assertLessThan(besselk0(0.5) - 0.9244190712276659, 1.0e-12);
}

proc main() throws {
UnitTest.main();
}
}


Thanks

Continue reading...
 
Top