dgasmith / gau2grid

Fast computation of a gaussian and its derivative on a grid.
https://gau2grid.readthedocs.io/en/latest/
BSD 3-Clause "New" or "Revised" License
29 stars 15 forks source link

windows and clang-cl malloc #52

Closed loriab closed 5 years ago

loriab commented 5 years ago

clang-cl + win is misbehaving on psi4. seeing if this is a fix. refinements later

-- Build files have been written to: D:/a/1/b/build/external/upstream/libint/libint_external-prefix/src/libint_external-build
[19/41] Performing configure step for 'gau2grid_external'
loading initial cache file D:/a/1/b/build/external/upstream/gau2grid/gau2grid_external-prefix/tmp/gau2grid_external-cache-Debug.cmake
-- The C compiler identification is Clang 7.0.1
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang-cl.exe
-- Check for working C compiler: C:/Program Files/LLVM/bin/clang-cl.exe -- works
-- Detecting C compiler ABI info
-- Detecting C compiler ABI info - done
-- Detecting C compile features
-- Detecting C compile features - done
-- Setting option MAX_AM: 6
-- Setting option SPHERICAL_ORDER: gaussian
-- Setting option CARTESIAN_ORDER: row
-- Setting option MAX_AM: 6
-- Setting option CMAKE_BUILD_TYPE: Debug
-- Setting option ENABLE_XHOST: OFF
-- Setting option BUILD_FPIC: ON
-- Setting option BUILD_SHARED_LIBS: OFF
-- Setting option ENABLE_GENERIC: OFF
-- Setting option CMAKE_INSTALL_LIBDIR: lib
-- Setting (unspecified) option PYMOD_INSTALL_LIBDIR: /
-- Setting (unspecified) option INSTALL_PYMOD: OFF
-- Setting (unspecified) option NATIVE_PYTHON_INSTALL: OFF
-- gau2grid install: D:/a/1/b/build/stage
-- Found PythonInterp: C:/tools/miniconda3/python.exe (found suitable version "3.6.9", minimum required is "2.7") 
-- Found PythonLibs: C:/tools/miniconda3/libs/Python36.lib
-- Found Python 3.6: C:/tools/miniconda3/python.exe (found version 3.6.9)
-- Configuring done
-- Generating done
-- Build files have been written to: D:/a/1/b/build/external/upstream/gau2grid/gau2grid_external-prefix/src/gau2grid_external-build
[20/41] Performing build step for 'gau2grid_external'
FAILED: external/upstream/gau2grid/gau2grid_external-prefix/src/gau2grid_external-stamp/gau2grid_external-build 
cmd.exe /C "cd /D D:\a\1\b\build\external\upstream\gau2grid\gau2grid_external-prefix\src\gau2grid_external-build && C:\tools\miniconda3\Library\bin\cmake.exe --build . && C:\tools\miniconda3\Library\bin\cmake.exe -E touch D:/a/1/b/build/external/upstream/gau2grid/gau2grid_external-prefix/src/gau2grid_external-stamp/gau2grid_external-build"
[1/8] Generating gau2grid.h, gau2grid_orbital.c, gau2grid_phi.c, gau2grid_deriv1.c, gau2grid_deriv2.c, gau2grid_spherical.c, gau2grid_helper.c
[2/8] Building C object CMakeFiles\gg.dir\gau2grid_phi.c.obj
FAILED: CMakeFiles/gg.dir/gau2grid_phi.c.obj 
C:\PROGRA~1\LLVM\bin\clang-cl.exe  /nologo   /DWIN32 /D_WINDOWS /W3 /MDd /Zi /Ob0 /Od /RTC1   -std=c11 /showIncludes /FoCMakeFiles\gg.dir\gau2grid_phi.c.obj /FdCMakeFiles\gg.dir\gg.pdb -c gau2grid_phi.c
clang-cl.exe: warning: unknown argument ignored in clang-cl: '-std=c11' [-Wunknown-argument]
gau2grid_phi.c(11,10):  fatal error: 'mm_malloc.h' file not found
#include <mm_malloc.h>
         ^~~~~~~~~~~~~
1 error generated.
codecov[bot] commented 5 years ago

Codecov Report

Merging #52 into master will increase coverage by 0.01%. The diff coverage is 100%.

loriab commented 5 years ago

This is unlovely but does the trick for psi4 azure (windows + clang-cl). I'd like to see that make it all the way to a working psi4 with the new ordering system before tidying this up. Normally, I'd just move the MS test above the clang test so clang&&ms wasn't a separate ifdef section, but that's just what you reversed a few months ago to reach the current logic.