-
Notifications
You must be signed in to change notification settings - Fork 50
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
opm-core does not build #58
Comments
I don't have that particular setup easily available. From my own testing I can only state that OPM-Core as of 643d54e builds fine on Ubuntu 10.04 and CentOS 5. Would you mind uploading your |
By the way this appears, at least superficially, to be related to rolk's issue #55. |
In the interest of debugging this issue further, if you have the time and inclination, would you mind doing a bit of command line investigation? What, if anything, do you have to do to have either (or preferably both) of the following programs link and produce the expected results ( In Fortran Program TestLapack
Implicit None
Integer, Parameter :: k8 = Kind(1.0d0)
Integer, Parameter :: n = 2
Integer :: IPiv(n), Info, nrhs, lda, ldb, m, i
Real (Kind=k8) :: A(n,n), b(n)
External DGESV
A(1,1) = 2.0_k8
A(2,1) = 1.0_k8
A(1,2) = 1.0_k8
A(2,2) = 2.0_k8
b = 1.0_k8
m = n
nrhs = 1
lda = n
ldb = n
Call DGESV (m, nrhs, A, lda, IPiv, b, ldb, Info)
If (Info == 0) Then
Do i = 1,n
Write (*,*) b(i)
End Do
Else
Write (*,*) 'Info = ', Info
End If
End Program TestLapack and in C #include <stdio.h>
void
dgesv_(const int *n, const int *nrhs, double *A, const int *lda,
int *ipiv, double *b, const int *ldb, int *info);
int
main(void)
{
int i, n, nrhs, lda, ldb, info;
int ipiv[2];
double A[2*2] = { 2.0, 1.0, 1.0, 2.0 }, b[2] = { 1.0, 1.0 };
n = lda = ldb = 2;
nrhs = 1;
dgesv_(&n, &nrhs, A, &lda, ipiv, b, &ldb, &info);
if (info == 0) {
for (i = 0; i < 2; i++) {
printf("%.12f\n", b[i]);
}
}
else {
printf("info = %d\n", info);
}
return 0;
} |
Time is certainly an issue, since it could be used to secure funding. Inclination is certainly there, building opm-upscaling on RH5 and latest Ubuntu LTS is an absolute must. Failing to do so already has large impact on everybody putting the code to good use. Right now we have build issues on both platforms and it is draining all my time. Both the fortran and the c code above failed to build on Ubuntu 12.04, I will not have time to figure out why until tomorrow. This is the output: $ gcc testlapack.c $ gfortran testlapack.f Program TestLapack Program TestLapack Implicit None Implicit None ... and so on for another page. Thanks for checking it out. |
Thanks. Regarding the Fortran example: I forgot to specify that it's free-form Fortran 95 so the file needs a '.f90' extension. Still, let's focus on the C example. If I compile it on my work-station using the command $ gcc testlapack.c -llapack -lblas I get an executable that runs and produces the expected result: $ ./a.out
0.333333333333
0.333333333333 Moreover, $ ldd ./a.out |sed -E 's/^[[:space:]]+/ /'
linux-vdso.so.1 => (0x00007fff1252e000)
liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f4e2c1a0000)
libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f4e2b805000)
libc.so.6 => /lib/libc.so.6 (0x00007f4e2b481000)
libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f4e2b194000)
libm.so.6 => /lib/libm.so.6 (0x00007f4e2af11000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f4e2acf9000)
/lib64/ld-linux-x86-64.so.2 (0x00007f4e2cdc9000) In other words, I get the ATLAS editions of LAPACK and BLAS linked in on my work-station (Ubuntu 10.04.4 LTS). I have the If I were to do the linking more explicitly, I'd say something like $ gcc testlapack.c -L/usr/lib/atlas -Wl,-rpath -Wl,/usr/lib/atlas \
-l:liblapack.so.3gf -l:libblas.so.3gf and I would still get essentially the same $ ldd ./a.out |sed -E 's/^[[:space:]]+/ /'
linux-vdso.so.1 => (0x00007fff68ae8000)
liblapack.so.3gf => /usr/lib/atlas/liblapack.so.3gf (0x00007f3128d6b000)
libblas.so.3gf => /usr/lib/atlas/libblas.so.3gf (0x00007f31283d0000)
libc.so.6 => /lib/libc.so.6 (0x00007f312802c000)
libgfortran.so.3 => /usr/lib/libgfortran.so.3 (0x00007f3127d3f000)
libm.so.6 => /lib/libm.so.6 (0x00007f3127abc000)
libgcc_s.so.1 => /lib/libgcc_s.so.1 (0x00007f31278a4000)
/lib64/ld-linux-x86-64.so.2 (0x00007f3129974000) If neither of these commands work in your case, I think I will need to see the |
Linking with lapack and blas did the trick. I got the following: This is ldd from the fortran version: |
Good. This means that there is at least one working LAPACK/BLAS pair on your system. Unfortunately, this also means that we will have to dig a little deeper to establish what is actually happening when building OPM-Core. Earlier you noted that commit 643d54e leads to build failure. This is speculation: Is there possibly some adverse interaction with SuperLU going on? Did you use To answer these questions I think I will need the |
Just an update: Roland Kaufmann (@rolk) came to visit our office today and we now think we know what's happening. Apparently, there is some kind of incompatibility between Ubuntu 12.04's We are working on a fix or work-around. |
@alfbr @bska ./configure --with-superlu-lib or dunecontrol --configure-opts='--with-superlu-lib' --module=opm-core autogen : configure You may have to add the changesets in #62 (before you run configure) to make it compile. Note that this is a (somewhat unsatisfying) work-around: However, if I tried to force it to use the reference BLAS all over, I got strange linker errors (which I haven't figured out yet). |
It somehow seems that adding the changesets above enable you to build with the reference BLAS by default (linking dynamically to SuperLU), although I am not at the moment quite able to explain why only these libraries pulled in ATLAS and not the main library (it may also be that I have now configured my machine into a non-replicable state), so please test if you are able to make a build after pulling the changesets but before trying to use the static libraries. |
Can someone provide a Makefile and config.log? I would like to see what is actually found. |
@alfbr This pretty much looks like a mixup of your system. The default for lapack seems to be atlas and the default for blas is not. You might want to resolve this (if you have sudo rights) by:
|
On my system the superlu dependencies then looks like this:
|
The issue was discovered on a fresh Ubuntu 12.04 install with a student here. He should be by tomorrow with the computer. I can of course test on one of my own Ubuntu boxes too. Thanks for the efforts, I will report back as soon as possible. |
Tested on a 12.04 box at home, it now builds opm-core. Opm-porsol fails, but I need to check more on that tomorrow, will return with an update then. |
Ok, I tested on three different Ubuntu 12.04 boxes with different issues on all three. I suspected all three were related to various earlier build efforts, so I made a virtual KVM image of vanilla Ubuntu 12.04.1 server edition. The build went through just fine on it today. Huge thanks to all of you who helped out, it is fantastic to see how the community grows and how the aggregated abilities grows with it. |
Using dunectrol and dune ppa packages on ubuntu 12.04. Git commit 643d54e fails to build opm-core. Compiling fails for refine_wells with the following output:
CXXLD refine_wells
/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zptgemm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_scopy'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_stpsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_saxpy'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_srotg' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztrsv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zhpr' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cswap'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_drot' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zgeru'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_stbsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsyr'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zher2' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cptgemm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cset' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zdrot'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ssyreflect' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_scnrm2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_stbmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zpther2k'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cpthemm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cpttrsm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztbsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sspr'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_csyreflect' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dpttrmm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dscal' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsyr2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zGetNB' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ddot'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zaxpy' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cgeru'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ssymv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dzasum'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sptsyrk' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_snrm2' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cptherk'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zhpmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cptsyr2k'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zgbmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dptgemm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ccopy' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dset'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cptsymm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sger'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cher2' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dGetNB'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_crotg' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zswap'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtbsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zdotc_sub'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zptherk' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctpmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zpttrsm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctrsv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dptsyrk' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zsyreflect'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dspr' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtrsv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sptgemm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zgemv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cher' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ssbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_caxpy' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sptsymm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cgerc' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dnrm2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsyreflect' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sdsdot'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_spttrmm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cscal'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_stpmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sspmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cdotu_sub' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_icamax' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sscal'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sptsyr2k' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ssyr'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctbsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_drotmg'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_spttrsm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zhpr2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctpsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zpthemm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dpttrsm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_strmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zcopy' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_idamax'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zscal' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cdotc_sub'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtbmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sspr2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cpther2k' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztrmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zcopyConj' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zmoveConj'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zptsyrk' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cgemv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zcplxinvert' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cscalConj'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sasum' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zscalConj'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dcopy' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zaxpby'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cmoveConj' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_scasum'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_srotmg' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtpsv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sdot' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_chpr2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zhemv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zdotu_sub'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zptsyr2k' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_chbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sswap' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ccplxinvert'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zptsymm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_izamax'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_drotg' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtrmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztpmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zher'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_srot' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsdot'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ztpsv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_srotm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_daxpby' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sset'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zpttrmm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_daxpy'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dgemv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cpttrmm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ctrmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_ccopyConj'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zgerc' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dgbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dspr2' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sgbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dptsyr2k' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsymv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_sgemv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dsbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dasum' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_saxpby'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dswap' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_chpmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_isamax' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_caxpby'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dtpmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dptsymm'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_chpr' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_dznrm2'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_ssyr2' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_sGetNB'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_zset' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zhbmv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dger' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_chemv'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cGetNB' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_csrot'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_dspmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_xerbla'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_drotm' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_cptsyrk'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_cgbmv' /usr/lib/liblapack.so.3gf: undefined reference to
ATL_zrotg'/usr/lib/liblapack.so.3gf: undefined reference to
ATL_strsv' collect2: ld returned 1 exit status make[2]: *** [refine_wells] Error 1 make[2]: *** Waiting for unfinished jobs.... make[2]: Leaving directory
/home/andreas/Opm/opm-core/examples'make[1]: *** [all-recursive] Error 1
make[1]: Leaving directory `/home/andreas/Opm/opm-core'
make: *** [all] Error 2
--- Failed to build opm-core ---
Terminating dunecontrol due to previous errors!
The text was updated successfully, but these errors were encountered: