I am trying to build PyNE from source in my machine with Ubuntu 21.04, and I have run into this failure in ALPHAD.f:
[ 35%] Building Fortran object src/CMakeFiles/alphad.dir/ensdf_processing/ALPHAD/alphad.f.o
/home/mmagan/PyNE/pyne/src/ensdf_processing/ALPHAD/alphad.f:960:71:
960 | CALL CNVU2S(hf(l),0.0,hfsav(ihf),LEN(hfsav(ihf))&
| 1
Error: Syntax error in argument list at (1)
/home/mmagan/PyNE/pyne/src/ensdf_processing/ALPHAD/alphad.f:941:49:
923 | CALL CNVU2S(hf(l),dhf(l),hfsav(ihf),LEN(hfsav(ihf)), &
| 2
......
941 | CALL CNVU2S(hf(l)-dhf(l),0.0,hfsav(ihf), &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
/home/mmagan/PyNE/pyne/src/ensdf_processing/ALPHAD/alphad.f:949:49:
923 | CALL CNVU2S(hf(l),dhf(l),hfsav(ihf),LEN(hfsav(ihf)), &
| 2
......
949 | CALL CNVU2S(hf(l)+dhf(l),0.0,hfsav(ihf), &
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
/home/mmagan/PyNE/pyne/src/ensdf_processing/ALPHAD/alphad.f:1063:30:
923 | CALL CNVU2S(hf(l),dhf(l),hfsav(ihf),LEN(hfsav(ihf)), &
| 2
......
1063 | CALL CNVU2S(hf(l),0.0,outstr(5),10,doutst(5),0)
| 1
Error: Type mismatch between actual argument at (1) and actual argument at (2) (REAL(8)/REAL(4)).
make[2]: *** [src/CMakeFiles/alphad.dir/build.make:82: src/CMakeFiles/alphad.dir/ensdf_processing/ALPHAD/alphad.f.o] Error 1
make[1]: *** [CMakeFiles/Makefile2:271: src/CMakeFiles/alphad.dir/all] Error 2
make: *** [Makefile:149: all] Error 2
--------------------
--------------------
Traceback (most recent call last):
File "/home/mmagan/PyNE/pyne/./setup.py", line 420, in <module>
main()
File "/home/mmagan/PyNE/pyne/./setup.py", line 404, in main
main_safe(ns)
File "/home/mmagan/PyNE/pyne/./setup.py", line 396, in main_safe
main_body(ns)
File "/home/mmagan/PyNE/pyne/./setup.py", line 379, in main_body
rtn = subprocess.check_call(['make'] + ns.make_args, cwd=ns.build_dir)
File "/usr/lib/python3.9/subprocess.py", line 373, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command '['make']' returned non-zero exit status 2.
It seems my CMake is configuring Fortran reals as 8-byte by default, and that makes the 0.0 an invalid argument for CNVU2S(). Changing these 0.0 to 0.0_4 allows the code to compile, but I am 99% certain this is an issue in my setup as the reals should be 4-byte. Can anyone help me?