Can't open module file ‘zoltan.mod

Discussion about building and installing Elmer
Post Reply
Gary R
Posts: 96
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Can't open module file ‘zoltan.mod

Post by Gary R »

Hi all,
OS Debian stretch
AMD 64 - 4 processor
KDE4 Desk top
Recently built Trilinos from GitHub source code

I have been trying to build Elmer from source code I am to the point where cmake configures and generates without errors. But when I run make -j4 I get the following error:

Code: Select all

[ 71%] Building Fortran object fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o                                                           
/opt/elmer/elmerfem/fem/src/MeshPartition.F90:52:6:

   USE Zoltan
      1
Fatal Error: Can't open module file ‘zoltan.mod’ for reading at (1): No such file or directory
compilation terminated.
make[2]: *** [fem/src/CMakeFiles/elmersolver.dir/build.make:895: fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o] Error 1
make[2]: *** Waiting for unfinished jobs....
make[1]: *** [CMakeFiles/Makefile2:725: fem/src/CMakeFiles/elmersolver.dir/all] Error 2
make: *** [Makefile:163: all] Error 2
Anyone have a clue how to fix this. I found a forum entry alluding to the order in which the code was compiled but couldn't make sense of it. I am using cmakeGUI and have Zoltan selected. Zoltan is installed on my system as part of Trilinos.

Attached is both my CMakeList.txt and my Makefile.

Gary R.
kevinarden
Posts: 714
Joined: 25 Jan 2019, 01:28
Antispam: Yes

Re: Can't open module file ‘zoltan.mod

Post by kevinarden »

so you have all of these library variables set correctly

# MARK_AS_ADVANCED(WITH_Trilinos)
IF(WITH_Trilinos)
FIND_PACKAGE(ML REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/ML ${TRILINOS_PATH})
FIND_PACKAGE(Trilinos REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/Trilinos ${TRILINOS_PATH})
FIND_PACKAGE(Belos REQUIRED PATHS ${TRILINOS_PATH}/lib/cmake/Belos ${TRILINOS_PATH})
IF(ML_DIR)
ADD_DEFINITIONS(-DHAVE_TRILINOS)
ENDIF()
ENDIF()

IF(WITH_Zoltan)
# ZOLTAN Remeshing
MESSAGE(STATUS "------------------------------------------------")

SET(USE_SYSTEM_ZOLTAN FALSE CACHE BOOL "Use system Zoltan library")
IF(NOT ${USE_SYSTEM_ZOLTAN})
MESSAGE(STATUS "Building Zoltan mesh repartitioner")
ADD_SUBDIRECTORY(contrib/Zoltan_v3.83)
SET(HAVE_ZOLTAN TRUE CACHE BOOL "Has Zoltan tools for mesh (re)partitioning" )
MARK_AS_ADVANCED(HAVE_ZOLTAN)
MESSAGE(STATUS " Zoltan_LIB: " "${ZOLTAN_LIBRARY}")
MESSAGE(STATUS "------------------------------------------------")
ELSE()
FIND_PACKAGE(Zoltan)

IF(ZOLTAN_FOUND)

SET(HAVE_ZOLTAN TRUE CACHE BOOL "Has Zoltan tools for mesh (re)partitioning" )
GET_FILENAME_COMPONENT(ZOLTAN_LIBDIR ${ZOLTAN_LIBRARY} DIRECTORY)

MARK_AS_ADVANCED(HAVE_ZOLTAN)
MESSAGE(STATUS " Zoltan: " "${ZOLTAN_FOUND}")
MESSAGE(STATUS " Zoltan_INC: " "${ZOLTAN_INCLUDE_DIR}")
MESSAGE(STATUS " Zoltan_LIB: " "${ZOLTAN_LIBRARY}")
MESSAGE(STATUS " Zoltan_LIBDIR: " "${ZOLTAN_LIBDIR}")
raback
Site Admin
Posts: 3817
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Can't open module file ‘zoltan.mod

Post by raback »

Hi

Unfortunately the subrepository where zoltan recides is not automatically obtained. You should say the following

Code: Select all

git submodule sync
git submodule update --init
-Peter
Gary R
Posts: 96
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Can't open module file ‘zoltan.mod

Post by Gary R »

Thanks for the reply.
I'm not sure how to use "git submodule sync and git submodule update --init. From my reading, it seems that they are more appropriate for the use of developers. To get trilinos, I down loaded Trilinos-master.zip from GitHub and installed that. Could you be more specific about the command usage. I struggle a little with GitHub. I seldom use it except to download code that I can't get as a Debian .deb file.

Gary R.
raback
Site Admin
Posts: 3817
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Can't open module file ‘zoltan.mod

Post by raback »

Hi

You must have gotten the source code some way. I guess it could be from ZIP package under the "Clone or Download" buttom of https://github.com/ElmerCSC/elmerfem

If you have git installed you could do it as well with

Code: Select all

git clone https://github.com/ElmerCSC/elmerfem.git
and update the Zoltan subrepository with the above commands.

Now let's assume that you used the ZIP package. Then you could also include the subrepository manually. View the page: https://github.com/ElmerCSC/elmerfem/tree/devel/contrib. There you see Zoltan but it is not a file, nor is it a directory. It is a subrepository. If you click on it you will be directed to a new repository. What you could now do is to follow your manual procedure and add the Zoltan repository under the main repository in directory "contrib".

The nice thing with subrepository is that it can be fetched only when needed. And Zoltan is currently only needed when desiring to do parallel runs with internal partitioning. We needed to do some modifications to the code in order to have it nicely built with cmake.

The code itself is courtesy to Sandia National Labs, see http://www.cs.sandia.gov/Zoltan/.

-Peter
Gary R
Posts: 96
Joined: 12 Apr 2012, 07:23
Antispam: Yes
Location: Long Beach CA, USA

Re: Can't open module file ‘zoltan.mod (Solved)

Post by Gary R »

Hi Peter,
Thanks for the reply. I used the git clone method to download Elmer but had to do the same for my Trilinos installation. Once Trilinos was properly installed, the Elmer installation went smoothly. I used cmake-GUI for both installations.

Thank you again
Gary R.
lazyTom
Posts: 47
Joined: 05 Jun 2013, 01:32
Antispam: Yes

Re: Can't open module file ‘zoltan.mod

Post by lazyTom »

Hi all,

I'm having a similar problem (can't open module file 'zoltan.mod') while trying to update Elmerfem in the virtual machine (I've downloaded the most recent version of VA).

Assuming the problem is the same. In what directory do I need to run the commands below?

git submodule sync
git submodule update --init

Furthermore, I add the error sequence in case you want to have a look at it.
elmer_install_fail.txt
(138.81 KiB) Downloaded 88 times

Best regards,

Marco
lazyTom
Posts: 47
Joined: 05 Jun 2013, 01:32
Antispam: Yes

Re: Can't open module file ‘zoltan.mod

Post by lazyTom »

HI all,

just an update, I've tried the commands "git submodule sync" and "git submodule update --init" in the Source directory and they worked (I could see the directory Zoltan_v3.83 in contrib) however after saying "./elmer_install.sh" I've got the same compelling error as before

Code: Select all

/home/elmeruser/Source/elmerfem/fem/src/MeshPartition.F90:52:6:

   USE Zoltan
      1
Fatal Error: Can't open module file ‘zoltan.mod’ for reading at (1): No such file or directory
compilation terminated.
fem/src/CMakeFiles/elmersolver.dir/build.make:1598: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o' failed
make[3]: *** [fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o] Error 1
fem/src/CMakeFiles/elmersolver.dir/build.make:1614: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o.provides' failed
make[2]: *** [fem/src/CMakeFiles/elmersolver.dir/MeshPartition.F90.o.provides] Error 2
CMakeFiles/Makefile2:3274: recipe for target 'fem/src/CMakeFiles/elmersolver.dir/all' failed
make[1]: *** [fem/src/CMakeFiles/elmersolver.dir/all] Error 2
make[1]: *** Waiting for unfinished jobs....
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/featureedge.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/vtkpost.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/isosurface.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/isocontour.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/epmesh.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/colorbar.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/meshpoint.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/meshedge.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/surface.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/preferences.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/vector.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/readepfile.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/streamline.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/timestep.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/ecmaconsole.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/vtkpost/text.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/cad/cadview.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/cad/cadpreferences.cpp.o
[ 61%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/qrc_ElmerGUI.cxx.o
[ 62%] Building CXX object ElmerGUI/Application/CMakeFiles/ElmerGUI.dir/ElmerGUI_automoc.cpp.o
[ 62%] Linking CXX executable ElmerGUI
[ 63%] Built target ElmerGUI
Makefile:160: recipe for target 'all' failed
make: *** [all] Error 2
/opt/elmer/Elmer_devel has been installed
Can anybody help me figure out what went wrong?

Thanks,

Marco
raback
Site Admin
Posts: 3817
Joined: 22 Aug 2009, 11:57
Antispam: Yes
Location: Espoo, Finland
Contact:

Re: Can't open module file ‘zoltan.mod

Post by raback »

Hi Marco,

Sometimes it is necessary to start from clean build directory. Unfortunately compilation issues are not really my cup of tea...

-Peter
lazyTom
Posts: 47
Joined: 05 Jun 2013, 01:32
Antispam: Yes

Re: Can't open module file ‘zoltan.mod

Post by lazyTom »

Hi Peter,

I understand, in any case I managed to find the problem. The directory that needs to be removed before launching elmer_install.sh had its name changed from "builddir" to "builddir_devel"

Can you please update the "Rreadme1st.tx" file in the virtual machine download directory to address the changes?

So, for anybody that had the same problem, the sequence for updating Elmer on virtual machine is as follows:

- using a terminal, go to /home/elmeruser/Source/elmerfem (by default, when you open the terminal you are in /home/elmeruser/ so you only need to go to Source/elmerfem, this is done by saying "cd Source/elmerfem")
- say "git fetch && git pull" or "git fetch" and "git pull" (here I suspect only "git pull" is really required as, from what I understand, "git fetch" will (quote) download the remote content but not update your local repo's working state, leaving your current work intact. "git pull" is the one that actually update your local repo. Another useful command is "git status", run it after "git fetch". But before it gets too complicated I leave this part to git pros and manuals ;) )
- go back to the parent folder (Source) by saying "cd .."
- remove the build directory by saying "rm -fr builddir_devel"
- say "./elmer_install.sh"


Regards,

Marco

PS: Now I have 48GB of ram available with the latest release :mrgreen:
Post Reply