Coder Social home page Coder Social logo

Comments (14)

nimgould avatar nimgould commented on June 16, 2024

Thank you, Ziyan. This was a bug. I uploaded a fix.
Let me know if this doesn't sort out the issue.
Nick

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Thanks Nick! miqr.f90 error is fixed.
However, it seems that galahad can't find the mex file. The error message is as following:

compiling in /Users/ziyan/Documents/Github/cutest/galahad/src with the comand
/usr/bin/make -s -f /Users/ziyan/Documents/Github/cutest/galahad/makefiles/mac64.osx.ifr rq_cutest rq_matlab
Compiling galahad_matlab /bin/sh: /bin/mex: No such file or directory
make[1]: *** [/Users/ziyan/Documents/Github/cutest/galahad/objects/mac64.osx.ifr/double/libgalahad_matlab.a(galahad_matlab.o)] Error 127
make: *** [rq_matlab_double] Error 2

Could you please check this issue? Thanks in advance.

from galahad.

nimgould avatar nimgould commented on June 16, 2024

It appears that you may not have set your MATLAB environment variable, see
point 10 in the main GALAHAD README. The make cammand
$(MATLAB)/bin/mex is being executed as /bin/mex

Could you check?

Thanks

Nick

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Hi Nick,

Thanks a lot for your prompt reply. I noticed that I set my MATLAB environment variable before with a different name other than 'MATLAB'. Now, it is fixed.

There is another issue raised. It is related to lgomp library:

Compiling galahad_glrt Building with 'Intel Fortran Composer XE'.
ld: library not found for -lgomp
clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[1]: *** [glrt] Error 255
make: *** [rq_matlab_double] Error 2

I'm using MacOS Mojave 10.14.6 system and Intel fortran complier for CUTEst.

Many thanks!

from galahad.

nimgould avatar nimgould commented on June 16, 2024

Hi Ziyan

I'm afraid that this is beyond my competancy; I don't have access to an OSX system.
My collaborator Dominique Orban @dpo is our Apple expert. Currently the -gomp
flag is hardwired into $GALAHAD/src/matlab/makemaster, presumably because this
works under linux. The ifort man page suggests that the correct flag might be
-openmp but I can't be sure. Perhaps you migyht first try removing the -gomp flag
entirely to see what happens; if there are then missing dependencies, it should
be possible to Google them to find out how to resolve them under OSX.

Nick

from galahad.

dpo avatar dpo commented on June 16, 2024

Unfortunately, I don't have access to the Intel Fortran. It's only free for open source on Linux. However, I suspect Nick is right that the OpenMP flag must be adjusted. A line that is commented out in $ARCHDEFS/compiler.pc64.lnx.ifr also suggests -qopenmp.

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Many thanks for your replies.

I tried to replace -lgomp by -qopenmp in GALAHAD/src/matlab/makemaster. It returns the following error message:

compiling in /Users/ziyan/Documents/Documents/Github/cutest/galahad/src with the comand
/usr/bin/make -s -f /Users/ziyan/Documents/Documents/Github/cutest/galahad/makefiles/mac64.osx.ifr rq_cutest rq_matlab
Compiling galahad_glrt Unknown MEX argument '-qopenmp'.
make[1]: *** [glrt] Error 255
make: *** [rq_matlab_double] Error 2

I am a newbie to these operations. Do I need to edit other files to make it work?

Cheers,
Ziyan

from galahad.

dpo avatar dpo commented on June 16, 2024

@ZiyanZhu1994 I suspect you should edit $ARCHDEFS/compiler.pc64.lnx.ifr and edit the OPENMP flag: https://github.com/ralna/ARCHDefs/blob/master/compiler.pc64.lnx.ifr#L15 (assuming you chose 64bit PC when you installed GALAHAD; otherwise edit compiler.pc.lnx.ifr). You may have to wipe the current botched installation and start over.

from galahad.

nimgould avatar nimgould commented on June 16, 2024

Hi Dominique

I doubt that reinstallation will help, as this will presumably produce the makemaster file with the changes that Ziyan has already made. A suggestion: simply remove the -lgomp and -qopenmp commands altogether. With luck then ifort will ignore the openmp directives. Worth a try.

Ziyan, as Dominuque says, we are hampered as none of the package maintainers has access to OSX with ifort as these are both commercial products. My advice in the past has been to install a virtual linux machine under OSX, and build using gcc/gfortran on this.

Nick

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Thanks for the suggestions.

I edited OPENMP flag in $ARCHDEFS/compiler.pc64.lnx.ifr (changed flag to -qopenmp, removed the -lgomp and -qopenmp ) and reinstalled GALAHAD. However, it still uses -lgomp. It seems that I need to use the other files. If it is hard to modify these settings, I would try to install a virtual linux machine.

Best,
Ziyan

from galahad.

nimgould avatar nimgould commented on June 16, 2024

Hi Ziyan

Did you try my suggestion to remove the -lgomp flag from the $GALAHAD/src/matlab/makemaster file?

Nick

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Hi Nick,

I tried to comment out -lgomp from $GALAHAD/src/matlab/makemaster and complied it again. It returned the following message:

Compiling galahad_glrt Building with 'Intel Fortran Composer XE'.
Undefined symbols for architecture x86_64:
"dnrm2", referenced from:
galahad_norms_double_mp_two_norm in libgalahad.a(norms.o)
"dpbtrf", referenced from:
galahad_sls_double_mp_sls_factorize in libgalahad.a(sls.o)
"dpbtrs", referenced from:
galahad_sls_double_mp_sls_solve_one_rhs in libgalahad.a(sls.o)
galahad_sls_double_mp_sls_solve_multiple_rhs in libgalahad.a(sls.o)
"dpotrf", referenced from:
galahad_sls_double_mp_sls_factorize in libgalahad.a(sls.o)
"dpotrs", referenced from:
galahad_sls_double_mp_sls_solve_one_rhs in libgalahad.a(sls.o)
galahad_sls_double_mp_sls_solve_multiple_rhs in libgalahad.a(sls.o)
"dpttrf", referenced from:
galahad_glrt_double_mp_glrt_trts in libgalahad.a(glrt.o)
galahad_gltr_double_mp_gltr_ttrs in libgalahad.a(gltr.o)
galahad_gltr_double_mp_gltr_leftmost_eigenvector in libgalahad.a(gltr.o)
"drot", referenced from:
galahad_scu_double_mp_scu_delete in libgalahad.a(scu.o)
"drotg", referenced from:
galahad_scu_double_mp_scu_triangular..0 in libgalahad.a(scu.o)
galahad_scu_double_mp_scu_append in libgalahad.a(scu.o)
galahad_scu_double_mp_scu_delete in libgalahad.a(scu.o)
galahad_scu_double_mp_scu_triangular in libgalahad.a(scu.o)
galahad_scu_double_mp_scu_triangular..1 in libgalahad.a(scu.o)
"dsterf", referenced from:
galahad_glrt_double_mp_glrt_solve in libgalahad.a(glrt.o)
galahad_gltr_double_mp_gltr_solve in libgalahad.a(gltr.o)
"dsytrf", referenced from:
galahad_sls_double_mp_sls_factorize in libgalahad.a(sls.o)
"dsytrs", referenced from:
galahad_sls_double_mp_sls_solve_one_rhs in libgalahad.a(sls.o)
galahad_sls_double_mp_sls_solve_multiple_rhs in libgalahad.a(sls.o)
"dtbsv", referenced from:
galahad_sls_double_mp_sls_part_solve in libgalahad.a(sls.o)
galahad_sls_double_mp_sls_sparse_forward_solve in libgalahad.a(sls.o)
"dtrsv", referenced from:
galahad_sls_double_mp_sls_part_solve in libgalahad.a(sls.o)
galahad_sls_double_mp_sls_sparse_forward_solve in libgalahad.a(sls.o)
"ilaenv", referenced from:
galahad_sls_double_mp_sls_analyse in libgalahad.a(sls.o)
ld: symbol(s) not found for architecture x86_64
clang: error: linker command failed with exit code 1 (use -v to see invocation)

make[1]: *** [glrt] Error 255
make: *** [rq_matlab_double] Error 2

The part of the makemaster file now is as following:

MFLAGS = CC='$(CC)' FC='$(FORTRAN)' FFLAGS='$(MFFLAGS) $(OPENMP)'
LD='$(FORTRAN) $(MFFLAGS) $(OPENMP)'
-g -largeArrayDims $(MATLABINC)# -lgomp
# -g -largeArrayDims -compatibleArrayDims $(MATLABINC) -lgomp
# -g $(MATLABINC) -lgomp

I hope I commented it correctly.

from galahad.

nimgould avatar nimgould commented on June 16, 2024

It now seems that you need to link in the appropriate LAPACK routines. Usually this will be with the
-llapack
flag (if you have lapack installed) or
-lgalahad_lapack -lgalahad_blas
(if not). You might instead try the Intel MKL version of lapack, but you may need help from your system people to tell you the exact flags: under Linux this is

-L/opt/intel/mkl/lib/intel64 -lmkl_intel_lp64 -lmkl_gnu_thread -lmkl_core -lpthread -lm
-lgalahad_dummy

Nick

from galahad.

ZiyanZhu1994 avatar ZiyanZhu1994 commented on June 16, 2024

Hi Nick,

Thanks a lot for your help!

We found the correct flag from https://software.intel.com/en-us/articles/intel-mkl-link-line-advisor.

The library is installed successfully! Thanks again!

Cheers,
Ziyan

from galahad.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.