bin123apple / Fortran2Cpp

Fortran2Cpp: A new model designed for the Code translation between the Fortran and C++
Apache License 2.0
5 stars 3 forks source link

check 2.5k cpp files, why many failed compilation? #64

Open chunhualiao opened 2 months ago

chunhualiao commented 2 months ago

many Cpp files cannot be compiled, even though the pipeline is designed to make sure they can be compiled and run.

looking to Cpp files that failed compilation : leo

@bin123apple Please put the number of cpp files that failed compilation for you here

Why do we have Cpp files of two types?

Solution to try @bin123apple

chunhualiao commented 2 months ago
[liaoch@nid200268:~/workspace-cfs/Fortran2Cpp/data/readable_format/cpp]ls *.o |wc
   2195    2195   23284
[liaoch@nid200268:~/workspace-cfs/Fortran2Cpp/data/readable_format/cpp]ls *.err |wc
    334     334    4203

file012.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file015.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file020.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file023.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file027.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file038.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file040.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file046.cpp:32:10: fatal error: gtest/gtest.h: No such file or directory
file065.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file079.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file084.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file086.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file087.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file098.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1028.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1029.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1035.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1037.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1038.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1048.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1055.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1067.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1068.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1072.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1074.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1105.cpp:5:10: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
file1105.cpp:5:24: error: 'i' was not declared in this scope
file110.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1114.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1125.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file113.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1149.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1157.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1165.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1170.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1177.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1178.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1183.cpp:2:12: error: 'abs' was not declared in this scope
file1186.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file118.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1196.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1199.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1200.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1213.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1215.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1219.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file121.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file124.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1263.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1266.cpp:10:10: fatal error: gtest/gtest.h: No such file or directory

file1276.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1285.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1286.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1291.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1296.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1299.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1324.cpp:1:6: error: 'cout' in namespace 'std' does not name a type
file1327.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1334.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1338.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1339.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1343.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1344.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file134.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1357.cpp:21:10: fatal error: gtest/gtest.h: No such file or directory
file1358.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1366.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1375.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1381.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1383.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1386.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1390.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1394.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1398.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1409.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1412.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file141.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1421.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1430.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1432.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1434.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1448.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1449.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1457.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1471.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1488.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1489.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1490.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1507.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1510.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1529.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1530.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1536.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1540.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1541.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1542.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1547.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file154.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory

file1582.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1589.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file158.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1594.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1595.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1602.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file160.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1610.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1638.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1643.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1648.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1654.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1655.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1671.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1672.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file168.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1693.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1696.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1702.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1713.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1718.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1720.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1731.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1734.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1737.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1738.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file173.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1753.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1757.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1758.cpp:9:27: error: expected primary-expression before ';' token
file1758.cpp:10:27: error: expected primary-expression before ';' token
file1758.cpp:11:29: error: expected primary-expression before ';' token
file1758.cpp:12:25: error: expected primary-expression before ';' token
file1758.cpp:13:25: error: expected primary-expression before ';' token
file1758.cpp:14:25: error: expected primary-expression before ';' token
file1759.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1760.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1774.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1778.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1782.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file179.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1805.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1818.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1822.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file1830.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1832.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1834.cpp:17:32: error: 'dimX' was not declared in this scope
file1834.cpp:18:36: error: 'dimY' was not declared in this scope
file1834.cpp:18:36: error: 'dimY' was not declared in this scope
file1834.cpp:19:40: error: 'dimZ' was not declared in this scope
file1834.cpp:20:21: error: 'rho_in' was not declared in this scope
file1834.cpp:20:126: error: 'rho' was not declared in this scope
file1836.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file185.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1861.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1862.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1863.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1870.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1872.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1879.cpp:4:10: fatal error: mp_global.h: No such file or directory
file1886.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1888.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file189.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1912.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1913.cpp:2:29: error: 'pow' was not declared in this scope
file1918.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file1924.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1933.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1934.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file193.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1945.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1947.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file1951.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1963.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1966.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1967.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1968.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file196.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file1980.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1989.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1994.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file1995.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
/opt/cray/pe/gcc/11.2.0/snos/include/g++/array:111:56: error: 'std::array<_Tp, _Nm>::_M_elems' has incomplete type
file2042.cpp:1:10: fatal error: buffers.h: No such file or directory
file2044.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2048.cpp:4:10: error: 'size_t' was not declared in this scope; did you mean 'std::size_t'?
file2048.cpp:4:24: error: 'i' was not declared in this scope
file2055.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2057.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file2059.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2069.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2081.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2099.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file2106.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2117.cpp:53:22: error: 'i' is not captured
file2117.cpp:53:7: error: could not convert '<lambda closure object>main()::<lambda()>{}' from 'main()::<lambda()>' to 'm1::FuncType' {aka 'std::function<int()>'}
file2117.cpp:53:7: error: could not convert '<lambda closure object>main()::<lambda()>{}' from 'main()::<lambda()>' to 'm1::FuncType' {aka 'std::function<int()>'}
file2121.cpp:20:10: error: 'cout' is not a member of 'std'
file2121.cpp:20:53: error: 'endl' is not a member of 'std'
file2121.cpp:21:10: error: 'cout' is not a member of 'std'
file2121.cpp:21:53: error: 'endl' is not a member of 'std'
file2127.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2137.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2156.cpp:28:55: error: expected primary-expression before ';' token
file2156.cpp:29:55: error: expected primary-expression before ';' token
file2167.cpp:35:10: error: 'cout' is not a member of 'std'
file2167.cpp:35:43: error: 'endl' is not a member of 'std'
file2167.cpp:36:10: error: 'cout' is not a member of 'std'
file2167.cpp:36:39: error: 'endl' is not a member of 'std'
file217.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2192.cpp:18:14: error: 'cout' is not a member of 'std'
file2192.cpp:18:34: error: 'endl' is not a member of 'std'
file2194.cpp:40:14: error: 'cout' is not a member of 'std'
file2194.cpp:43:18: error: 'cout' is not a member of 'std'
file2194.cpp:45:14: error: 'cout' is not a member of 'std'
file2194.cpp:45:27: error: 'endl' is not a member of 'std'
file2202.cpp:19:9: error: 'printf' was not declared in this scope
file2203.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file2222.cpp:19:14: error: 'cout' is not a member of 'std'
file2222.cpp:19:34: error: 'endl' is not a member of 'std'
file2227.cpp:26:10: error: 'cout' is not a member of 'std'
file2227.cpp:26:49: error: 'endl' is not a member of 'std'
file2227.cpp:27:10: error: 'cout' is not a member of 'std'
file2227.cpp:27:49: error: 'endl' is not a member of 'std'
file2227.cpp:28:10: error: 'cout' is not a member of 'std'
file2227.cpp:28:49: error: 'endl' is not a member of 'std'
file2227.cpp:29:10: error: 'cout' is not a member of 'std'
file2227.cpp:29:49: error: 'endl' is not a member of 'std'
file2236.cpp:35:14: error: 'cout' is not a member of 'std'
file2239.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file223.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2240.cpp:33:18: error: 'cout' is not a member of 'std'
file2240.cpp:35:14: error: 'cout' is not a member of 'std'
file2240.cpp:35:27: error: 'endl' is not a member of 'std'
file2259.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file225.cpp:15:14: error: 'cout' is not a member of 'std'
file225.cpp:15:36: error: 'endl' is not a member of 'std'
file2269.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2277.cpp:4:27: error: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
file2277.cpp:6:13: error: 'e' was not declared in this scope
file2277.cpp:6:18: error: 'l' was not declared in this scope
file2277.cpp:6:24: error: 'k' was not declared in this scope
file2277.cpp:18:36: error: expected primary-expression before ';' token
file2277.cpp:19:36: error: expected primary-expression before ';' token
file2277.cpp:20:9: error: declaration of 'e' as multidimensional array must have bounds for all dimensions except the first
file2277.cpp:22:28: error: 'e' was not declared in this scope
file227.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2286.cpp:56:18: error: 'cout' is not a member of 'std'
file2286.cpp:58:14: error: 'cout' is not a member of 'std'
file2286.cpp:58:27: error: 'endl' is not a member of 'std'
file2294.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2299.cpp:1:42: error: 'std::string' has not been declared
file2301.cpp:52:14: error: 'cout' is not a member of 'std'
file2301.cpp:52:68: error: 'endl' is not a member of 'std'
file2324.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2332.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2334.cpp:46:9: error: 'printf' was not declared in this scope
file2335.cpp:6:20: error: 'invalid_argument' is not a member of 'std'
file2335.cpp:11:24: error: 'invalid_argument' is not a member of 'std'
file2335.cpp:36:18: error: 'cout' is not a member of 'std'
file2335.cpp:38:14: error: 'cout' is not a member of 'std'
file2335.cpp:38:27: error: 'endl' is not a member of 'std'
file233.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2344.cpp:5:10: fatal error: gtest/gtest.h: No such file or directory
file234.cpp:20:10: error: 'cout' is not a member of 'std'
file234.cpp:20:54: error: 'endl' is not a member of 'std'
file2365.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file236.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file2375.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file237.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2384.cpp:24:18: error: 'cout' is not a member of 'std'
file2384.cpp:26:14: error: 'cout' is not a member of 'std'
file2384.cpp:26:27: error: 'endl' is not a member of 'std'
file2387.cpp:5:40: error: expected primary-expression before ';' token
file2387.cpp:6:40: error: expected primary-expression before ';' token
file2387.cpp:7:39: error: expected primary-expression before ';' token
file2388.cpp:34:14: error: 'cout' is not a member of 'std'
file2388.cpp:34:74: error: 'endl' is not a member of 'std'
file2399.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2411.cpp:10:64: error: expected primary-expression before ';' token
file2418.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2430.cpp:13:10: error: 'cout' is not a member of 'std'
file2430.cpp:13:57: error: 'endl' is not a member of 'std'
file2434.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2441.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2463.cpp:29:14: error: 'cout' is not a member of 'std'
file2463.cpp:31:10: error: 'cout' is not a member of 'std'
file2463.cpp:31:23: error: 'endl' is not a member of 'std'
file2479.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file2480.cpp:44:22: error: 'cout' is not a member of 'std'
file2480.cpp:45:22: error: 'cout' is not a member of 'std'
file2480.cpp:45:98: error: 'endl' is not a member of 'std'
file2498.cpp:13:10: error: 'cout' is not a member of 'std'
file2498.cpp:13:61: error: 'endl' is not a member of 'std'
file2505.cpp:62:5: error: redefinition of 'int main()'
file2510.cpp:1:1: error: expected unqualified-id before 'delete'
file2510.cpp:2:1: error: expected unqualified-id before 'delete'
file2510.cpp:3:1: error: expected unqualified-id before 'delete'
file2510.cpp:4:1: error: expected unqualified-id before 'delete'
file2510.cpp:5:1: error: expected unqualified-id before 'delete'
file2510.cpp:6:1: error: expected unqualified-id before 'delete'
file2510.cpp:7:1: error: expected unqualified-id before 'delete'
file2510.cpp:8:1: error: expected unqualified-id before 'delete'
file2510.cpp:9:1: error: expected unqualified-id before 'delete'
file2510.cpp:10:1: error: expected unqualified-id before 'delete'
file2510.cpp:11:1: error: expected unqualified-id before 'delete'
file2510.cpp:12:1: error: expected unqualified-id before 'delete'
file2510.cpp:13:1: error: expected unqualified-id before 'delete'
file2518.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file2522.cpp:3:6: error: variable or field 'cuconmut' declared void
file2522.cpp:3:20: error: 'complex' is not a member of 'std'
file2522.cpp:3:28: error: expected primary-expression before 'double'
file2522.cpp:3:43: error: expected primary-expression before 'int'
file2522.cpp:10:6: error: variable or field 'cuconmut' declared void
file2522.cpp:10:20: error: 'complex' is not a member of 'std'
file2522.cpp:10:28: error: expected primary-expression before 'double'
file2522.cpp:10:43: error: expected primary-expression before 'int'
file257.cpp:40:6: error: redefinition of 'void great_rsd(double, float)'
file272.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file273.cpp:22:5: error: 'sub2' was not declared in this scope; did you mean 'sub1'?
file277.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file279.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file285.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file288.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file291.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file292.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file303.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file307.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file308.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file310.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file313.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file314.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file327.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file329.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file350.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file361.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file370.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file403.cpp:2:10: fatal error: mpi.h: No such file or directory
file408.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file409.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file426.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file438.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file440.cpp:2:1: error: 'Y' does not name a type
file440.cpp:3:1: error: 'Y' does not name a type
file447.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file451.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file473.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file506.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file512.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file520.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file524.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file526.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file532.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file534.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file535.cpp:1:1: error: expected unqualified-id before 'if'
file535.cpp:2:1: error: expected unqualified-id before 'else'
file535.cpp:3:1: error: expected unqualified-id before 'else'
file535.cpp:5:1: error: 'label100' does not name a type
file535.cpp:8:1: error: 'label200' does not name a type
file535.cpp:11:1: error: 'label300' does not name a type
file553.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file556.cpp:19:10: fatal error: gtest/gtest.h: No such file or directory
file566.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file584.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file616.cpp:3:9: error: 'fabs' was not declared in this scope
file618.cpp:15:19: error: too few arguments to function 'void acc_wait_async(int, int)'
file620.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file626.cpp:4:36: error: expected primary-expression before ';' token
file626.cpp:10:25: error: size of array 'TARBUF' is not an integral constant-expression
file629.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file635.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file640.cpp:3:10: fatal error: gtest/gtest.h: No such file or directory
file642.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file643.cpp:30:42: error: no match for call to '(main()::<lambda(const std::vector<int>&, const std::vector<bool>&, auto:1)>) (std::vector<int>&, __gnu_cxx::__alloc_traits<std::allocator<std::vector<bool> >, std::vector<bool> >::value_type&, <unresolved overloaded function type>)'
file643.cpp:31:42: error: no match for call to '(main()::<lambda(const std::vector<int>&, const std::vector<bool>&, auto:1)>) (std::vector<int>&, __gnu_cxx::__alloc_traits<std::allocator<std::vector<bool> >, std::vector<bool> >::value_type&, <unresolved overloaded function type>)'
file643.cpp:34:42: error: no match for call to '(main()::<lambda(const std::vector<int>&, const std::vector<bool>&, auto:1)>) (std::vector<int>&, __gnu_cxx::__alloc_traits<std::allocator<std::vector<bool> >, std::vector<bool> >::value_type&, <unresolved overloaded function type>)'
file643.cpp:35:42: error: no match for call to '(main()::<lambda(const std::vector<int>&, const std::vector<bool>&, auto:1)>) (std::vector<int>&, __gnu_cxx::__alloc_traits<std::allocator<std::vector<bool> >, std::vector<bool> >::value_type&, <unresolved overloaded function type>)'
file836.cpp:14:5: error: 'great_ne' was not declared in this scope
file836.cpp:15:14: error: 'v1' was not declared in this scope
file836.cpp:15:18: error: 'h1' was not declared in this scope
file836.cpp:16:14: error: 'jj1' was not declared in this scope
file836.cpp:16:19: error: 'bb1' was not declared in this scope
file836.cpp:17:14: error: 'p1' was not declared in this scope
file836.cpp:17:18: error: 'u1' was not declared in this scope
file836.cpp:19:19: error: 'm1' was not declared in this scope
file836.cpp:21:14: error: 'w1' was not declared in this scope
file836.cpp:23:14: error: 'cc1' was not declared in this scope
file836.cpp:23:19: error: 'aa1' was not declared in this scope
file836.cpp:26:14: error: 'x1' was not declared in this scope
file836.cpp:26:18: error: 'ii1' was not declared in this scope
file836.cpp:29:14: error: 'k1' was not declared in this scope
file836.cpp:29:18: error: 'a1' was not declared in this scope
file836.cpp:30:19: error: 'dd1' was not declared in this scope
file836.cpp:31:14: error: 'hh1' was not declared in this scope
file836.cpp:32:14: error: 'z1' was not declared in this scope
file836.cpp:39:14: error: 'c1' was not declared in this scope
file836.cpp:40:14: error: 'b1' was not declared in this scope
file836.cpp:43:14: error: 't1' was not declared in this scope; did you mean 'tm'?
file836.cpp:43:18: error: 'q1' was not declared in this scope
file839.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file845.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file861.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file863.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file880.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file883.cpp:20:14: error: 'cout' is not a member of 'std'
file883.cpp:20:34: error: 'endl' is not a member of 'std'
file884.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file888.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file890.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file893.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file899.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file922.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file926.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file937.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file939.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file945.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file958.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file959.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file966.cpp:4:10: fatal error: gtest/gtest.h: No such file or directory
file971.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file972.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file980.cpp:1:13: error: 'zero' was not declared in this scope
file980.cpp:2:13: error: 'zero' was not declared in this scope
file990.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file991.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
file996.cpp:1:10: fatal error: gtest/gtest.h: No such file or directory
file997.cpp:2:10: fatal error: gtest/gtest.h: No such file or directory
chunhualiao commented 2 months ago

many failed for me due to the google test header file is missing.

Most successfully compiled files do not use Google Test at all,

other reasons

chunhualiao commented 1 month ago

Action items to @bin123apple

bin123apple commented 1 month ago

For

why do we have two sets of cpp files: one without google tests headers, the other using google tests

The original pipeline does not forbid the gpt to generate google test to verify the code. If you don't want those google tests, we can regenerate the data pairs.

For

why some failed files still end up into your dataset even you workflow is designed to filter them out. This is the same as

See https://github.com/bin123apple/Fortran2Cpp/issues/53

bin123apple commented 1 month ago
  1. First find the cpp files using google test.
  2. Find the corresponding fortran files: save to a folder:
  3. Use GPT-4o to directly translate the fortran files to cpp files, using the following prompt template
You will translate Fortran code into equivalent cpp code. 

In the input fortran code, it might have the following format for unit testing:     

if (has_close_elements(a, n, 0.8)) then
    write(*,*) "Test case 2 failed: assertion failed"
    call exit(1)
end if

In the translated C++ code, you should use 'assert' for the unit test checking: 

 assert (has_close_elements(a, n, 0.8) == true);

Now please translate the following fortran code based on instructions above:

fortran_code here
bin123apple commented 1 month ago

Save it into a folder.

bin123apple commented 1 month ago

See https://github.com/bin123apple/Fortran2Cpp/blob/main/data/readable_format/cpp_with_googletest_regenerate/file1213.cpp for an example.