I don't see a compile of ex2f in the copy/paste. Assuming that ran correctly and [ex2f was not an old binary lying arround] - it implies that your project file has bugs.
Perhaps there is a verbose mode that it provides that you can use to see the exact compile command its using. I suspect its missing the equivalent of the following options: -L/cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/petsc-3.6.1_win64_impi_vs2008/lib -lpetsc Satish On Thu, 27 Aug 2015, TAY wee-beng wrote: > > On 27/8/2015 11:38 PM, Satish Balay wrote: > > Are you able to compile and run both C and fortran petsc examples > > using the corresponding makefile? > > > > Satish > Hi Satish, > > Yes, there is no problem except for a minor warning: > > /*$ make ex2*//* > *//*/cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/bin/win32fe/win32fe cl -o ex2.o > -c -MT -wd4996 -Z7 -I/cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/include > -I/cygdrive/c*//* > *//*/wtay/Backup/Codes/petsc-3.6.1/petsc-3.6.1_win64_impi_vs2008/include > -I/cygdrive/c/Program\ Files\ > \(x86\)/IntelSWTools/mpi/5.1.1.110/intel64/include `pwd`/e*//* > *//*x2.c*//* > *//*ex2.c*//* > *//*You are using an Intel supplied intrinsic header file with a third-party > compiler.*//* > *//*/cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/bin/win32fe/win32fe cl -MT > -wd4996 -Z7 -o ex2 ex2.o > -L/cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/petsc-3.6.1_win64_im*//* > *//*pi_vs2008/lib -lpetsc > -L/cygdrive/c/wtay/Lib/petsc-3.6.1_win64_impi_vs2008/lib -lflapack -lfblas > /cygdrive/c/Program\ Files\ \(x86\)/IntelSWTools/mpi/5.1.1.110*//* > *//*/intel64/lib/debug/impi.lib /cygdrive/c/Program\ Files\ > \(x86\)/IntelSWTools/mpi/5.1.1.110/intel64/lib/impicxx.lib > /cygdrive/c/Program\ Files\ \(x86\)/IntelSWTo*//* > *//*ols/mpi/5.1.1.110/intel64/lib/impicxxd.lib /cygdrive/c/Program\ Files\ > \(x86\)/IntelSWTools/mpi/5.1.1.110/intel64/lib/libmpi_ilp64.lib Gdi32.lib > User32.lib Adva*//* > *//*pi32.lib Kernel32.lib Ws2_32.lib*//* > *//*/usr/bin/rm -f ex2.o*//* > *//* > *//*tsltaywb@1C3YYY1 > /cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/src/ksp/ksp/examples/tutorials*//* > *//*$ ./ex2f*//* > *//*Norm of error 0.1192E-05 iterations 4*//* > *//* > *//*tsltaywb@1C3YYY1 > /cygdrive/c/wtay/Backup/Codes/petsc-3.6.1/src/ksp/ksp/examples/tutorials*//* > *//*$ mpiexec -n 2 ./ex2f*//* > *//*Norm of error < 1.e-12,iterations 7*/ > > > > > On Thu, 27 Aug 2015, TAY wee-beng wrote: > > > > > Hi, > > > > > > I used to compile and link using PETSc 3.6.0 + MPICH2 on VS2008. > > > > > > Due to some MPICH2 issues, I am trying to use Intel MPI (newest version). > > > Building and testing of PETSc 3.6.1 with Intel MPI all went smoothly. > > > > > > However, I now have problem linking the files on VS2008 to create the > > > final > > > exe. The error is: > > > > > > /*1>Compiling manifest to resources...*//* > > > *//*1>Microsoft (R) Windows (R) Resource Compiler Version 6.0.5724.0*//* > > > *//*1>Copyright (C) Microsoft Corporation. All rights reserved.*//* > > > *//*1>Linking...*//* > > > *//*1>global.obj : error LNK2019: unresolved external symbol MATCREATEAIJ > > > referenced in function GLOBAL_DATA_mp_ALLO_VAR*//* > > > *//*1>global.obj : error LNK2019: unresolved external symbol > > > MATSETFROMOPTIONS > > > referenced in function GLOBAL_DATA_mp_ALLO_VAR*//* > > > *//*...*//* > > > *//*1>PETSc_solvers.obj : error LNK2019: unresolved external symbol > > > VECGETARRAY referenced in function > > > PETSC_SOLVERS_mp_P_MATRIX_SOLV_PETSC*//* > > > *//*1>PETSc_solvers.obj : error LNK2019: unresolved external symbol > > > VECRESTOREARRAY referenced in function > > > PETSC_SOLVERS_mp_P_MATRIX_SOLV_PETSC*//* > > > *//*1>PETSc_solvers.obj : error LNK2019: unresolved external symbol > > > DMLOCALTOLOCALBEGIN referenced in function > > > PETSC_SOLVERS_mp_DM_UPDATE_ARRAY*//* > > > *//*1>PETSc_solvers.obj : error LNK2019: unresolved external symbol > > > DMLOCALTOLOCALEND referenced in function > > > PETSC_SOLVERS_mp_DM_UPDATE_ARRAY*//* > > > *//*1>ibm3d_high_Re.obj : error LNK2019: unresolved external symbol > > > PETSCINITIALIZE referenced in function MAIN__*//* > > > *//*1>C:\Obj_tmp\ibm3d_IIB_mpi_old\Debug\ibm3d_IIB_mpi.exe : fatal error > > > LNK1120: 74 unresolved externals*//* > > > *//*1>*//* > > > *//*1>Build log written to > > > "file://C:\Obj_tmp\ibm3d_IIB_mpi_old\Debug\BuildLog.htm"*//* > > > *//*1>ibm3d_IIB_mpi_old - 165 error(s), 0 warning(s)*//* > > > *//*========== Rebuild All: 0 succeeded, 1 failed, 0 skipped ==========*/ > > > > > > I did not do much changes since the prev PETSc worked. I only changed the > > > directory $(PETSC_DIR) and $(IMPI) to the new directory in win7 > > > environment > > > variables. I wonder what's wrong. > > > > > > > >
