[petsc-users] Can't compile code after upgrading to VS2017 and Intel One API + PETSc 3.15

TAY wee-beng zonexo at gmail.com
Wed Apr 14 02:20:39 CDT 2021


Hi Mark,

I'm not sure what's wrong.

In VS2017 + Intel oneAPI,

even after adding the full path:

#include 
<D:/Lib/petsc-3.15.0_win64_impi_vs2017/include/petsc/finclude/petscksp.h>

I got a new error:

/*Compiling with Intel® Fortran Compiler Classic 2021.2.0 [Intel(R) 
64]...*//*
*//*ex2f.F90*//*
*//*petscksp.h(8): #error: can't find include file: 
petsc/finclude/petscpc.h*//*
*//*ex2f : error PRJ0019: A tool returned an error code*/

Note that I have also specified the include dir in the properties:

/*Debug/;$(PETSC_DIR);$(PETSC_DIR)/include;$(I_MPI_ONEAPI_ROOT)/include*/

I also tried in cygwin:

/*export PETSC_DIR=`pwd`*//*
*//*export PETSC_ARCH=petsc-3.15.0_win64_impi_vs2017*//*
*//*make ex2f*/

I got the error:

/*$ make ex2f*//*
*//*makefile:41: 
/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/share/petsc/examples/src/ksp/ksp/tutorials/lib/petsc/conf/te*//*st: 
No such file or directory*//*
*//*make: *** No rule to make target 
'/cygdrive/d/Lib/petsc-3.15.0_win64_impi_vs2017/share/petsc/examples/src/ksp/ksp/tutori*//*als/lib/petsc/conf/test'. 
Stop.*/

Somehow it just doesn't work. Building the library has no problem though.

I wonder what's wrong.


Thank you very much.

Yours sincerely,

================================================
TAY Wee-Beng 郑伟明 (Zheng Weiming)
Personal research webpage: _http://tayweebeng.wixsite.com/website_
Youtube research showcase: _https://goo.gl/PtvdwQ_
linkedin: _https://www.linkedin.com/in/tay-weebeng_
================================================

On 14/4/2021 9:31 am, Mark Adams wrote:
> PETSc has changed Fortran syntax since v3.9. You should upgrade. Look 
> at examples for how to use modules etc.
>
>
>     /*Compiling with Intel® Fortran Compiler Classic 2021.2.0
>     [Intel(R) 64]...*//*
>     *//*global.F90*//*
>     *//*global.F90(3): #error: can't find include file:
>     petsc/finclude/petsc.h*//*
>     *//*global.F90(937): #error: can't find include file:
>     petsc/finclude/petsc.h*/
>
>
> It looks like you might not have your PETSC_ARCH variable set. You 
> should get a full path to /finclude/petsc.h. Look at the compile line.
>
> There are PETSc examples that you you can make to see an example of a 
> correct make. For example,
> > cd petsc/src/ksp/ksp/tutorials
>  > make ex2f
>
> should make an executable and you can look at the compile and link 
> lines, and compare to what you are using.
>
> Mark
>
>
>     -- 
>
>     Thank you very much.
>
>     Yours sincerely,
>
>     ================================================
>     TAY Wee-Beng 郑伟明 (Zheng Weiming)
>     Personal research webpage: _http://tayweebeng.wixsite.com/website
>     <http://tayweebeng.wixsite.com/website>_
>     Youtube research showcase: _https://goo.gl/PtvdwQ
>     <https://goo.gl/PtvdwQ>_
>     linkedin: _https://www.linkedin.com/in/tay-weebeng
>     <https://www.linkedin.com/in/tay-weebeng>_
>     ================================================
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.mcs.anl.gov/pipermail/petsc-users/attachments/20210414/837c2c84/attachment.html>


More information about the petsc-users mailing list