{"action":"created","issue":{"url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/21","labels_url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/21/labels{/name}","comments_url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/21/comments","events_url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/21/events","html_url":"https://github.com/MPAS-Dev/MPAS-Release/issues/21","id":58753148,"number":21,"title":"NetCDF-Fortran not linking","user":{"login":"cponder","id":1598765,"avatar_url":"https://avatars.githubusercontent.com/u/1598765?v=3","gravatar_id":"","url":"https://api.github.com/users/cponder","html_url":"https://github.com/cponder","followers_url":"https://api.github.com/users/cponder/followers","following_url":"https://api.github.com/users/cponder/following{/other_user}","gists_url":"https://api.github.com/users/cponder/gists{/gist_id}","starred_url":"https://api.github.com/users/cponder/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/cponder/subscriptions","organizations_url":"https://api.github.com/users/cponder/orgs","repos_url":"https://api.github.com/users/cponder/repos","events_url":"https://api.github.com/users/cponder/events{/privacy}","received_events_url":"https://api.github.com/users/cponder/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":1,"created_at":"2015-02-24T15:20:29Z","updated_at":"2015-02-24T15:30:18Z","closed_at":null,"body":"I'm getting the following linkage errors in the MPAS-A 3.3 build:\r\n\r\n    undefined reference to `netcdf_mp_nf90_inquire_'\r\n    undefined reference to `netcdf_mp_nf90_inquire_attribute_'\r\n     undefined reference to `netcdf_mp_nf90_inq_attname_'\r\n    undefined reference to `netcdf_mp_nf90_inq_varid_'\r\n    undefined reference to `netcdf_mp_nf90_inquire_variable_'\r\n    <etc.>\r\n\r\nWhen I try the compile-command on the command-line, I can get it to link by adding\r\n\r\n     -L$NETCDF_F/lib -lnetcdff\r\n\r\nI've tried adding these settings to the build environment\r\n\r\n     export LDFLAGS=\"-L$NETCDF_F/lib -lnetcdff -L$NETCDF/lib -lnetcdf\"\r\n     export LIBS=\"-L$NETCDF_F/lib -lnetcdff\"\r\n     export FFLAGS=\"-L$NETCDF_F/lib -lnetcdff\"\r\n     export FCFLAGS=\"-L$NETCDF_F/lib -lnetcdff\"\r\n\r\nbut they never show up on the problematic compile line\r\n\r\nmpif90 -O3 -o atmosphere_model driver/*.o -L. -ldycore -lops -lframework -L/shared/apps/rhel-6.2/tools/cponder/PIO-1.9.15/Intel-15.0/lib -lpio -L/shared/apps/rhel-6.2/tools/cponder/PNetCDF-1.6.0/OpenMPI-1.8.4_Intel-15.0_CUDA-6.5/lib -lpnetcdf -L/shared/apps/rhel-6.2/tools/cponder/NetCDF-4.3.3-rc3/Intel-15.0_HDF5-1.8.14_OpenMPI-1.8.4_CUDA-6.5/lib -lnetcdf -I./external/esmf_time_f90 -L./external/esmf_time_f90 -lesmf_time\r\n\r\nHow do I pass the NetCDF-Fortran info into the build?"},"comment":{"url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/comments/75777721","html_url":"https://github.com/MPAS-Dev/MPAS-Release/issues/21#issuecomment-75777721","issue_url":"https://api.github.com/repos/MPAS-Dev/MPAS-Release/issues/21","id":75777721,"user":{"login":"douglasjacobsen","id":334984,"avatar_url":"https://avatars.githubusercontent.com/u/334984?v=3","gravatar_id":"","url":"https://api.github.com/users/douglasjacobsen","html_url":"https://github.com/douglasjacobsen","followers_url":"https://api.github.com/users/douglasjacobsen/followers","following_url":"https://api.github.com/users/douglasjacobsen/following{/other_user}","gists_url":"https://api.github.com/users/douglasjacobsen/gists{/gist_id}","starred_url":"https://api.github.com/users/douglasjacobsen/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/douglasjacobsen/subscriptions","organizations_url":"https://api.github.com/users/douglasjacobsen/orgs","repos_url":"https://api.github.com/users/douglasjacobsen/repos","events_url":"https://api.github.com/users/douglasjacobsen/events{/privacy}","received_events_url":"https://api.github.com/users/douglasjacobsen/received_events","type":"User","site_admin":false},"created_at":"2015-02-24T15:30:18Z","updated_at":"2015-02-24T15:30:18Z","body":"@cponder: It looks like you're trying to build the atmosphere model, so you should probably look at their [users guide](http://www2.mmm.ucar.edu/projects/mpas/mpas_atmosphere_users_guide_3.0.pdf)\r\n\r\nChapter 3 has instructions for how to build the model, but the short answer to your question is that all netcdf libraries must be installed in the same location and you pass that location using the NETCDF environment variable. Once you set that, all the library information is internally dealt with (i.e. you don't need to set LDFLAGS, LIBS, FFLAGS, or FCFLAGS)."}}