Skip to content

Commit

Permalink
All: update install without wheels
Browse files Browse the repository at this point in the history
  • Loading branch information
benoit128 committed Jul 24, 2024
1 parent 1eab671 commit 4ccdb8f
Show file tree
Hide file tree
Showing 24 changed files with 101 additions and 52 deletions.
3 changes: 3 additions & 0 deletions Cassiopee/CPlot/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=CPlot --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
7 changes: 5 additions & 2 deletions Cassiopee/Compressor/install
Original file line number Diff line number Diff line change
Expand Up @@ -57,10 +57,13 @@ if [ $PRODMODE -le 1 ]; then
rm -f build/lib.*/Compressor/sz/csz.*
rm -f build/lib.*/Compressor/zfp/czfp.*

if [ $PRODMODE -eq 0 ]; then
if [ $PRODMODE -eq 0 ]; then # setup
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
elif [ $PRODMODE -eq 1 ]; then # pip+no wheel
python -m pip install --no-cache-dir --no-binary=Compressor --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then # pip+wheel
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
5 changes: 4 additions & 1 deletion Cassiopee/Connector/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
python -m pip install --no-cache-dir --no-binary=Connector --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then # pip+wheel
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
Expand Down
38 changes: 19 additions & 19 deletions Cassiopee/Converter/Converter/IO/GenIO_fmtfoam.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -227,7 +227,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
if (strcmp(buf, "uniform") == 0) {
readWord(ptrFile, buf);
E_Float val = strtod(buf, NULL);
printf("uniform " SF_F_ "\n", val);
printf("Info: foamread: uniform " SF_F_ "\n", val);
for (E_Int j = 0; j < bcsize; j++) {
bcf[i] = val;
}
Expand All @@ -244,7 +244,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
readInt(buf, 1024, pos, nfaces);
assert(nfaces == bcsize);

printf("non uniform list of size " SF_D_ "\n", nfaces);
printf("Info: foamread: non uniform list of size " SF_D_ ".\n", nfaces);

skipLine(ptrFile); // (

Expand Down Expand Up @@ -273,7 +273,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
char buf[128];
readWord(ptrFile, buf);
E_Float val = strtod(buf, NULL);
printf("uniform " SF_F_ "\n", val);
printf("Info; foamread: uniform " SF_F_ ".\n", val);
for (E_Int j = 0; j < bcsize; j++) {
bcf[j] = val;
}
Expand All @@ -291,7 +291,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
if (strcmp(buf, "uniform") == 0) {
readWord(ptrFile, buf);
E_Float val = strtod(buf, NULL);
printf("uniform " SF_F_ "\n", val);
printf("Info; foamread: uniform " SF_F_ ".\n", val);
for (E_Int j = 0; j < bcsize; j++) {
bcf[i] = val;
}
Expand All @@ -308,7 +308,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
readInt(buf, 1024, pos, nfaces);
assert(nfaces == bcsize);

printf("non uniform list of size " SF_D_ "\n", nfaces);
printf("Info: foamread: non uniform list of size " SF_D_ ".\n", nfaces);

skipLine(ptrFile); // (

Expand Down Expand Up @@ -336,7 +336,7 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
readInt(buf, 1024, pos, nfaces);
assert(nfaces == bcsize);

printf("non uniform list of size " SF_D_ "\n", nfaces);
printf("Info: foamread: non uniform list of size " SF_D_ ".\n", nfaces);
skipLine(ptrFile); // (

for (E_Int j = 0; j < nfaces; j++)
Expand All @@ -352,14 +352,14 @@ E_Int K_IO::GenIO::readScalarField(char *file, FldArrayF& f, E_Int idx,
char buf[128];
readWord(ptrFile, buf);
E_Float val = strtod(buf, NULL);
printf("uniform " SF_F_ "\n", val);
printf("Info; foamread: uniform " SF_F_ ".\n", val);
for (E_Int j = 0; j < bcsize; j++) {
bcf[j] = val;
}
}

else {
fprintf(stderr, "Unsupported boundary condition %s\n", type);
printf("Warning: foamread: unsupported boundary condition %s.\n", type);
return 0;
}

Expand Down Expand Up @@ -462,7 +462,7 @@ E_Int K_IO::GenIO::readVectorField(char *file, FldArrayF& f, E_Int idx,

readWord(ptrFile, buf);
E_Float valz = strtod(buf, NULL);
printf("uniform (" SF_F3_ ")\n", valx, valy, valz);
printf("Info: foamread: uniform (" SF_F3_ ").\n", valx, valy, valz);

for (E_Int j = 0; j < bcsize; j++) {
bcfx[j] = valx;
Expand Down Expand Up @@ -494,7 +494,7 @@ E_Int K_IO::GenIO::readVectorField(char *file, FldArrayF& f, E_Int idx,
readInt(buf, 1024, pos, nfaces);
assert(nfaces == bcsize);

printf(SF_D_ " faces", nfaces);
printf("Info; foamread: " SF_D_ " faces.", nfaces);

skipLine(ptrFile);

Expand All @@ -508,7 +508,7 @@ E_Int K_IO::GenIO::readVectorField(char *file, FldArrayF& f, E_Int idx,
}

else {
fprintf(stderr, "Unsupported boundary condition %s\n", type);
printf("Warning: foamread: unsupported boundary condition %s.\n", type);
return 0;
}

Expand Down Expand Up @@ -629,7 +629,7 @@ E_Int K_IO::GenIO::foamread(
// compute NFace
FldArrayI cNFace; E_Int nelts;
K_CONNECT::connectFE2NFace(PE, cNFace, nelts);
printf("cells: " SF_D_ "\n", nelts);
printf("Info: foamread: ncells: " SF_D_ ".\n", nelts);

// Merge
E_Int sizeNGon = cNGon.getSize();
Expand Down Expand Up @@ -761,13 +761,13 @@ E_Int K_IO::GenIO::foamReadFields(char *file,
closedir(d);

if (max_time == -1.0) {
printf("Warning: no time directory found. Skipping field read.\n");
printf("Warning: foamread: no time directory found. Skipping field read.\n");
return 0;
} else if (max_time == 0) {
printf("Warning: skipping time directory 0.\n");
printf("Warning: foamread: skipping time directory 0.\n");
return 0;
} else {
printf("Reading fields from time directory %s\n", dir_name);
printf("Info: foamread: reading fields from time directory %s\n", dir_name);
}

fullPath[0] = '\0';
Expand Down Expand Up @@ -874,15 +874,15 @@ E_Int K_IO::GenIO::foamReadFields(char *file,
size++;
}
if (size == MAX_FIELDS) {
fprintf(stderr, "Warning: foamread: Trying to read more that maximum number of fields (%d). Aborting.\n", MAX_FIELDS);
exit(1);
printf("Warning: foamread: trying to read more that maximum number of fields (%d). Aborting.\n", MAX_FIELDS);
exit(1); // must return
}
fclose(fh);
}
}
closedir(d);

printf("nflds: " SF_D_ "\n", nflds);
printf("Info: foamread: nflds: " SF_D_ ".\n", nflds);

// delete the last comma
varStringc[strlen(varStringc)-1] = '\0';
Expand Down Expand Up @@ -1699,7 +1699,7 @@ E_Int K_IO::GenIO::foamwrite(
#endif
else
{
printf("Bad " SF_D_ "-th bcname %s\n", j, name);
printf("Error: foamwrite: bad bcname no " SF_D_ ".\n", j);
return 1;
}

Expand Down
3 changes: 3 additions & 0 deletions Cassiopee/Converter/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=Converter --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
3 changes: 3 additions & 0 deletions Cassiopee/Dist2Walls/install
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,9 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=Dist2Walls --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
3 changes: 3 additions & 0 deletions Cassiopee/Distributor2/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ if [ $PRODMODE -le 2 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=Distributor2 --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
2 changes: 0 additions & 2 deletions Cassiopee/Envs/env_Cassiopee_local
Original file line number Diff line number Diff line change
Expand Up @@ -98,11 +98,9 @@ else if ($MAC == "ld") then
module purge
module load occt/7.6.1-gnu831
module load python/3.8.14-gnu831
#module load intel/21.2.0
module load gcc/10.2.0
module load lapack/3.9.1-gnu831
module load hdf5/1.10.5-gnu831-ompi405
unset I_MPI_PMI_LIBRARY
setenv PRODMODE 1
setenv PIP_DISABLE_PIP_VERSION_CHECK 1
# Set next line only if python is not python
Expand Down
8 changes: 3 additions & 5 deletions Cassiopee/Envs/sh_Cassiopee_local
Original file line number Diff line number Diff line change
Expand Up @@ -83,12 +83,11 @@ elif [ "$MAC" = "ld" ]; then
module purge
module load occt/7.6.1-gnu831
module load python/3.8.14-gnu831
#module load intel/21.2.0
module load gcc/10.2.0
module load lapack/3.9.1-gnu831
module load hdf5/1.10.5-gnu831-ompi405
unset I_MPI_PMI_LIBRARY
export PRODMODE=1
setenv PIP_DISABLE_PIP_VERSION_CHECK 1
export PYTHONEXE=python3
# Nbre de threads
ncpu=$(grep processor /proc/cpuinfo | tail -1 | cut -f2 -d: )
Expand Down Expand Up @@ -502,7 +501,7 @@ elif [ "$MAC" = "spiro_pgi" ]; then
module load subversion/1.14.1-gnu831

elif [ "$MAC" = "spiro_gpu" ]; then
#----------------------------- juno gpu ------------------------------------
#----------------------------- spiro gpu ------------------------------------
export ELSAPROD=spiro_gpu
export ELSAPROD="$ELSAPROD$INTTYPE"
source /opt/tools/Modules/init/bash
Expand Down Expand Up @@ -547,7 +546,7 @@ elif [ "$MAC" = "juno" ]; then
export OMP_PLACES=cores

elif [ "$MAC" = "juno_gcc" ]; then
#----------------------------- juno -----------------------------------------
#----------------------------- juno gcc ---------------------------------------
export ELSAPROD=juno_gcc
export ELSAPROD=$ELSAPROD$INTTYPE
# Nbre de threads
Expand Down Expand Up @@ -733,7 +732,6 @@ elif [ "$MAC" = "WDAAA161Z" ]; then
export PIP_DISABLE_PIP_VERSION_CHECK=1
fi


#-------------------------- Common to all prods --------------------------------
# Chemin de l'executable python
if ! [ -z $PATHL ]; then
Expand Down
5 changes: 4 additions & 1 deletion Cassiopee/Generator/install
Original file line number Diff line number Diff line change
Expand Up @@ -61,8 +61,11 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
python -m pip install --no-cache-dir --no-binary=Generator --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
Expand Down
5 changes: 4 additions & 1 deletion Cassiopee/Geom/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
python -m pip install --no-cache-dir --no-binary=Geom --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
Expand Down
3 changes: 3 additions & 0 deletions Cassiopee/Initiator/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,6 +62,9 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=Initiator --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
5 changes: 4 additions & 1 deletion Cassiopee/Intersector/install
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,11 @@ if [ $PRODMODE -le 1 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
python -m pip install --no-cache-dir --no-binary=Intersector --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
else
python setupLegacy.py install --prefix="$INSTALLPATH"
Expand Down
10 changes: 5 additions & 5 deletions Cassiopee/KCore/install
Original file line number Diff line number Diff line change
Expand Up @@ -63,13 +63,13 @@ if [ $PRODMODE -le 1 ]; then
rm -f build/lib.*/KCore/kcore.*
rm -f build/lib.*/KCore/kcore-*.*
python -c "import Dist; Dist.symLinks()"
if [ $PRODMODE -eq 0 ]; then
if [ $PRODMODE -eq 0 ]; then # setup
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
#rep=`python -c "import sys; print('%d.%d'%(sys.version_info[0],sys.version_info[1]))"`
#rep="$INSTALLPATH/lib/python"$rep"/site-packages"
#python -m pip install --ignore-installed --upgrade --target=$rep .
elif [ $PRODMODE -eq 1 ]; then # pip+no wheel
python -m pip install --no-cache-dir --no-binary=KCore --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then # pip+wheel
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
3 changes: 3 additions & 0 deletions Cassiopee/Modeler/install
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,9 @@ if [ $PRODMODE -eq 0 ] || [ $PRODMODE -eq 2 ]; then
python setup.py install --prefix="$INSTALLPATH"
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 1 ]; then
python -m pip install --no-cache-dir --no-binary=Modeler --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
elif [ $PRODMODE -eq 2 ]; then
python -m pip install --ignore-installed --upgrade --prefix="$INSTALLPATH" .
[ $? != 0 ] && exit 1;
fi
Expand Down
Loading

0 comments on commit 4ccdb8f

Please sign in to comment.