Skip to content

  • Projects
  • Groups
  • Snippets
  • Help
    • Loading...
    • Help
    • Support
    • Submit feedback
    • Contribute to GitLab
  • Sign in
D
darshan
  • Project overview
    • Project overview
    • Details
    • Activity
    • Releases
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 72
    • Issues 72
    • List
    • Boards
    • Labels
    • Milestones
  • Merge Requests 5
    • Merge Requests 5
  • Analytics
    • Analytics
    • Repository
    • Value Stream
  • Wiki
    • Wiki
  • Members
    • Members
  • Collapse sidebar
  • Activity
  • Graph
  • Create a new issue
  • Commits
  • Issue Boards
  • darshan
  • darshan
  • Issues
  • #69

Closed
Open
Opened Sep 24, 2015 by Shane Snyder@ssnyder
  • Report abuse
  • New issue
Report abuse New issue

Link failure with FORTRAN netcdf libraries

I got the same errors after change the .soft as you suggested.

After some more tests, I found a strange behavior. Here is my test program. % cat test.f program main include "mpif.h" include "pnetcdf.inc"

 integer ierr, ncid
 call MPI_Init(ierr)
 ierr = nfmpi_create(MPI_COMM_WORLD, "pnf_test.nc", NF_CLOBBER,
+                    MPI_INFO_NULL, ncid)

 ierr = nfmpi_enddef(ncid)

 ierr = nfmpi_close(ncid)
 call MPI_Finalize  (ierr)
 end program

Here is my compile command and it generated no error. % /soft/compilers/wrappers/gcc/mpif77 -I../../src/libf test.f -o test -L../../src/lib -lpnetcdf

However, once I removed the line of ierr = nfmpi_enddef(ncid)

the errors appeared: /soft/perftools/darshan/darshan-2.2.7/lib/libdarshan-mpi-io.a(darshan-pnetcdf.o): In function __wrap_ncmpi_close': /soft/perftools/darshan/darshan-2.2.7/build/darshan-2.2.7/darshan-runtime/lib/darshan-pnetcdf.c:152: undefined reference to ncmpi_close' /soft/perftools/darshan/darshan-2.2.7/lib/libdarshan-mpi-io.a(darshan-pnetcdf.o): In function __wrap_ncmpi_open': /soft/perftools/darshan/darshan-2.2.7/build/darshan-2.2.7/darshan-runtime/lib/darshan-pnetcdf.c:108: undefined reference to ncmpi_open' /soft/perftools/darshan/darshan-2.2.7/lib/libdarshan-mpi-io.a(darshan-pnetcdf.o): In function __wrap_ncmpi_create': /soft/perftools/darshan/darshan-2.2.7/build/darshan-2.2.7/darshan-runtime/lib/darshan-pnetcdf.c:62: undefined reference to ncmpi_create' collect2: ld returned 1 exit status

I guess the mpi compiler wrapper fails to place the user command-line library (-L../../src/lib -lpnetcdf in this case) after the internal libraries used by Darshan.

(via Ray)

Assignee
Assign to
triage-bugs
Milestone
triage-bugs
Assign milestone
Time tracking
None
Due date
None
2
Labels
compiler scripts defect
Assign labels
  • View project labels
Reference: darshan/darshan#69